Red Hat Enterprise Linux > Applications > Issue
<<
27 of 141
>>
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:
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.
Red Hat Enterprise Linux
>
Applications
> Issue
<<
27
of
141
>>