How can I edit the $PATH on linux?

To permanently store your path, you have a few options.

I suggest you read the Ubuntu community wiki on Environment Variables but the short answer is the best place is ~/.profile for your per-user PATH setting or /etc/profile for global settings.

Do something like export PATH=$PATH:/your/new/path/here


PATH=$PATH:newPath1:newPAth2
export PATH

You can also put this in the global environment:

sudo emacs /etc/environment

Append to the entries already in your path

PATH="/path/to/file:/other/paths"

Reload the environment

source /etc/environment