Home How to permanently set $PATH on Linux/Unix? Reply: 0 # How to permanently set$PATH on Linux/Unix?

user4634
1#
user4634 Published in September 19, 2018, 7:29 pm

I'm trying to add a directory to my path so it will always be in my Linux path. I've tried:

export PATH=\$PATH:/path/to/dir


This works, however each time I exit the terminal and start a new terminal instance, this path is lost, and I need to run the export command again.

How can I do it so this will be set permanently?