LinuxQuestions.org
Review your favorite Linux distribution.
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 06-06-2012, 04:14 PM   #1
Eerie
LQ Newbie
 
Registered: Mar 2012
Distribution: Slackware 13.37 32-bit/win 7
Posts: 17

Rep: Reputation: Disabled
Add the xyz directory to your path (what path?)


I'm trying to install apache-ant at the moment and among the installation instructions is

"Add the bin directory to your path."

This isn't the first time I've come across this mysterious "path". What are they talking about?
should I just updatedb? do I have to put it in my fstab? what is required of me here?
 
Old 06-06-2012, 04:21 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.2, 15.0, current, slackware-arm-currnet
Posts: 6,135

Rep: Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819
They are talking about what directories the system will look through for your executable program.

The trick here is to find out what your 'path' is. The command is 'echo $PATH' enter the command without quotes in a terminal.

Here is what my system returns.

Quote:
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/java/bin:/usr/lib64/java/jre/bin:/usr/lib64/java/bin:/usr/lib64/kde4/libexec:/opt/kde3/lib64/qt3/bin:/opt/kde3/bin:/usr/lib64/qt/bin:/usr/share/texmf/bin:.
So, if the executable is in /usr/local/bin or /usr/bin or /usr/games and the list goes on, the command will be found. If it is not in one of these directories, I can either update the path, or put a symlink in the path to the executable.

Hope this helps.
 
1 members found this post helpful.
Old 06-06-2012, 04:30 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
As camorri said, the "path" is your PATH environment variable.

To add a directory to the path, stick the following in your startup script (depends on shell, for BASH it's usually ~/.bashrc):
Code:
export PATH=${PATH}:/path/to/new/directory
 
1 members found this post helpful.
Old 06-06-2012, 04:48 PM   #4
Eerie
LQ Newbie
 
Registered: Mar 2012
Distribution: Slackware 13.37 32-bit/win 7
Posts: 17

Original Poster
Rep: Reputation: Disabled
thanks that solves it.
 
  


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
[SOLVED] How to add a directory to PATH? wolfv Linux - General 2 01-26-2011 07:27 PM
Add directory to PATH JosephS Slackware 3 05-03-2008 10:17 AM
add a directory to PATH HarryBoy Linux - Newbie 5 05-02-2008 12:39 PM
Can't add directory to the PATH hpladd Linux - Newbie 5 07-25-2006 05:17 PM
I need to add a directory to the search path johnjafa Linux - Software 1 01-06-2005 01:43 PM

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

All times are GMT -5. The time now is 01:56 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
Open Source Consulting | Domain Registration