Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know many people have asked about environment variables before, but I am having a hard time dealing with these paths while ensuring I don't mess around with the original settings. How would you go about executing these commands in Ubuntu in terms of environment variables? Thanks in advance!

Please put /home/stanley/Downloads/ns-allinone-2.34/bin:/home/stanley/Downloads/ns-allinone-2.34/tcl8.4.18/unix:/home/stanley/Downloads/ns-allinone-2.34/tk8.4.18/unix into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /home/stanley/Downloads/ns-allinone-2.34/otcl-1.13, /home/stanley/Downloads/ns-allinone-2.34/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 If you are using sh, you can set it like: export LD_LIBRARY_PATH=

(2) You MUST put /home/stanley/Downloads/ns-allinone-2.34/tcl8.4.18/library into your TCL_LIBRARY environmental variable. Otherwise ns/nam will complain during startup.

share|improve this question
1  
If you simply use the export command the env variables will reset to normal when you reset your computer. –  Nick Jun 2 '10 at 7:24
add comment

1 Answer

up vote 2 down vote accepted

If you're using sh based shells, one of which seems to be default in ubuntu, type the following commands and you'll be fine:

export PATH=/home/stanley/Downloads/ns-allinone-2.34/bin:/home/stanley/Downloads/ns-allinone-2.34/tcl8.4.18/unix:/home/stanley/Downloads/ns-allinone-2.34/tk8.4.18/unix:$PATH

export LD_LIBRARY_PATH=<Path to X libraries>

export TCL_LIBRARY=/home/stanley/Downloads/ns-allinone-2.34/tcl8.4.18/library

None of these is persistent, and will be lost as soon as you close the terminal. So you'll have to enter them again. You can add them to your .bashrc/.bash_profile/.profile if you want them to be persistent.

share|improve this answer
    
I couldn't find .bashrc folder on my profile on Ubuntu. Where is it? –  stanigator Jun 2 '10 at 17:14
    
Its a file in your home folder. If you open terminal and type ls $HOME/.bashrc, you'll see it. Or you could show hidden files in the nautilus and double click on .bashrc in your home folder. All this is assuming that it already exists. If it doesn't, try with the other files I mentioned. –  user18151 Jun 3 '10 at 6:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.