You are not logged in.

#1 2005-10-03 13:08:53

Southern_Trendkiller
Member
Registered: 2005-09-27
Posts: 31

$PATH - trouble

I have to set the $PATH variable to also include /opt/games.

How do i do that?

I tried adding
export $PATH="/opt/games" to my .bashrc, but that just gives me some errors. Can anybody tell me what i've done wrong?

Southern_Trendkiller

Offline

#2 2005-10-03 13:42:00

fdrebin
Member
Registered: 2005-04-25
Posts: 152

Re: $PATH - trouble

i think another way to edit your PATH is to add it to the /etc/profile - file

Offline

#3 2005-10-03 13:49:14

Southern_Trendkiller
Member
Registered: 2005-09-27
Posts: 31

Re: $PATH - trouble

Thanks man, that was just the file i was looking for  big_smile
Everything is working the way i want it, now.

Thanks again!
smile

Offline

#4 2005-10-03 13:52:49

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,837

Re: $PATH - trouble

Wherever you do it, the command is

export PATH="/foo:/bar: (etc)"

Note no $ sign.

Offline

#5 2005-10-03 16:59:34

sh__
Member
Registered: 2005-07-19
Posts: 271

Re: $PATH - trouble

Southern_Trendkiller: your first attempt overrides the PATH variable completely. To add /opt/games to your path, the way to do it in bash is

export PATH="$PATH:/opt/games"

Offline

#6 2005-10-04 05:03:10

Southern_Trendkiller
Member
Registered: 2005-09-27
Posts: 31

Re: $PATH - trouble

oh... i was unaware of the fact that i was overriding the PATH variable that way. Thanks for pointing it out.

Offline

#7 2006-02-07 00:38:45

RaLX
Member
Registered: 2005-10-17
Posts: 54

Re: $PATH - trouble

Hi, I'm just trying to set the PATH too, but I think this way will modify the PATH globally isn't?, what if I want to modify the PATH for my User account only, where I need to do it?

Thanks.

Offline

#8 2006-02-07 01:01:16

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Offline

Board footer

Powered by FluxBB