| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Environment Variables On login or starting a new shell, the system sets up a number of environment variables for the shell. These can be viewed by using the command set and piping it to less: set |less This will pipe the list of the environment variables into the less command so it they can be viewed a screen at a time. A couple of the important variables are worth noticing. The first variable is the PATH variable. Its contents can be viewed by typing: echo $PATH The $ in front of the variable name tells the command echo, to get the contents of the variable and send this to the standard output (the screen). This variable contains the set of directories that are to be searched for commands that are entered on the command line. Typically, users do not have the directories /sbin and /usr/sbin in their path variable since these contain administration commands. If the average user types the command ifconfig which is found in the /sbin directory they will get a response of command not found. This can be remedied by either typing the full path for the command or adding the /sbin directory to the path variable in the following manner: PATH=$PATH:/sbin Now if just ifconfig is entered, the shell will be able find the command. Other directories can be added to the path variable in a similar fashion. This could be something else that one might want add into their .bashrc file if they frequently execute commands in other directories.
Home - Table Of Contents - Contact Us CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com Version 1.0 - Version Date: March 29, 2005 Adapted with permission from a work created by Tcat Houser et al. CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||