LinuxQuestions.org
Visit Jeremy's Blog.
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 12-13-2004, 12:36 PM   #1
cain_eve
Member
 
Registered: Nov 2004
Posts: 93

Rep: Reputation: 15
how to set path? here a meet the problem with ns2 installation


Hi, I just install network simulator 2. The process is so long and at the end It shows something I must do. I think it is like to set a PATH for java in windows. But I don't know how to command.
The screem of final result is as follows,
Please put /usr/local/src/ns-allinone-2.27/bin:/usr/local/src/ns-allinone-2.27/tcl8.4.5/unix:/usr/local/src/ns-allinone-2.27/tk8.4.5/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES:

(1) You MUST put /usr/local/src/ns-allinone-2.27/otcl-1.8, /usr/local/src/ns-allinone-2.27/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH <paths>
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>

(2) You MUST put /usr/local/src/ns-allinone-2.27/tcl8.4.5/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.

(3) [OPTIONAL] To save disk space, you can now delete directories tcl8.4.5
and tk8.4.5. They are now installed under /usr/local/src/ns-allinone-2.27/{bin,include,lib}

After these steps, you can now run the ns validation suite with
cd ns-2.27; ./validate
 
Old 12-13-2004, 12:39 PM   #2
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
In a generic way, if you want to add somthing to your path you can do this (bash):

Code:
export PATH=$PATH:/new/path/to/add/here/
You may want to add a line like that to your ~/.bashrc file so your path will be set up correctly all the time.
 
Old 12-13-2004, 01:38 PM   #3
cain_eve
Member
 
Registered: Nov 2004
Posts: 93

Original Poster
Rep: Reputation: 15
Thanks visaris
I dont't know what's the meaning of /.bashrc
what is this file useful and where can I find it or just creat a new one under root or the ns2file?

cain
 
Old 12-13-2004, 01:45 PM   #4
cain_eve
Member
 
Registered: Nov 2004
Posts: 93

Original Poster
Rep: Reputation: 15
by the way, what is and what is the differences of csh and sh?
where is the location of LD_Library_PATH and TCL_LIBRARY?
many thanks
 
Old 12-13-2004, 01:46 PM   #5
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
The file '.bashrc' is a file that contains commands which are to be run automatically after bash starts up. For example, if your username is "foo" and you placed

Code:
echo 'Welcome to Linux, foo!'
at the end of your /home/foo/.bashrc file, you would be greeted by "Welcome to Linux, foo!" every time you logged in or started a new xterminal.

Once you have your export lines set up correctly, you can place them in your user's ~/.bashrc file, and then everytime you start a new xterm, the required environment variables will be set up for you, and you can then run your ns2 or whatever.
 
Old 12-13-2004, 02:02 PM   #6
cain_eve
Member
 
Registered: Nov 2004
Posts: 93

Original Poster
Rep: Reputation: 15
seems more clear
so the filename is just .bashrc
when I install a new system there is no such file yet?
as I'm a beginner
I will search for some similar thread.
thanks.

cain
 
Old 12-13-2004, 02:03 PM   #7
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
LD_Library_PATH and TCL_LIBRARY are environment variables just like PATH is. To get a list of all your current variables and their values type in 'env'.

To set a variable to a value do:
Code:
export YOUR_VAR_HERE=your_value_here
To add something to the end of a variable do:
Code:
export YOUR_VAR_HERE=$YOUR_VAR_HEREyour_value_to_add_here
 
Old 12-13-2004, 02:10 PM   #8
cain_eve
Member
 
Registered: Nov 2004
Posts: 93

Original Poster
Rep: Reputation: 15
Oh I see
HOME=/root
BASH_ENV=/root/.bashrc
LOGNAME=root
the file is hide?
 
Old 12-13-2004, 02:11 PM   #9
cain_eve
Member
 
Registered: Nov 2004
Posts: 93

Original Poster
Rep: Reputation: 15
how to see hide file?
 
Old 12-13-2004, 02:14 PM   #10
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
Well, the environment variables aren't really stored in a file. At least, I don't think so. They are stored in your shell's memory. Sort of like internal values/settings.

If you're asking about the .bashrc file, that is hidden from the ls output. To find all the '.' files do a "ls -al" and that should list all of them. If you do not have a .bashrc file, you can always make one.
 
Old 12-13-2004, 02:23 PM   #11
cain_eve
Member
 
Registered: Nov 2004
Posts: 93

Original Poster
Rep: Reputation: 15
Oh I read the ls man file.
Your replies are very important to me. Thanks a lot.
 
Old 12-16-2004, 05:31 PM   #12
boydasilva
LQ Newbie
 
Registered: Nov 2004
Location: Manchester
Distribution: Suse 10.0
Posts: 27

Rep: Reputation: 15
Don't mean to hijack here, but is there any way to remove a path once it has been exported in the .bashrc file? I've made a mistake and I don't seem to be able to change it.
 
Old 12-16-2004, 06:09 PM   #13
cain_eve
Member
 
Registered: Nov 2004
Posts: 93

Original Poster
Rep: Reputation: 15
I think just modify the .bashrc file
vi .bashrc
and remove the export line
 
  


Reply


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
NS2.26/TCP installation error? japz20 Linux - Newbie 6 01-16-2013 04:27 AM
NS2 installation eby83 Linux - Newbie 2 06-11-2007 02:08 AM
Set the path systemwide/Set the path for a user with Slackware jayhel Slackware 1 06-12-2005 01:24 AM
set path problem solved lfur LinuxQuestions.org Member Success Stories 1 02-27-2005 06:08 PM
How to set PATH How do I set PATH environment variable? Tranquil Linux - Newbie 3 11-02-2003 03:52 AM


All times are GMT -5. The time now is 07:28 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration