Results 1 to 3 of 3

Thread: setting PATH environment variable

Hybrid View

  1. #1
    Member omidkamangar's Avatar
    Join Date
    Mar 2006
    Location
    Kurdistan
    Posts
    239

    setting PATH environment variable

    Hi,
    I want to add a new directory to the PATH environment variable on my FC6.
    I usually do it by editing the .bash_profile file in the /home/omid (my user) directory and adding this:
    Code:
    PATH=$PATH:/new_folder_path
    export PATH
    where new_folder_path is the path of the folder to add.
    Is there anyway to add this folder to the PATH environment variable permanently?
    This will be over soon, and then I can ...

  2. #2
    Member
    Join Date
    Jan 2007
    Location
    Adelaide, Australia
    Posts
    112

    Post RE: setting PATH environment variable

    To set the environment variable for you only, (user omid), place your code
    Code:
    PATH=$PATH:/new_folder_path
    export PATH
    into your .bash_profile file in your home directory. To make it system wide place it in /etc/profile
    Try this page, it seems to explain it fairly well

    I tend to avoid editing /etc/profile as much as I can as it is fairly easy, (for me), to screw up the operating system, whereas in your .bash_profile the worst you can do is screw up your account!

  3. #3
    Member omidkamangar's Avatar
    Join Date
    Mar 2006
    Location
    Kurdistan
    Posts
    239
    Thanks mechdave I wont modify /etc/profile, I just wanted to learn that way too.
    This will be over soon, and then I can ...

Similar Threads

  1. set mysql variable using command
    By svar in forum Windows - General Topics
    Replies: 0
    Last Post: 01-02-2009, 05:53 PM
  2. Setting Path in Mandrake
    By CP in forum Linux - General Topics
    Replies: 4
    Last Post: 03-21-2003, 04:10 AM
  3. Upgrading and setting PATH
    By trickster in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 09-01-2002, 05:45 PM
  4. Add to Evniron Variable?
    By WarLockLord in forum Linux - Software, Applications & Programming
    Replies: 9
    Last Post: 07-14-2002, 09:28 AM
  5. c++ variable scope
    By t048 in forum Linux - Software, Applications & Programming
    Replies: 4
    Last Post: 05-31-2002, 02:43 AM

Bookmarks

Posting Permissions

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