Installation Methods for GitHub CLI

Installation Methods for GitHub CLI

·

2 min read

You can install GitHub CLI in quite a few ways, I will be going over each OS in this article.

Windows

WinGet

winget install gh

scoop

scoop install gh

Chocolatey

choco install gh

MSI file

You can download the compiled MSI file from the releases page.


Linux

(Debian/Ubuntu) apt

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
sudo apt-add-repository https://cli.github.com/packages
sudo apt update
sudo apt install gh

(Fedora, CentOS, Red Hat Enterprise Linux) dnf

sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
sudo dnf install gh

(openSUSE Linux) zypper

sudo zypper addrepo https://cli.github.com/packages/rpm/gh-cli.repo
sudo zypper ref
sudo zypper install gh

(Arch Linux) pacman

sudo pacman -S github-cli

(Android) Termux

pkg install gh

(Gentoo Linux) emerge

emerge -av github-cli

(Kiss Linux) kiss

kiss b github-cli && kiss i github-cli

snap

sudo snap install --edge gh && snap connect gh:ssh-keys

(Nix/NixOS) nix

nix-env -iA nixos.gitAndTools.gh