This guide will explain the installation steps for GitHub CLI on Linux – Ubuntu, Debian, CentOS, Fedora and Windows 10 or Windows server systems. GitHub CLI (gh) is a tool that brings on the Github features to the command line. This tool brings the pull requests, issues, and other GitHub concepts to the terminal next to where you are already working with git and your code.

The GitHub CLI (gh) is currently available in Beta and only for repos hosted on The development team is planning to move the project out of beta (likely toward the end of 2020). At the moment GitHub CLI does not support repositories hosted on GitHub Enterprise Server or other hosting providers but once out of beta it will.

How To Install GitHub CLI on Linux

If you’re running any edition of Linux, the GitHub CLI binary should work for you without any issues.

You can view the latest version of gh using the following command:

VERSION=`curl  "" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-` 

Download the latest binary file.

### With wget ###

### With curl ###
curl -sSL${VERSION}/gh_${VERSION}_linux_amd64.tar.gz -o gh_${VERSION}_linux_amd64.tar.gz

Extract downloaded file:

tar xvf gh_${VERSION}_linux_amd64.tar.gz

Copy binary file to /usr/local/bin directory.

sudo cp gh_${VERSION}_linux_amd64/bin/gh /usr/local/bin/

Version confirmation using gh command:

$ gh version
gh version 1.2.1 (2020-11-11)

Copy man pages for gh.

sudo cp -r gh_${VERSION}_linux_amd64/share/man/man1/* /usr/share/man/man1/

You can see the complete list:

$ ls gh_${VERSION}_linux_amd64/share/man/man1/
gh.1             gh-config-set.1   gh-issue.1         gh-issue-reopen.1  gh-pr-checkout.1  gh-pr-list.1    gh-pr-review.1  gh-repo-clone.1
gh-completion.1  gh-credits.1      gh-issue-close.1   gh-issue-status.1  gh-pr-close.1     gh-pr-merge.1   gh-pr-status.1  gh-repo-create.1
gh-config.1      gh-gist.1         gh-issue-create.1  gh-issue-view.1    gh-pr-create.1    gh-pr-ready.1   gh-pr-view.1    gh-repo-fork.1
gh-config-get.1  gh-gist-create.1  gh-issue-list.1    gh-pr.1            gh-pr-diff.1      gh-pr-reopen.1  gh-repo.1       gh-repo-view.1

Man pages usage examples:

$ man gh
$ man gh-issue
$ man gh-pr

If you’re using Arch Linux, the gh can be installed from AUR:

$ yay -S github-cli

How To Install GitHub CLI (gh) on Windows

For Windows installation, you can use scoop or Chocolatey. Use our guides below as reference:

Once you have one of the tools installed, use it to get GitHub CLI onto your Windows machine.

--- Using Chocolatey ---
choco install gh

--- Using scoop ---
scoop bucket add github-gh
scoop install gh

Using GitHub command line tool

Visit the official docs for more information on the usage of the GitHub CLI (gh) tool.

Git Learning Video Courses

More articles on Git.

Install posh-git on Windows – PowerShell environment for Git

How To Perform Git clone in Kubernetes Pod deployment

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here