Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Applications > Issue <<  27 of 141 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 4174
Last update: 11-02-04
Issue:
What exactly is meant by the "Command Path" when trying to execute programs?
Resolution:
If you put an executable program on your filesystem, and ask to execute somewhere else in your filesystem

For example, you put a program named 'an_executable' in a hypothetical directory '/programs' and you are in the directory '/data', and you type 'an_executable' in the command line, then the program 'an_executable' will only run if the directory '/programs' is the PATH.

The PATH is already set to include the following directories:

 
/usr/bin/
/bin/
/usr/local/bin/
 


If you want to see a full list, you can run the command:
set | grep PATH
-or-
 echo $PATH
If you want to add a new directory to the PATH, you can edit the .bash_profile in a users home directory. This file executes when you log in and sets the PATH with the following line:

 
PATH=$PATH:$HOME/bin
 


If you want to add a new directory to the path (e.g. '/programs'), then you will change the above line to read

 
PATH=$PATH:$HOME/bin:/programs
 


(Notice the colon ':' between the directories)

The PATH now includes the directory '/programs' the next time you log in to the system.


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Applications > Issue <<   27  of  141  >>