Home > CentOS, Fedora, Linux OS > List of Important files and Directories in Linux (Redhat,Centos,Fedora)

List of Important files and Directories in Linux (Redhat,Centos,Fedora)

These are the important files in Linux, which is mostly used to configure the Linux System.

/boot/vmlinuz – the typical location and name of the Linux kernel.

/dev/hda – first IDE hard drive

/dev/null – used when you want to send output into oblivion

/etc/aliases – file containing aliases used by sendmail and other MTAs (mail transport agents).

After updating this file, it is necessary to run the newaliases utility for the changes to be passed to sendmail.

/etc/bashrc – system-wide default functions and aliases for the bash shell

/etc/conf.modules – aliases and options for configurable modules

/etc/crontab – shell script to run different commands periodically (hourly, daily, weekly, monthly, etc.)

/etc/DIR_COLORS – used to store colors for different file types when using ls command. The dircolors command uses this file when there is not a .dir_colors file in the user’s home directory. Used in conjunction with the eval command (see below).

/etc/exports – specifies hosts to which file systems can be exported using NFS. Man exports contains information on how to set up this file for remote users.

/etc/fstab – contains information on partitions and filesystems used by system to mount different partitions and devices on the directory tree

/etc/HOSTNAME – stores the name of the host computer(Used in Debian).For Red Hat Linux it would be /etc/sysconfig/network.

/etc/hosts – contains a list of host names and absolute IP addresses.

/etc/hosts.allow – hosts allowed (by the tcpd daemon) to access Internet services

/etc/hosts.deny – hosts forbidden (by the tcpd daemon) to access Internet services

/etc/group – similar to /etc/passwd but for groups

/etc/inittab – runs different programs and processes on startup. This is typically the program which is responsible for, among other things, setting the default runlevel, running the rc.sysinit script contained in /etc/rc.d, setting up virtual login terminals, bringing down the system in an orderly fashion in response to [Ctrl][Alt][Del], running the rc script in
/etc/rc.d, and running xdm for a graphical login prompt (only if the default runlevel is set for a graphical login).

/etc/passwd – contains passwords and other information concerning users who are registered to use the system. For obvious security reasons, this is writable only by root and readble by others. It can be modified by root directly, but it is preferable to use a configuration utility such as passwd to make the changes. A corrupt /etc/passwd file can easily render a Linux box unusable.

/etc/resolv.conf – contains a list of domain name servers used by the local machine

/etc/securetty – contains a list of terminals on which root can login. For security reasons, this should not include dialup terminals.

/etc/X11/XF86Config – X configuration file. The location in Slackware is /etc/XF86Config.

/proc/cpuinfo – cpu information

/proc/filesystems – prints filesystems currently in use

/proc/interrupts – prints interrupts currently in use

/proc/ioports – contains a list of the i/o addresses used by various devices connected to the computer

/var/log/messages – general system messages, includes most of what is in dmesg if it hasn’t “rolled over”.

/var/log/dmesg  –  boot time hardware detection and driver setup.

  • /var/log/daemon.log – messages from service tasks like lircd
  • /var/log/kern.log – if something has gone wrong with a kernel module, you may find something here.
  • /var/log/Xorg.0.log – start up log from the X server (GUI environment), including hardware detection and modes (resolution) selected
Directory Description
/bin All binaries needed for the boot process and to run the system in single-user mode, including essential commands such as cd, ls, etc.
/boot Holds files used during the boot process along with the Linux kernel itself
/dev Contains device files for all hardware devices on the system
/etc Files used by application subsystems such as mail, the Oracle database, etc.
/etc/init.d Contains various service startup scripts
/etc/profile.d Holds application setup scripts run by /etc/profile upon login
/etc/rc.d Contains subdirectories which contain run level specific scripts
/etc/rc.d/init.d run level initialization scripts
/etc/rc.d/rc?.d Where ‘?’ is a number corresponding to the default run level. Contains symbolic links to scripts which are in /etc/rc.d/init.d. for services to be started and stopped at the indicated run level.
/etc/skel Holds example dot files used to populate a new user’s home directory.
/etc/X11 Contains subdirectories and configuration files for the X Window system
/home User home directories
/lib Some shared library directories, files, and links
/mnt The typical mount point for the user-mountable devices such as floppy drives and CDROM
/proc Virtual file system that provides system statistics.  It doesn’t contain real files but provides an interface to runtime system information.
/root Home directory for the root user
/sbin Commands used by the super user for system administrative functions
/tmp A standard repository for temporary files created by applications and users.
/usr Directory contains subdirectories with source code, programs, libraries, documentation, etc.
/usr/bin Contains commands available to normal users
/usr/bin/X11 X Window system  binaries
/usr/include Holds include files used in C programs
/usr/share Contains shared directories for man files, info files, etc.
/usr/lib Library files searched by the linker when programs are compiled
/usr/local/bin Common executable application files local to this system
/usr/sbin Commands used by the super user for system administrative functions
/var Administrative files such as log files, locks, spool files, and temporary files used by various utilities

The contents of these directories will vary from system to system. but most of these directories will typically be present.  Often when you install software or a new device on a Linux system files will be added or modified in these directories to make everything work.

  1. May 12, 2011 at 9:40 PM

    two thumbs up for a great blog

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: