There are some files within the home directory that are ordinarily hidden. Hidden files have names that begin with a period; hence, they have been given the nickname of dot files. Hidden files are not displayed by the ls command unless the –a option is used in the format of ls –a.

The table below lists some of the more common dot files that users should know about. This is by no means a totally comprehensive list. Additional dot files can be found in the user’s home directory; however, some searches may not find some of the files listed here. The files found are dependent upon the applications installed on the server, the utilities that are in use and the command shell that is being used. Since the default shell for Linux is the bash shell, the home directory typically contains the bash related scripts indicated below.

File

Description

.bash_history

For users of the bash shell, a file containing up to 500 of the most recent commands available for recall using the up and
down arrow keys.

.bash_logout

Script that is run by the bash shell when the user logs out of the system

.bash_profile

Initialization script that is run by the bash shell upon login in order to setup variables and aliases. When bash
is started as the default login shell, it looks for the .bash_profile file in the user’s home directory; if not found, it looks for .bash_login.
If there is no .bash_login file, it then looks for a .profile file.

.bashrc

Initialization script executed whenever the bash shell is started in some way other than a login shell. It is better to put
system-wide functions and aliases in /etc/bashrc, which will be presented later in the book.

.gtkrc

GTK initialization file. GTK+
is a multi-platform toolkit for creating graphical user interfaces, used by a
large number of applications. It is the toolkit used by the GNU
project’s GNOME desktop.

.login

The initialization script that is run whenever a user
login occurs.

.logout

The script that is automatically run whenever a user
logout occurs.

.profile

Put default system-wide environment variables in /etc/profile.

.viminfo

Initialization file for the Vim text editor that is
compatible with vi.

.wm_style

Specifys the default window manager if one is not
specified in startx

.Xdefaults & .Xresources

Initialization files for Xterm resources for the user.
Application program behavior can be changed by modifying these files.

.xinitrc

The initialization file used when running startx, which can be used to activate applications and run a particular window manager.

.xsession

This file is executed when a user logs in to an X-terminal
and is used to automatically load the window manager and applications.

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

Buy it now!


unix, linux, system administration, sysadmin, hidden files, config files