MandrakeUser.Org - Your Mandrake-Linux Knowledge Base!


 
 

* DocIndex - Basics

File System Hierarchy III

* /etc
* /home
* /var

Related Resources:

File system Hierarchy Standard (FHS)
Mdk Reference, II.6

Revision / Modified: April 20, 2002
Author: Tom Berger

 

* /etc

'/etc' is the nerve center of your system, it contains all system related configuration files.

Some important subdirectories:

/etc/X11/
This directory contains all the configuration files for the X Window System, like 'XF86Config(-4)', the X server's configuration file, 'fs/config', which controls the X font server, or 'xdm/' and 'xinit/' which contain important initialization files.
/etc/cron[...]/
These directories contain scripts to be executed on a regular basis by thecron daemon.
/etc/menu-methods/
That's the place where the desktop menu system can be configured centrally.
/etc/pam.d/
This directory is the home of the configuration files for the Pluggable Authentication Modules.
/etc/postfix/
'/etc/postfix/' holds your 'postfix' configuration files.
/etc/ppp/
That's the place where your dial-up configuration files go to.
/etc/rc.d/
This contains all the files necessary to control system services and configure runlevels.
/etc/security/
This is the nerve center of MSEC, LM's own security level system.
/etc/skel/
Files in this directory are automatically put into every new user's home directory.
/etc/sysconfig/
This directory contains configuration files for the boot process, like 'clock', which sets the time-zone, or 'keyboard' which controls the keyboard map. The subdirectory 'network-scripts/' holds - among others - configuration files for network interfaces ('ifcfg-*').
/etc/xinet.d/
Services controlled via xinetd put their configuration file here.

Some network configuration files in /etc

  • '/etc/ftpaccess' determines who might get ftp-access to your machine.
  • '/etc/gettydefs' configures console-logins.
  • '/etc/host.conf' determines the search order for look-ups (usuallyhosts bind, i.e. "check /etc/hosts first and then look for a DNS").
  • '/etc/hosts' contains the static IPs of your network.
  • '/etc/hosts.allow' and '/etc/hosts.deny' are part of the (now obsolete) tcp-wrappers system to control access to your machine's services.
  • '/etc/issue.net' presents the welcome screen to users who login remotely to your machine (whereas '/etc/issue' determines what a local user sees on login).
  • '/etc/resolv.conf' tells the network which name servers it should use for unknown addresses.

Some system configuration files in /etc

  • '/etc/bashrc': 'System wide functions and aliases' for the bash shell.
  • '/etc/fstab': Configuration file for 'mount'.
  • '/etc/group': This lists the configured user groups and who belongs to them.
  • '/etc/inittab': Tells init how to handle runlevels. Sets the default runlevel.
  • '/etc/issue': This is your welcome screen.
  • '/etc/ld.so.conf': Tells the Linux Loader/Linker 'ld' where to look for libraries.
  • '/etc/lilo.conf': Configuration file for the Linux boot loader LiLo.
  • '/etc/motd': 'Message of the Day', displayed after login.
  • '/etc/mtab': Lists all currently mounted file systems.
  • '/etc/passwd': This is the 'old' password file, kept for compatibility.
  • '/etc/printcap': Printer configuration ('capabilities') file.
  • '/etc/profile': 'System wide environment and startup programs' for the bash shell. Also have a look at the scripts collected in '/etc/profile.d'.
  • '/etc/shadow': The password file, used by the Pluggable Authentication Modules (PAM). Passwords are stored in encrypted form.
  • '/etc/sysctl.conf': Some security relevant settings.
  • '/etc/syslog.conf': Where the log files go and what messages are written to them.
  • '/etc/updatedb.conf': Configures the database for 'locate'.

And many, many more. I suggest that you should browse this directory, it will teach you a lot about your Linux system and how you can customize it!

* section index * top

* /home

'/home/$USER' (aka '~/') is your playground: everything's at your command, you can write files, delete them, install programs etc.
Your home directory contains your personal configuration files, the so-called dot files (their name is preceded by a dot). Personal configuration files are usually 'hidden', if you want to see them, you either have to turn on the appropriate option in your file manager or run 'ls' with the '-a' option. If there is a conflict between personal and system-wide configuration files, the settings in the personal file will prevail.
'/home' can get quite large (mine is about 400 MB) and can be used for storing downloads, compiling, installing and running programs, your mail, your collection of image or sound files etc.

* section index * top

* /var

'/var' holds 'variable' data like spool directories for mail and news, data bank data and log files.

  • '/var/catman' caches formatted man-pages.
  • '/var/db' stores data banks.
  • '/var/lib' holds frequently changing data libraries like the RPMdb or game scores.
  • '/var/local' can contain local variable data (as opposed to a remotely mounted '/var' partition).
  • '/var/lock' holds lock files of some devices. These lock files ensure that only one application may have access to a device at a time.
  • '/var/log' contains files, where the system and services write log and error messages to. A good place to start with troubleshooting ;-).
  • '/var/run' contains the process identification files (PIDs) of system services. It is emptied on every boot.
  • '/var/spool' holds spool files, for instance for mail and printing (lpd). Spool files store data to be processed after the job currently occupying a device is finished or the appropriate cron job is started.
  • '/var/tmp' ... well, guess ;-).
  • '/var/www' is the home for public webserver files.

* The /usr directory

* section index * top


 
Legal: All texts on this site are covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB (Tom Berger) and Mandrakesoft 1999-2002.