Installation guide

Chapter 14. Frequently Asked Questions 137
The reason you need to use the ./ in order to start the application is because the executable wasn’t
placed in a directory where your user shell environment knew it could be found (such as /usr/bin).
In such instances, you have to change into the directory which holds the executable and start the
application from there. That means you will have to tell your shell where it can find the executable;
adding ./ tells your user shell that the executable can be found in the current working directory.
You can customize your settings so that you won’t be required to use the ./ each time. To do this,
you will have to edit your PATH variables.
14.4.1. Editing Your PATH
If you frequently start programs that are not located in a directory that your user shell has configured
by default, you will have to edit your user shell configuration file to add the directory containing
the executable you wish to run. You can do this by adding the directory to your PATH environment
variable.
Caution
These instructions are intended only for user accounts. Avoid modifying files such as the root user’s
.bash_profile, because of the potential security risks.
Start a text editor, such as pico, at a shell prompt. You can open the file called .bash_profile by
typing the following:
pico .bash_profile
You will see a PATH statement, similar to the one shown below.
PATH=$PATH:$HOME/bin:
To the end of this statement, add ./ as shown below:
PATH=$PATH:$HOME/bin:/usr/lib/:/home/user/directory/
Replace user with your user name and directory with the directory containing the executable
you wish to run.
Now, type [Ctrl]-[x]; you will be asked whether you want to save "the modified buffer" (that’s what
Pico calls an updated file); type [y] for "yes." Next, you will see the name the file will be saved as;
press the [Enter] key.
You can then make the changes to .bash_profile take effect immediately by typing the following
command:
source .bash_profile
By doing the above, you do not have to manually add ./ to the beginning of the executable to start an
application located in the directory you’ve added to your PATH.
14.5. Accessing a Windows Partition
I have a dual-boot system with Red Hat Linux and Windows 98. Is there a way to access my Windows
partition while I am running Linux?