[Eug-lug] Dos path= equivalent
Max Lemieux
max at lunarlogic.com
Tue Aug 3 05:48:52 PDT 2004
One last note: you can add a line like this to your .bash_profile (in your home
directory):
export PATH=$PATH:/sbin:/usr/sbin
which will set your $PATH variable to its previous value (preserving other
important paths) plus the /sbin and /usr/sbin folder.
Goes great with the "sudo" command (a whole 'nother can of worms.)
-Max
larry price wrote:
> there is;
> it's referred to as $PATH within the shell
> but it operates by slightly different rules than DOS
>
> you typically set it in your .profile or .bash_profile (or .cshrc if
> you are perverse)
>
> for the rest of this post we'll assume you are using the bash shell
> and follow the convention that
> a $ at the start of the line represents what you would type at the prompt.
>
> first off check to see if you currently have a PATH set
>
> $ echo $PATH
>
> If you get a blank line you have no PATH so you need to set one by
> setting the value of the PATH variable equal to a colon separated list
> of ddirectories
>
> $ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:~/bin
> $ export PATH
>
> note that there are no spaces anywhere in the variable declaration.
> the export line means that the variable is set in the environment and
> that child processes
> (any scripts you run any commands you execute) will inherit those values.
>
> take a look at your .bash_profile (or .profile) to make sure that your
> path is getting set at login.
>
> one thing you do want to avoid is setting . or .. in your path, doing
> so means that you will execute programs in either the current
> directory or the parent of the current directory, usually without
> intending to do so.
>
> On Mon, 2 Aug 2004 20:41:40 -0400 (EDT), Bill Essig <bill at rpgopher.com> wrote:
>
>>Hi, Im new. My name is Andrew. I have to type ./sbin/ifconfig or
>>/sbin/ifconfig etc. etc. In dos (shudder) there is a path variable where
>>you can type in a default path I.E. /sbin /usr/bin etc. so I dont have to
>>type the path or be in the directory. I dont know how I killed it, but it
>>won work anymore. Help?
>>
>>-Andrew
>>_______________________________________________
>>EUGLUG mailing list
>>euglug at euglug.org
>>http://www.euglug.org/mailman/listinfo/euglug
>>
>
>
>
More information about the EUGLUG
mailing list