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

How to permanently set $PATH on Linux/Unix?

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?

share|improve this question

20 Answers 20

active oldest votes
up vote 761 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.414132 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO