art's abode

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

One Response to 'Modifying your $PATH'

Subscribe to comments with RSS or TrackBack to 'Modifying your $PATH'.

  1. […] may wish to read about modifying your $PATH, so that you don’t need to specify the full path to run your […]

Leave a Reply