The Linux File System Structure |
|
In linux, everything can be found under the system root, or '/'. It
doesn't matter if you have 5 hard drives with 10 partitions, everything
appears as a folder underneath '/'.
Each linux distro is slightly different in it's implementation, but there are some standards:
/home/[username] - All user files contained here. Anything that
you've worked on, your firefox/thunderbird/kmail profiles live here.
/etc/ - All configuration files live here. Everything from the apt
source lists (/etc/apt/sources.lst), the firehol config
(/etc/firehol/firehol.conf) to the X-system config
(/etc/X11/xorg.conf).
/bin/ - Essential binary files in the system. Usually small utilities like chmod, cp and rm.
/usr/ - Shareable data (but read only). Tends to be non-essential
stuff (not having it won't necessarily kill your system immediately,
but probably will make it un-bootable...), software installed on the
system, any program documentation.
/var/ - variable stuff.. program caches, libraries, temporary space, printer spool space, and system logs
/sbin/ - system binaries. Without these your system won't boot. Or do much of anything..
/tmp/ - temporary file storage. Wiped regularily.
/dev/ - Devices. In Linux (Unix) almost everything is a file. This
includes devices. If you wanted to mount a hardrive, you'd probably
mount /dev/sda1/ (or similar)
/lib/ - essential system libraries (drivers/kernel modules)
/mnt/ - a folder for you to mount temporary file systems
/opt/ - sometimes used for program data storage, sometimes used to install programs to
/root/ - home directory for the "root" user. (Root user is the
system admin, you can do *ANYTHING* as the root user. If you're logged
on as it, use with extreme caution. You won't get warned that you're
about to destroy your linux install...)
/proc/ - System process holders & status readouts
/media/ - folder to mount removable drives to
/cdrom/ - folder on which your primary cdrom drive is mounted to
/srv/ - On some linux distributions, this is where all files that get served to people are stored. (So for apache's web-root / filestore, it would be in /srv/www/. In Ubuntu, apache's web root can be found in /var/www/ )
Partially nabbed from my answer to a question on a forum and elaborated.
Some of this came from wikipedia, the rest my head.
- The URL to Trackback this entry is:
- http://trollstomper.org.uk/Members/thumper/the-kirrus-blog/the-linux-file-system-structure/tbping