Content deleted Content added
gratuitous caps |
Refactor list into table to match Filesystem Hierarchy Standard; also <tt> is not an HTML5 element http://w3.org/TR/html5-diff#absent-elements |
||
Line 5:
What follows is a generalized overview of common locations of files in a Unix operating system:
{|class=wikitable
!Directory
!Description
|-
|<code>/</code>
|the slash <code>/</code> character alone denotes the root of the virtual filesystem tree.
|-
|
:<code>/bin</code>
|stands for "[[computer program|binaries]]" and contains certain fundamental utilities, such as <code>ls</code> or <code>cp</code>, needed by all users.
|-
|
:<code>/sbin</code>
|stands for "[[computer program|system (or "superuser") binaries]]" and contains fundamental utilities, such as <code>init</code>, usually needed to start, maintain and recover the system.
|-
|
:<code>/etc</code>
|contains configuration files and system databases.
|-
|
:<code>/dev</code>
|stands for "devices". Contains file representations of peripheral devices.
|-
|
::<code>[[dev-null|/dev/null]]</code>
|also known as the "bit bucket" or "black hole", this [[pseudo-device]] discards all contents written to it, and is typically used to pipe away unwanted data.
|-
|
::<code>[[/dev/random]]</code>
|this pseudo-device returns [[pseudorandom numbers]] (subject to the limitations of [[random number generator]]s in [[computing]]) when read from. It uses system noise to generate random numbers and blocks if not enough entropy in the noise is available. Random is commonly used by programs such as [[Secure Shell|SSH]] that absolutely need cryptographically-strong random data to generate an [[encryption]] key.
|-
|
::<code>/dev/urandom</code>
|similar to <code>/dev/random</code>, except it always returns (less cryptographically-strong) pseudorandom numbers, even if there is not enough entropy in the system noise available.
|-
|
::<code>/dev/zero</code>
|An endless supply of null's (0x00). Useful for "zeroing" a disk drive (i.e. dd if=/dev/zero of=/dev/... bs=64k)
|-
|
:<code>/home</code>
|contains the home directories for the users.
|-
|
:<code>/mnt</code>
|contains filesystem mount points.
|-
|
:<code>/lib</code>
|contains system libraries.
|-
|
:<code>/root</code>
|the home directory for the [[superuser]] root.
|-
|
:<code>/tmp</code>
|a place for temporary files. Many Unices clear this directory upon start up.
|-
|
:<code>/usr</code>
|originally the directory holding user home directories, its use has changed, and it now holds executables, libraries, and shared resources that are not system critical, like the [[X Window System]], [[KDE]], [[Perl]], etc. (The name "Unix System Resources" is a ''post hoc'' [[backronym]]{{citation needed|date=December 2010}}.) However, on some [[Unix]] systems, some user accounts may still have a home directory that is a direct subdirectory of /usr, such as the default as in [[Minix]].
|-
|
::<code>/usr/bin</code>
|this directory stores all binary programs distributed with the operating system not residing in <code>/bin</code>, <code>/sbin</code> or (rarely) <code>/etc</code>.
|-
|
::<code>/usr/include</code>
|stores the development headers used throughout the system.
|-
|
::<code>/usr/lib</code>
|stores the required libraries for executables within <code>/usr</code> or elsewhere.
|-
|
::<code>/usr/local</code>
|resembles <code>/usr</code>, except that its subdirectories are used for additions not part of the operating system distribution, such as custom programs or files from a [[BSD]] [[Ports collection]]. Usually has subdirectories such as <code>/usr/local/lib</code> or <code>/usr/local/bin</code>.
|-
|
:<code>/var</code>
|a short for "variable." A place for files that may change often.
|-
|
::<code>/var/log</code>
|contains system log files.
|-
|
::<code>/var/mail</code>
|the place where all the incoming mails are stored. The user can access his/her own mail only, unless he/she has admin rights.
|-
|
::<code>/var/spool</code>
|[[spooling|spool]] directory; contains print jobs, mail spools and other queued tasks.
|-
|
::<code>/var/tmp</code>
|A place for temporary files preserved between system reboots.
|-
|
:<code>/proc</code>
|contains all processing data (process information about a running operating system).
|-
|
:<code>/opt</code>
|contains add-on software.
|-
|
:<code>/media</code>
|default mount point for removable devices.
|-
|
:<code>/srv</code>
|server data (data for services provided by system).
|-
|
:<code>/boot</code>
|contains all the important files which are required for successful booting process.
|-
|
:<code>/sys</code>
|contains information related to hardware.
|}
==References==
|