You are not logged in.

#1 2006-11-26 11:53:10

ewl
Member
Registered: 2006-10-31
Posts: 24

PATH

I accidently deleted $PATH. I put the following in because they were obvious:
/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin

Are there any other directories that I should put in there? I googled this but couldn't find what the default path was for arch linux.

Offline

#2 2006-11-26 11:59:38

noriko
Member
From: In My Mind
Registered: 2006-06-09
Posts: 535
Website

Re: PATH

this envar generally depends on each system,
but, it would; be useful to add the,

sbin
bin

of every directory in
/opt

so, add i.e /opt/gnome/sbin
also, /opt/gnome/libexec

/sbin , i doubt it'd be /usr/bin/sbin


The.Revolution.Is.Coming - - To fight, To hunger, To Resist!

Offline

#3 2006-11-26 12:00:33

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: PATH

just reinstall bash and source /etc/profile.

Offline

#4 2006-11-26 12:04:28

filoktetes
Member
From: Skien, Norway
Registered: 2003-12-29
Posts: 287

Re: PATH

If you deleted $PATH by just writing unset PATH or PATH=, you can just run these:

. /etc/profile
. ~/.bashrc

And you'll be back, I suppose.
If you messed with the /etc/profile, you can just re-install bash. If you need the standard path right away, here it is:

export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin"

But depending on what programs you have installed, they put their own PATH entries in the /etc/profile.d directory. Some useful paths can be /opt/gnome/bin and /opt/kde/bin.

Offline

#5 2006-11-26 12:08:37

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: PATH

right but sourcing profile also sources the paths in profile.d/*

Offline

#6 2006-11-26 12:37:04

ewl
Member
Registered: 2006-10-31
Posts: 24

Re: PATH

filoktetes wrote:
export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin"

That's odd, I don't have a /usr/X11R6 directory. I hope that's not anything to worry about...

Offline

#7 2006-11-26 13:13:47

filoktetes
Member
From: Skien, Norway
Registered: 2003-12-29
Posts: 287

Re: PATH

No, you don't need to worry. /usr/X11R6 was the old path to the X binaries. Now it's just good old /usr. I don't know why the entry still lingers in the PATH, though.

Offline

#8 2007-03-22 22:09:04

anadyr
Member
Registered: 2005-02-10
Posts: 225

Re: PATH

I have a question on PATH... This is the output of export:

[rogier@anadyr ~]$ export
declare -x PATH="/bin:/usr/bin:/usr/bin:/usr/ucb"

But I cannot seem to find the config file where this information is stored
/etc/profile:

export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin

~/.bashrc does not include anything... Where is this config located?

Last edited by anadyr (2007-03-22 22:10:41)

Offline

#9 2007-03-22 22:24:03

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: PATH

The files in /etc/profile.d/ may add a path to the PATH variable.

Offline

#10 2007-03-22 22:41:58

anadyr
Member
Registered: 2005-02-10
Posts: 225

Re: PATH

That is not the case. I checked all the separate files.
I am particularly curious as to why /usr/bin is mentioned twice, and where /usr/ucb comes from... Any ideas?

BTW the actual problem is (was) that /sbin and /usr/sbin is not in the PATH... It seems that these two entries were removed when I started using xdm, and default runlevel 5 (in /etc/inittab)...

Last edited by anadyr (2007-03-22 22:43:20)

Offline

Board footer

Powered by FluxBB