Learn how to permanently set $PATH on Linux/Unix.
You can set the PATH environment variable, using the following command.
export PATH=$PATH:/path/to/my/binary/file/
However, each time you exit the terminal or SSH session, and start a new terminal session, this PATH is lost. You have to run the same command again to recover the path. How can you permanently set this path?
Here are the step on how to resolve it.
1) cd ~
2) sudo nano .bashrc
3) Add the following line at the very bottom of file .bashrc.
export PATH=$PATH:/usr/local/go/bin
4) Save the .bashrc and exit.
5) ctrl + D to exit the terminal
6) Log back again.
#linux #ubuntu #path
How to permanently set $PATH on Linux/Unix
Теги
linuxubuntuPATHexit the terminal or SSH sessionHow to permanently set $PATH on Linux/Unixlinux set path permanently all usersexport path permanentlylinux add to path permanently ubuntuexport path linuxlinux path commandpath in linuxexport path permanently machow to set path in unixHow do I permanently set a PATH variable in Linux?How do I set the PATH for all users in Linux?How can I set PATH permanently in Ubuntu?What is $PATH in Linux?