apt-add-repository: command not found on Ubuntu

Following a tutorial where you’re supposed to add a repository with apt-add-repository but the command isn’t found? You can install it by doing the following:

 

sudo apt-get install software-properties-common python-software-properties

 

Then re-run the apt-add-repository command and it should work!