Dotfiles are configuration files that reside in your home area. They are called dotfiles because they begin with the period or “dot” character. These files control many aspects of your Unix/Linux environment. For example, the default login shell for EECS accounts is Z-Shell (zsh). Its dotfiles include .zshrc (the main zsh configuration file) and .zlogin (a list of commands to execute at login, etc.).
This document describes listing and viewing dotfiles, common dotfiles, editing dotfiles, frequent tasks and problems related to dotfiles, and restoring all dotfiles.
By default, dotfiles do not appear in file listings:
bin/ junk/ ntprofile/
-a option with the ls command to include dotfiles in the listing:
prompt> ls -a
./ .fvwm2rc .xinitrc
../ .login .xserverrc
.bash_login .logout bin/
.bash_logout .mailrc junk/
.bashrc .plan ntprofile/
To view the contents of a dotfile, use your favorite “pager”, such as more or less. Editing dotfiles is discussed later in this document.
Your EECS account has a set of default dotfiles for the most important applications. Here is a partial list of the dotfiles in your home area:
For more information on the specific dotfiles, read the manual pages (using
man command) for
Before you attempt to edit any dotfile, make a backup copy of the file you are going to modify. The easiest way to do this is to copy the file to a new file with a different name. For example, if you will be modifying
.zshrc, run the following command:
cp .zshrc .zshrc.backup
This will copy your current
.zshrc file to
.zshrc.backup. Should you render your .zshrc unusable and are unable to fix the problem, you can always copy
.zshrc.backup back to
.zshrc and restore your previous settings.
To edit a dotfile, use any standard ASCII text editor such as vi. Once you have edited your files, you may need to log out and log back in to test any changes. If you are editing your Z-Shell dotfiles (e.g.,
.zshrc), you may be able to test the new configuration by using the source command:
This command will reread your .zshrc file and apply any changes you have made. If you added or removed any entries from your shell's “path”, we recommend that you log out and log back in to test the changes. For more information, please read the manual page for Z-Shell (
Here are some tips for performing basic modifications and solving typical problems.
The shell's “path” specifies the locations it searches for programs when you type a command. For
zsh, you add paths to the
.zsh_files/.zsh.path file. For example, to look in the directory
/home/mydir/bin for executables, add the following line to
You should then log out and log back in for the changes to take effect.
If you made a backup copy of the dotfile before you modified it, simply copy the backup to the original file. For example:
cp .zshrc.backup .zshrc
If you did not make a backup, you can restore the default dotfile. The default EECS account dotfiles are stored in
~skels/default. For example, to restore the original
.zshrc file, run the following command:
cp ~skels/default/.zshrc ~/.zshrc
To restore all of the default dotfiles for your account, see the corresponding section in this document.
The default window manager supported by the EECS IT staff is Xfce. FVWM and GNOME are also available; however, we strongly recommend Xfce. If you would like to change your window manager, follow the directions below.
The instructions below pertain to new accounts created after June 2005, or if you have updated your dotfiles.
exec line in your
.xinitrc file to the following:
If your dotfiles are out-of-date, or if you have severely damaged your home area, you can restore the default dotfiles using a script provided by the EECS IT staff. Log onto an EECS machine and run the following command:
This script will walk you through replacing your dotfiles. Read each prompt carefully. You will be given the option to backup your existing files. In addition, update_config can sometimes attempt to preserve personal changes you have made. (This is not always possible, however.) If running
update_config causes problems and you selected to backup your files, you can restore the backup using the following command:
If you have any difficulties, please contact EECS IT Support.
Knoxville, Tennessee 37996 | 865-974-1000
The flagship campus of the University of Tennessee System