LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-28-2004, 02:16 PM   #1
jesus_edu
LQ Newbie
 
Registered: Mar 2004
Location: Darmstadt, Germany
Distribution: Suse 9.0
Posts: 29

Rep: Reputation: 15
Question change PATH variable in Suse 9.0


hello!
I'm relatively new to Linux, I bought Suse 9.0, and I am trying to learn as much as possible.
I would like to modify my PATH variable, i tried to write on the console PATH=$PATH:/:.
it was okay, but then I closed the console, then opened another one, and the PATH variable was still the old one. How can I change the default PATH variable?
Thanks
 
Old 03-28-2004, 02:43 PM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
There are several places that variables can be set. Globally (for all users) you could put the line
export PATH=/whatever/
in the file /etc/profile or for each user you can put it in the file .bash_profile or .bashrc in the users home folder. The dot in front of the name makes the file a hidden file.
 
Old 03-28-2004, 04:29 PM   #3
jesus_edu
LQ Newbie
 
Registered: Mar 2004
Location: Darmstadt, Germany
Distribution: Suse 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
i went to this file you told, and I found the following commentary at the beginning:
# PLEASE DO NOT CHANGE /etc/profile. There are chances that your changes
# will be lost during system upgrades. Instead use /etc/profile.local for
# your local settings, favourite global aliases, VISUAL and EDITOR
# variables, etc ...
I then tried to look for /etc/profile.local, but that file doesn't exist. What must I do?
 
Old 03-28-2004, 06:56 PM   #4
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
type, as root, "$EDITOR /etc/profile.local" (creating a new file), and add your commands.

Truthfully, though, this warning isn't a serious one. You can still edit the original files. They're just mentioning this because if you do any major upgrade your global files may be overwritten.
They say the same thing for other configuration files as well, but I think they assume most people are using their GUI tools and don't know how to edit a text file.
 
Old 03-28-2004, 07:00 PM   #5
jesus_edu
LQ Newbie
 
Registered: Mar 2004
Location: Darmstadt, Germany
Distribution: Suse 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
and what commands should I write on the profile.local?
thanks for your help..
 
Old 03-29-2004, 09:33 AM   #6
Mr.Radar
LQ Newbie
 
Registered: Feb 2003
Posts: 26

Rep: Reputation: 15
profile.local is probably just interpreted as a shell script (list of commands) when Bash is starting up. I'd imagine that it's be something like
Quote:
#profile.local
#local system settings

#add / to the PATH variable
PATH=$PATH:/
export PATH
The lines with # in the front are comments that Bash ignores while processing this file.

Last edited by Mr.Radar; 03-29-2004 at 09:36 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change $PATH enviroment variable bglnelissen Linux - Software 2 11-03-2004 06:55 AM
PATH variable on SuSE 9.1 sbk Linux - Distributions 3 08-05-2004 02:13 AM
SuSE 9.1, brand new installation, PATH seems to change ptp Linux - Distributions 1 06-09-2004 10:05 AM
$path variable ? moby Linux - Newbie 3 06-01-2004 03:18 PM
I cannot change my PATH$ variable KptnKrill Linux - Newbie 6 08-17-2003 03:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration