Cody A. Ray

Quick Tip: Install hub for GitHub on Ubuntu

April 13, 2019

Yesterday I was automating updates between GitHub repos via CI, and I wanted to automatically open a PR against a repo. GitHub’s hub CLI is the perfect, obvious candidate. But how do you easily install it in Ubuntu?

A long “one-liner” to download and install a specific version of hub as a pre-compiled binary:

curl -Ls https://github.com/github/hub/releases/download/v2.11.1/hub-linux-amd64-2.11.1.tgz | sudo tar -xvz -C /usr/bin --strip-components=2 hub-linux-amd64-2.11.1/bin/hub && sudo chmod 755 /usr/bin/hub

If you don’t mind running a development version, and you have go installed, you can just run

go get github.com/github/hub

But you’ll need to add $GOPATH/bin to your $PATH to easily use it.

1 comment

Imported from the previous site.

Informatika· June 10, 2025
Hub CLI is a game-changer for GitHub automation - worth the 1-minute setup to supercharge your workflow! 🚀 #DeveloperProductivity
© 2009–2026 Cody A. Ray
RSSGitHubLinkedIn