LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 08-18-2011, 04:41 AM   #1
ronald1234
LQ Newbie
 
Registered: Aug 2011
Posts: 2

Rep: Reputation: Disabled
Question adding directory to $PATH using bash..and fine .bash_profile


To begin a directory of bash scripts you would like to use regularly (such as trash). You can then add the name of that directory to your $PATH by following the instructions given below. Doing so will allow the scripts therein to be available to you regardless of which directory you are currently working in.

To add a directory to your path, look for a file named .bash_profile in your home directory. It is a bash script that is run automatically when you log in. It should contain a line that defines the variable PATH. Note that the value assigned to this variable is a list of directories, delimited by colons. You can add your new script directory to your path by adding it to the end of this list. (That will cause bash to check your scripts directory after checking the others when search for programs to run.)

please help me to this problem i am really new in ubuntu and about bash..

Last edited by ronald1234; 08-18-2011 at 04:44 AM.
 
Old 08-18-2011, 05:00 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,552

Rep: Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898
So I see a lot of information telling you exactly what to do ... what is your question? Do you not know hot to edit a file?
 
0 members found this post helpful.
Old 08-19-2011, 11:45 AM   #3
ronald1234
LQ Newbie
 
Registered: Aug 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Smile reply

a little bit..my question is how to code this kind of problem in bash? please help me.. or if you don't want to.. just algorithm ..thanks
 
Old 08-19-2011, 02:23 PM   #4
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
it seems to me you want your own 'startup scripts' (like maybe in windows autoexec.bat) ?
It would be easier for one to help if you make a question, not just writing a letter :-)
 
Old 08-21-2011, 05:17 AM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,552

Rep: Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898
So where does this original question come from?
 
  


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
adding directory to the path threaderslash Programming 1 04-02-2009 01:45 AM
Adding a directory to root's path muneer1st Linux - Newbie 6 09-08-2008 04:07 AM
Adding a Path to .bash_profile nexisrocks Linux - Newbie 4 06-20-2007 08:54 PM
Adding directory to $PATH uv2005 Linux - Newbie 2 03-17-2006 09:39 AM
Adding Java to my path in the .bash_profile file .... jmax24 Linux - General 5 04-20-2004 02:14 PM

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

All times are GMT -5. The time now is 10:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration