How to permanently modify $PATH - Solaris

This is a discussion on How to permanently modify $PATH - Solaris ; In Solaris 9, I'm trying to modify the path. I use the following from Sun's Docs. PATH=/opt/sfw/bin:$PATH; export PATH This works until I reboot, but then my addition to the path is gone. How do I add it permanently? Thanks, ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: How to permanently modify $PATH

  1. How to permanently modify $PATH

    In Solaris 9, I'm trying to modify the path. I use the following from Sun's
    Docs.

    PATH=/opt/sfw/bin:$PATH; export PATH

    This works until I reboot, but then my addition to the path is gone. How do
    I add it permanently?

    Thanks,
    Mike



  2. Re: How to permanently modify $PATH

    On Sat, 20 May 2006, Mike wrote:

    > In Solaris 9, I'm trying to modify the path. I use the following from Sun's
    > Docs.
    >
    > PATH=/opt/sfw/bin:$PATH; export PATH
    >
    > This works until I reboot, but then my addition to the path is gone. How do
    > I add it permanently?


    You put it into your .profile.

    --
    Rich Teer, SCNA, SCSA, OpenSolaris CAB member

    President,
    Rite Online Inc.

    Voice: +1 (250) 979-1638
    URL: http://www.rite-group.com/rich

  3. Re: How to permanently modify $PATH

    Mike wrote:
    > In Solaris 9, I'm trying to modify the path. I use the following from Sun's
    > Docs.
    >
    > PATH=/opt/sfw/bin:$PATH; export PATH
    >
    > This works until I reboot, but then my addition to the path is gone. How do
    > I add it permanently?


    Put the line in your $HOME/.profile file if you use sh or rsh.
    Put the line in your $HOME/.bash_profile file if you use bash.

    See
    http://docs.sun.com/app/docs/doc/806...gfmsvrq?a=view
    for details (it's for Sol10 but applies to Sol9.)

  4. Re: How to permanently modify $PATH

    On Sat, 20 May 2006 11:49:32 -0700, Mike wrote:

    > In Solaris 9, I'm trying to modify the path. I use the following from Sun's
    > Docs.
    >
    > PATH=/opt/sfw/bin:$PATH; export PATH
    >
    > This works until I reboot, but then my addition to the path is gone. How do
    > I add it permanently?
    >


    Depending on your shell, if ksh,sh or bash , then edit ~/.profile and add
    the line

    If csh , then edit ~/.cshrc , and check the syntax for csh at
    http://docs.sun.com ('cos I can't remember it :-) )

    Or to make it for all user edit /etc/default/login and add to the PATH
    variable there

    HTH

    --
    Bruce

    "The internet is a huge and diverse community and
    not every one is friendly"
    http://www.ytc1.co.uk


  5. Re: How to permanently modify $PATH

    Thanks for the replies, that did it! (the file was named .dtprofile)

    -Mike


    "Bruce Porter" wrote in message
    newsan.2006.05.20.19.07.44.588916@ytc1NOARGEYSPAM.co.u k...
    > On Sat, 20 May 2006 11:49:32 -0700, Mike wrote:
    >
    >> In Solaris 9, I'm trying to modify the path. I use the following from
    >> Sun's
    >> Docs.
    >>
    >> PATH=/opt/sfw/bin:$PATH; export PATH
    >>
    >> This works until I reboot, but then my addition to the path is gone. How
    >> do
    >> I add it permanently?
    >>

    >
    > Depending on your shell, if ksh,sh or bash , then edit ~/.profile and add
    > the line
    >
    > If csh , then edit ~/.cshrc , and check the syntax for csh at
    > http://docs.sun.com ('cos I can't remember it :-) )
    >
    > Or to make it for all user edit /etc/default/login and add to the PATH
    > variable there
    >
    > HTH
    >
    > --
    > Bruce
    >
    > "The internet is a huge and diverse community and
    > not every one is friendly"
    > http://www.ytc1.co.uk
    >




  6. Re: How to permanently modify $PATH

    Mike wrote:
    > In Solaris 9, I'm trying to modify the path. I use the following from Sun's
    > Docs.
    >
    > PATH=/opt/sfw/bin:$PATH; export PATH
    >
    > This works until I reboot, but then my addition to the path is gone. How do
    > I add it permanently?
    >
    > Thanks,
    > Mike


    Modify PATH setting in /etc/default/login with the "default" settings
    you wish system wide.

    CJ


+ Reply to Thread