To make a change to your prompt permanent, add the value of PS1 to your .bashrc file in your
home directory (assuming that you are using the bash shell). There may already be a PS1 value in
TIP
58
Linux First Steps Part I
that file that you can modify. Refer to the Bash Prompt HOWTO (www.tldp.org/HOWTO/Bash-
Prompt-HOWTO) for information on changing colors, commands, and other features of your bash
shell prompt.
Adding Environment Variables
You may consider adding a few environment variables to your .bashrc file. These can help make
working with the shell more efficient and effective:
TMOUT??”Sets how long the shell can be inactive before bash automatically exits. The
value is the number of seconds for which the shell has not received input. This can be a
nice security feature, in case you leave your desk while you are still logged in to Linux. So
as not to be logged off while you are working, you may want to set the value to something
like TMOUT=1800 (to allow 30 minutes of idle time). You can use any terminal session
to close the current shell after a set number of seconds??”for example, TMOUT=30.
PATH??”As described earlier, the PATH variable sets the directories that are searched for
commands you use. If you often use directories of commands that are not in your PATH,
you can permanently add them.
Pages:
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207