Find the answer to your Linux question:
Results 1 to 3 of 3
how to add a path to PATH variable permanently so that it remains persisent even after closing shell and rebooting the system when i added a path, to variable it ...
  1. #1
    Just Joined!
    Join Date
    Sep 2010
    Posts
    20

    appending a path to PATH variable permanently

    how to add a path to PATH variable permanently so that it remains persisent even after closing shell and rebooting the system
    when i added a path, to variable it remained there as long as i didn't closed the shell...........
    but when i reopened it ,changed were undone...........

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Typically this is done in your ~/.bash_profile. For example, in mine I have this PATH setting:
    Code:
    export PATH=$HOME/bin:$HOME/bin/chrome:${ORACLE_HOME}/bin:${PATH}
    Note that I embed PATH in ${} symbols so it will properly handle the recursive definintion of PATH.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Also, if you want to modify the PATH for all users, then you can edit the script /etc/profile.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...