Posted on April 24, 2013

What is $PATH ?

It’s the system wide variable used to find binaries. So it’s quite important and useful ;-)

Management ?

When you install new software in your /opt or from source, in many cases, the installer tells you to add in your ~/.bashrc or ~/.profile something like

export PATH=/going/somewhere:$PATH

and your bash config files become ugly in just a few weeks…

But there is another way !

In your /etc there is a /etc/paths file with just one path per line and a /etc/paths.d/ directory with one file per program. It adds all these dir to the $PATH automatically whithout uglifying your .bashrc or your .profile.

When order matters

Just use numbers at the beginning of file names :-)

Very few people know about that, but it’s clean and useful.

comments powered by Disqus

Find me

on linkedin

on github

mail me

I'm the CEO of Clever Cloud but this blog is just mine.

All the posts

Share the page

Site proudly generated by Hakyll