hub command not found

In this troubleshooting guide we learn how to fix hub command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

hub: command not found

or when using sudo you get the following error message

sudo: hub: command not found

Solutions to hub: command not found

How To Fix hub: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu hub is provided by hub package.

hub is:

hub is a command line tool that wraps git in order to extend it with extra functionality that make working with GitHub easier.

$ hub clone rtomayko/tilt

expands to:

$ git clone git://github.com/rtomayko/tilt.git

hub is best aliased as git, so you can type “git ” in the shell and get all the usual hub features.

You should place this command in your .bash_profile or other startup script:

eval “$(hub alias -s)”

This package contains the binaries.

To fix this problem, we can install more using the command below.

sudo apt-get -y install hub

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install hub.

sudo apt -y install hub

Or if you have aptitude installed you can use the following command.

sudo aptitude install hub

Summary

In this tutorial we learn how to fix hub command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.