art's abode

art.csoft.net

Archive for the ‘$PATH’ Category

Modifying your $PATH

with one comment

… is handy so that you don’t have to type ~/usr/bin/someapp, for instance, if you’ve installed something it under your home directory using ./configure ––prefix=~/usr (naturally this works no matter what your path is).

Most shells support .profile. The system settings for the shell might be found in /etc/profile, for instance; user-specific profiles are stored in their home directories, i.e., /home/art/.profile. Edit this file in your favorite browser.

Append the following, modifying it to suit your needs:

export PATH=~/usr/bin:$PATH

Take note that the PATH variable prioritizes by order. So, according to the above line, if there is /home/art/usr/bin/cat, and /bin/cat, the path specified before (here, /home/art/usr/bin/cat) will take precedence.

Written by art

November 7th, 2007 at 12:26 am

Posted in $PATH,shell