Penguin
Note: You are viewing an old revision of this page. View the current version.

A Linux machine has typical locations for the storage of most common things a system needs to run. Their contents:

/
The FileSystem root where all of the directory tree "grows out of."
/boot
The Kernel goes here. This is often a separate Partition at the beginning of the HardDrive?.
/bin
System executable files for use by all users.
/dev
Device nodes, ie files that represent your computer's periphery.
/etc
Configuration files.
/home

Every user owns a subdirectory named for his username here. Your own subdirectory is where you store all your personal stuff that has nothing to do with the system. It is aptly called your home. Your mail, your pictures and letters, your music, the videos and your notes, this is where you put them. When you configure a program, it saves the settings here, in so-called DotFiles.

Instead of /home/yourusername you commonly simply say ~.

/lib
Libraries needed to run the programs in /bin and /sbin.
/mnt
MountPoint for temporary FileSystems (eg CDROM, FloppyDisk).
/opt
Intended for additional, self-contained software packages in subdirectories, such as TarBalls which contain binaries rather than source. KDE is often found in /opt/kde, even though it doesn't fit the "self-contained" criterion. Some people install source TarBalls in here too, especially beta software.
/proc
A virtual FileSystem containing pseudofiles with information about running processes. On Linux, there are also many files pertaining to the hardware and Kernel configuration.
/root
Home directory of root, the SuperUser.
/sbin
Executable files only of interest to root, the SuperUser.
/usr

The place for files shared by all users of the machine. The party is here.

You will find duplicates for a number of directories at the root level, such as /usr/bin, /usr/lib, /usr/sbin etc which are analogous to /bin, lib, /sbin etc. The distinction is somewhat arbitrary; it comes from the fact that /usr is commonly on a Partition by itself, which means the programs and other miscellanea found under it are not available during the early boot process.

There's also a /usr/share which has no counterpart at the root level. It is where program resources are installed; things like icons, helpfiles, sound clips and such end up here.

Most things you install sprinkle their files over these directories.

/usr/local
Anything shared across the system but not supplied by the system vendor traditionally goes here -- most commonly, Packages compiled from TarBalls.
/var
Variable data files, such as logs, mailboxen, printer spools, cached data, databases and the like. Things that will change, but which need to be remembered across invocations of a program. Scratch space, if you will.
/tmp
The place for temporary files -- that is, literally temporary files. On some systems this directory is frequently purged, and on machines with modern Linux kernels it may be mounted as Tmpfs FileSystem that exists only in memory. When VirtualMemory subsystems were not as good as they are today, many userland programs had to explicitly balance memory and disk consumption in /tmp, and some (such as find(1)) still do.

See also:


CategoryBeginners