Results 1 to 9 of 9

Thread: Path

Hybrid View

  1. #1
    mugs
    Guest

    Path

    Where and how do you modify the path? Thanks.

  2. #2
    KenHan
    Guest

    Re:Path

    I'm gonna try and help you on this one, I think you can display your path using "echo $path" but I know for sure that the command "declare" will print out your total environment (have to scroll back a bit to see the path statement).

    And then you can add/set using the "export" command if I don't remember wrong ..

    :

    hope it helps..

    have a nice day bud..
    //KenHan

  3. #3
    mugs
    Guest

    Re:Path

    Thanks. Declare worked, but echo path didnt. But, I would like to know where I can find the path, which file it is contained in. Everything I saw, I tried, but it wasnt in any of the places it was supposed to be.

    Now, I will try to figure out how to add to my path.

  4. #4
    mugs
    Guest

    Re:Path

    I tried export, and go this:

    mugs@linux:~> export PATH =$PATH: /usr/local/kde/bin
    bash: export: `=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/opt/kde2/bin:/usr/openwin/bin:/usr/lib/SmallEiffel/bin:/usr/lib/java/bin:/opt/gnome/bin:/opt/pilotsdk/bin:': not a valid identifier
    bash: export: `/usr/local/kde/bin': not a valid identifier
    mugs@linux:~>

  5. #5

    Re:Path

    Quote Originally Posted by mugs
    I tried export, and go this:

    mugs@linux:~> export PATH =$PATH: /usr/local/kde/bin
    this should be export PATH=$PATH:/new/path
    no spaces
    whatdoyougetwhenyoumultiplysixbynine??

  6. #6
    mugs
    Guest

    Re:Path

    Thanks, Alastair, that did it. I still would like to find the file that contains the path... ???

  7. #7
    Aaron_Adams
    Guest

    Re:Path

    The PATH is actually just an enivronmental variable which is constructed by various runlevel scripts.

    If you take a look at /etc/profile (Not sure on RH?) it will have various sections which construct the PATH, some based off of user ID I believe. Also, (again, not sure in RH), there are various scripts in /etc/profile.d which add values to the PATH.

    Just so you know, if you want to view an environmental variable, you can use echo, but you must use $PATH, because it is case sensitive.

    Using echo in export commands is useful for doing things quickly like:

    export PATH=$(echo $PATH | sed -e 's/:.:/:/g' s/::/:/g')

    This will delete any occurance of . or :: from the PATH.

    If you're interested further you can always take a look at the bash manual.

  8. #8

    Re:Path

    you can also do a user-specific change by adding the line to ~/.bashrc , just below thie line that says user specific aliases ro something to that effect
    whatdoyougetwhenyoumultiplysixbynine??

  9. #9
    JimH
    Guest

    Re:Path

    Red Hat sets the path in various places.

    changes effect all users
    /etc/profile
    /etc/profile.d

    change for a specific user only.
    ~/.bash_profile

    Jim H

Similar Threads

  1. Export PATH
    By vwgtiturbo in forum Linux Distros
    Replies: 9
    Last Post: 07-30-2004, 10:26 PM
  2. Add to PATH
    By trickster in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 09-28-2002, 10:26 PM
  3. Include in path?
    By mmiller9 in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 08-06-2002, 10:47 PM
  4. Superuser Path
    By WarLockLord in forum Linux - Software, Applications & Programming
    Replies: 30
    Last Post: 07-20-2002, 02:39 AM
  5. Path question
    By PatC in forum Redhat / Fedora
    Replies: 3
    Last Post: 07-10-2002, 11:14 PM

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
  •