Abstract
Describes special files used to customize Unix operations.
This publication is available in Web form and also as a PDF document.
Please forward any comments to tcc-doc@nmt.edu.
Table of Contents
When you use Unix or Linux systems at the New Mexico Tech Computer Center, you can customize your configuration by editing certain files in your root directory. These files control user-level configuration—that is, the appearance and function of your applications.
These files are called “hidden” or
“dot” files—that is, their names start with
“.”, so they are not
shown by the ls command unless you use the
ls -a option.
If you are unfamiliar with Unix conventions, please see our publication Summary of common Unix commands, which explains basic terms like shell and prompt.
We'll assume that your shell is bash. For a complete description of bash, see the online Bash Reference Manual.
Here are some of the more important dot files you can use to configure bash:
Your .bashrc file: Shell commands in this file are
executed whenever a new shell or sub-shell is started.
See Section 2, “Your .bashrc file:
Shell configuration”.
Your .bash_login file: Shell commands in this file are
executed whenever you log in. See Section 3, “Your .bash_login file:
Login initialization”.
Your .bash_logout file: Shell commands in this file are
executed whenever you log out. See Section 4, “Your .bash_logout file: Logout actions”.
To create or modify your dot files, use any basic text editor. Here are some popular choices:
pico is a very simple text editor. See Using the pico text editor.
emacs is a full-featured
text editor for serious professional use. See The emacs text editor. This editor has its own configuration file, named
“.emacs”.
vi is another full-featured editor. See Quick reference for the vi editor.
Choosing between vi and emacs is a matter of taste, and in most cases the author has found that people tend to stick with whichever one they learned first.