LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-21-2005, 10:22 AM   #1
pingu99
LQ Newbie
 
Registered: Dec 2005
Location: Brazil, Porto Alegre
Posts: 6

Rep: Reputation: 0
newbie question : how to edit bashrc


ok, I'm very new to Linux, so my question is very stupid.

I just installed a program called AVS in my redhat 9. All I want to do is to be able to write AVS from anywhere, using the terminal, and the program AVS will run, without having to tell the path averytime i run.

I know this has something to do with .bashrc files, but I'm having trouble finding it out.

Thanks in advance.
 
Old 12-21-2005, 10:38 AM   #2
sirclif
Member
 
Registered: Sep 2004
Location: south texas
Distribution: fedora core 3,4; gentoo
Posts: 192

Rep: Reputation: 30
yea, you can set up .bashrc to add the directory the AVS program is sitting in to you path. if the full pathname for AVS is /home/usr/somedir/AVS, add this line to you .bashrc

PATH=$PATH:/home/usr/somedir/AVS

you could export this, allowing the updated path to be seen by any subshells you spawn, the above line would then become

export PATH=$PATH:/home/usr/somedir/AVS

if you're new, this probably wont make any difference to you.
 
Old 12-21-2005, 11:44 AM   #3
pingu99
LQ Newbie
 
Registered: Dec 2005
Location: Brazil, Porto Alegre
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you.
 
Old 12-21-2005, 01:41 PM   #4
wrj
Member
 
Registered: Aug 2003
Location: Canada/US
Distribution: Ubuntu, Arch
Posts: 84

Rep: Reputation: 15
sirclif is correct, but I would like show you another way to do it.

You could create a soft link from your executable to /usr/bin/
/usr/bin should already be in your PATH.

This should do it:
ln -sfn /home/usr/foo /usr/bin/
 
Old 12-21-2005, 08:45 PM   #5
sirclif
Member
 
Registered: Sep 2004
Location: south texas
Distribution: fedora core 3,4; gentoo
Posts: 192

Rep: Reputation: 30
of course, that is a better way, i don't know what i was thinking. thats what i do for all the programs that i write myself. if there is only one executable, this would be a better way to do it. if there were say, 10 different executables associated with the program, then you would want to add it to your path.
 
Old 10-26-2010, 07:22 PM   #6
Savalan
LQ Newbie
 
Registered: Oct 2010
Posts: 3

Rep: Reputation: 0
Question Did I do the right thing?!

Well Iḿ a newbie as you can surely say... Iḿ trying to make an application called [ns-2] work
I wonder if I did the right thing, I created a directory called [Applications] in my HOME directory, extracted the tar right there in the Application folder and installed ns2 and then added the following lines to the very end of </etc/skel/.bashrc> file:

# Setting Environment Variables For ns2

PATH=$PATH:/home/sav/Applications ; export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/home/sav/Applications/ns-allinone-2.34/otcl-1.13:/home/sav/Applications/ns-allinone-2.34/lib ; export LD_LIBRARY_PATH
TCL_LIBRARY=$TCL_LIBRARY:/home/sav/Applications/ns-allinone-2.34/tcl8.4.18/library ; export TCL_LIBRARY

now, why doesnt it change the PATH Environment Variables permanently? and is it ok to add Applications folder to PATH instead of adding some subdirectories inside of Applications/ns2 to PATH Env. Var.?
 
  


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
Apache edit question cmowl Linux - Security 2 10-11-2005 05:21 AM
edit question slackware flira Slackware 4 05-29-2004 05:05 AM
Xchat - Can't edit events.... (newbie) anonamos Linux - Software 0 04-19-2004 08:52 PM
.bashrc question aizkorri Programming 6 08-14-2002 06:41 AM
Question on .bashrc Fluke Linux - Newbie 2 06-29-2002 01:40 PM


All times are GMT -5. The time now is 02:11 PM.

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