1"use strict";(self.webpackChunkig_website=self.webpackChunkig_website||[]).push([[20355],{1632:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"reference/install-linux","title":"Installing on Linux","description":"How to install Inspektor Gadget on Linux","source":"@site/versioned_docs/version-main/reference/install-linux.md","sourceDirName":"reference","slug":"/reference/install-linux","permalink":"/docs/main/reference/install-linux","draft":false,"unlisted":false,"editUrl":"https://github.com/inspektor-gadget/inspektor-gadget/edit/main/versioned_docs/version-main/reference/install-linux.md","tags":[],"version":"main","sidebarPosition":200,"frontMatter":{"title":"Installing on Linux","sidebar_position":200,"description":"How to install Inspektor Gadget on Linux"},"sidebar":"mainSidebar","previous":{"title":"Installing on Kubernetes","permalink":"/docs/main/reference/install-kubernetes"},"next":{"title":"Requirements","permalink":"/docs/main/reference/requirements"}}');var t=i(74848),r=i(28453);const a={title:"Installing on Linux",sidebar_position:200,description:"How to install Inspektor Gadget on Linux"},o=void 0,l={},c=[{value:"Install a specific release",id:"install-a-specific-release",level:3},{value:"Install from distribution package",id:"install-from-distribution-package",level:3},{value:"Compilation from source",id:"compilation-from-source",level:3},{value:"Experimental features",id:"experimental-features",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"To use Inspektor Gadget on a Linux machine, choose one of the following methods:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#install-a-specific-release",children:"Install a specific release"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#install-from-distribution-package",children:"Install from distribution package"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#compilation-from-source",children:"Compilation from source"})}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"install-a-specific-release",children:"Install a specific release"}),"\n",(0,t.jsxs)(n.p,{children:["It is possible to download the asset for a given release and platform from the\n",(0,t.jsx)(n.a,{href:"https://github.com/inspektor-gadget/inspektor-gadget/releases/",children:"releases page"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"For instance, to download the latest release for linux-amd64:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ IG_VERSION=$(curl -s https://api.github.com/repos/inspektor-gadget/inspektor-gadget/releases/latest | jq -r .tag_name)\n$ IG_ARCH=amd64\n$ curl -sL https://github.com/inspektor-gadget/inspektor-gadget/releases/download/${IG_VERSION}/ig-linux-${IG_ARCH}-${IG_VERSION}.tar.gz | sudo tar -C /usr/local/bin -xzf - ig\n$ ig version\n"})}),"\n",(0,t.jsxs)(n.p,{children:["We strongly advise you to verify ",(0,t.jsx)(n.code,{children:"ig"})," by following our ",(0,t.jsx)(n.a,{href:"/docs/main/reference/verify-assets#verify-an-asset",children:"detailed instructions"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"install-from-distribution-package",children:"Install from distribution package"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"ig"})," is packaged for the following distributions:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.a,{href:"https://repology.org/project/inspektor-gadget/versions",children:(0,t.jsx)(n.img,{src:"https://repology.org/badge/vertical-allrepos/inspektor-gadget.svg",alt:"ig"})})}),"\n",(0,t.jsx)(n.h3,{id:"compilation-from-source",children:"Compilation from source"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"ig"})," is built using a Docker container relying on ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/buildx/working-with-buildx",children:"Docker Buildx"}),", so you don't have to worry\nabout installing dependencies:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ make ig\n$ sudo cp ig /usr/local/bin/\n"})}),"\n",(0,t.jsx)(n.h2,{id:"experimental-features",children:"Experimental features"}),"\n",(0,t.jsx)(n.p,{children:"Inspektor Gadget has some experimental features disabled by default. Users can enable those\nfeatures, however they don't provide any stability and could be removed at any time."}),"\n",(0,t.jsxs)(n.p,{children:["Experimental features can be enabled in ",(0,t.jsx)(n.code,{children:"ig"})," by using the ",(0,t.jsx)(n.code,{children:"IG_EXPERIMENTAL"})," env variable."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ sudo IG_EXPERIMENTAL=true ig run trace_exec\nINFO[0000] Experimental features enabled\n...\n\n# pass -E if using export and sudo\n$ export IG_EXPERIMENTAL=true\n$ sudo -E ig run trace_exec\nINFO[0000] Experimental features enabled\n...\n"})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>a,x:()=>o});var s=i(96540);const t={},r=s.createContext(t);function a(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.