Configuration is a strong element of Unix. This probably stems from two traits commonly found in hackers: they want total control over their environment, and they strive to minimize the number of keystrokes and other hand movements they have to perform. So all the major utilities on Unix — editors, mailers, debuggers, X Window System clients — provide files that let you override their default behaviors in a bewildering number of ways. Many of these files have names ending in rc, which means resource configuration.
Startup files are usually in your home directory. Their names begin with a period, which keeps the ls command from displaying them under normal circumstances. None of the files is required; all the affected programs are smart enough to use defaults when the file does not exist. But everyone finds it useful to have the startup files. Here are some common ones:
PS1='\u$' # The prompt contains the user's login name. HISTSIZE=50 # Save 50 commands for when the user presses the up arrow. # All the directories to search for commands. PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11 # To prevent the user from accidentally ending a login session, # disable Ctrl-D as a way to exit. IGNOREEOF=1 stty erase "^H" # Make sure the backspace key erases.
set prompt='% ' # Simple % for prompt. set history=50 # Save 50 commands for when the user presses the up arrow. # All the directories to search for commands. set path=(/usr/local/bin /usr/bin /bin /usr/bin/X11) # To prevent the user from accidentally ending a login session, # disable Ctrl-D as a way to exit. set ignoreeof stty erase "^H" # Make sure the backspace key erases.
Copyright © 2003 O'Reilly & Associates. All rights reserved.