Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-22-2004, 09:04 AM   #1
LQ Newbie
Registered: Feb 2004
Location: Singapore
Distribution: Redhat 7.2
Posts: 2

Rep: Reputation: 0
Unhappy How to set path environment?

Hi all,

I'm running on Redhat Linux 7.2 and very new to Unix command.
I had just downloaded Network Simulator 2.26.

I need to set this path "/home/junior/ns-allinone-2.26/bin", so that everytime I log in, I can start using my Network Simulator program.

How do I point my current path to this directory?

I understand that I need to modify my .bash_profile.
I can see .bash_profile when I do "ls -a", but how do I edit/open the content inside .bash_profile?

I did tried the following:


But it still doesn't help. How do I use the commands "set path" and "export" to get the path going?

I had been struck at this for the past 2 weeks, please help....

Old 02-22-2004, 10:08 AM   #2
LQ Newbie
Registered: Jul 2002
Location: Austria - Salzburg
Distribution: gentoo
Posts: 20

Rep: Reputation: 0
you don't need to set a PATH to run your program. just type:

/home/junior/ns-allinone-2.26/bin/<your binary here>

if you want to do it in a more "clever" way, you'd better create a /home/junior/bin directory, create a link to every executable you want to be able to run from anywhere into that directory and set the PATH variable to /home/junior/bin.

in your .bash_profile (usually it's only .bash or .profile, but that might be different on a redhat system) write:

export PATH
Old 02-22-2004, 10:10 AM   #3
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
what command line are you using ?

if its bash, edit the file $HOME/.bash_profile
Old 02-23-2004, 08:35 AM   #4
LQ Newbie
Registered: Feb 2004
Location: Singapore
Distribution: Redhat 7.2
Posts: 2

Original Poster
Rep: Reputation: 0

I'm using bash as the command in Linux 7.2.

Sorry, I'm really new with this...what do you mean by <your binary here>?
/home/junior/ns-allinone-2.26/bin/<your binary here>

I manage to open my .bash_profile by using "view .bash_profile" command.
Inside the script reads....


Should I edit the above to be......?

How do I save whatever I type in the .bash_profile and make sure it points here the next time I log in?

I did tried to type the above in, but don't know how to save and get out of the program.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Set the path systemwide/Set the path for a user with Slackware jayhel Slackware 1 06-12-2005 01:24 AM
Universal Environment Path SET apocolpse Linux - Newbie 1 10-16-2004 03:56 AM
How to set PATH and CLASSPATH environment variables bronko Linux - Newbie 2 12-20-2003 12:13 PM
How to set PATH How do I set PATH environment variable? Tranquil Linux - Newbie 3 11-02-2003 03:52 AM
Changing environment path. JMC Linux - General 1 05-04-2002 04:50 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:30 AM.

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