How to add usr/local/bin to path environment variable on ubuntu 12.0.4?

53,971

Solution 1

You can add this to your ~/.bashrc file:

PATH=$PATH:/usr/local/bin

If you don't know how, you can just execute this line in a Terminal:

echo "PATH=\$PATH:/usr/local/bin" >> ~/.bashrc

You can also check what's in your PATH by typing in the Terminal

echo $PATH

Solution 2

for the current terminal session, you can:

export PATH=$PATH:/usr/local/bin

For a more permanent solution, edit ~/.bashrc and add the line above

Share:
53,971
Omer Raja
Author by

Omer Raja

Updated on July 10, 2022

Comments

  • Omer Raja
    Omer Raja almost 2 years

    I have just installed ruby.1.8.6 on Ubuntu 12.0.4.

    I am learning ruby out of a book and after the installation process it says

    "Once it's completed, you should add /usr/local/bin to your PATH environment variable. I'll assume that, being a Linux user"

    And I'm stuck as the guy has a wrong assumption.

    How do I add usr/local/bin to the path environment variable?