Direktorij (struktura)

Izvor: HrOpenWiki
Inačica od 15:33, 23. prosinca 2008. koju je unio/unijela Grof (razgovor | doprinosi)

(razl) ←Starija inačica | vidi trenutačnu inačicu (razl) | Novija inačica→ (razl)
Skoči na: orijentacija, traži

Struktura direktorija Linux operativnog sustava je standardizirana FHS (Filesystem Hierarchy Standard) standardu.

Prema tom standardu unutar Linux operativnog sustava mora postojati vrlo unificirano "stablo" direktorija čija imena predstavljaju određeni dio samog operativnog sustava.

Izgled i značenja pojedinih direktorija u stablu predočena su u ovoj tabeli:

Directory Description
/ Primary hierarchy root and root directory of the entire file system hierarchy.
/bin/ Essential command binaries that need to be available in single user mode; for all users (e.g., cat, ls, cp).
/boot/ Boot loader files (e.g., kernels, initrd). Often a separate partition.
/dev/ Essential devices (e.g., /dev/null).
/etc/ Host-specific system-wide configuration files (the name comes from et cetera).
/etc/opt/
Configuration files for /opt/.
/etc/X11/
Configuration files for the X Window System, version 11.
/etc/sgml/
Configuration files for SGML.
/etc/xml/
Configuration files for XML.
/home/ Users' home directories - containing saved files, personal settings etc. Often a separate partition.
/lib/ Libraries essential for the binaries in /bin/ and /sbin/.
/media/ Mount points for removable media such as CD-ROMs (appeared in FHS-2.3).
/mnt/ Temporarily mounted filesystems.
/opt/ Optional application software packages.
/proc/ Virtual filesystem documenting kernel and process status as text files (e.g., uptime, network).
/root/ Home directory for the root user.
/sbin/ Essential system binaries (e.g., init, route, ifup).
/srv/ Site-specific data which is served by the system.
/tmp/ Temporary files (see also /var/tmp). Often not preserved between system reboots.
/usr/ Secondary hierarchy for user data; contains the majority of (multi-)user utilities and applications.[1]
/usr/bin/
Non-essential command binaries (not needed in single user mode); for all users.
/usr/include/
Standard include files.
/usr/lib/
Libraries for the binaries in /usr/bin/ and /usr/sbin/.
/usr/sbin/
Non-essential system binaries (e.g. daemons for various network-services).
/usr/share/
Architecture-independent (shared) data.
/usr/src/
Source code (e.g. the kernel source code with its header files).
/usr/X11R6/
X Window System, Version 11, Release 6.
/usr/local/
Tertiary hierarchy for local data, specific to this host. Typically has further subdirectories, eg. bin/, lib/, share/.[2]
/var/ Variable files, such as logs, spool files, and temporary e-mail files.
/var/lib/
State information. Persistent data modified by programs as they run (e.g. databases, packaging system metadata etc.).
/var/lock/
Lock files. Files keeping track of resources currently in use.
/var/log/
Log files. Various logs.
/var/mail/
Users' mailboxes.
/var/run/
Information about the running system since last boot (e.g. currently logged-in users and running daemons).
/var/spool/
Spool for tasks waiting to be processed (e.g. print queues and unread mail).
/var/spool/mail/
Deprecated location for users' mailboxes.
/var/tmp/
Temporary files to be preserved between reboots.
  1. Should be shareable and read-only, cf. http://www.pathname.com/fhs/pub/fhs-2.3.html.
  2. Historically and strictly according to the standard, /usr/local/ is for data that must be stored on the local host (as opposed to /usr/, which may be mounted across a network. Most of the time /usr/local/ is used for installing software/data that is not part of the standard operating system distribution (in such case, /usr/ would only contain software/data that is part of the standard operating system distribution). It is possible that the FHS standard may in the future be changed to reflect this de-facto convention).