Product SiteDocumentation Site

B.2. Organisasi dari Hirarki Sistem Berkas

B.2.1. Direktori Root

A Debian system is organized along the Filesystem Hierarchy Standard (FHS). This standard defines the purpose of each directory. For instance, the top-level directories are described as follows:
  • /bin/: program-program dasar;
  • /boot: Kernel Linux dan berkas-berkas lain yang diperlukan untuk proses boot awal;
  • /dev: berkas peranti;
  • /etc: berkas konfigurasi;
  • /home: berkas pribadi pengguna;
  • /lib: pustaka dasar;
  • /media/*: titik kait untuk peranti lepas pasang (CD-ROM, flash disk USB, dan sebagainya);
  • /mnt: titik kait temporer;
  • /opt: aplikasi ekstra yang disediakan oleh pihak ketiga;
  • /root: berkas pribadi administrator (root);
  • /run: data runtime volatile yang tidak bertahan antar reboot (belum masuk ke dalam FHS);
  • /sbin: program-program sistem;
  • /srv: data yang dipakai oleh server yang diwadahi oleh sistem ini;
  • /tmp: berkas temporer; direktori ini seringkali dikosongkan saat boot;
  • /usr/: applications; this directory is further subdivided into bin, sbin, lib (according to the same logic as in the root directory). Furthermore, /usr/share/ contains architecture-independent data. /usr/local/ is meant to be used by the administrator for installing applications manually without overwriting files handled by the packaging system (dpkg).
  • /var/: variable data handled by daemons. This includes log files, queues, spools, caches and so on.
  • /proc/ and /sys/ are specific to the Linux kernel (and not part of the FHS). They are used by the kernel for exporting data to user space (see Bagian B.3.4, “The User Space” and Bagian B.5, “The User Space” for explanations about this concept).

B.2.2. The User's Home Directory

The contents of a user's home directory is not standardized, but there are still a few noteworthy conventions. One is that a user's home directory is often referred to by a tilde (“~”). That is useful to know because command interpreters automatically replace a tilde with the correct directory (usually /home/user/).
Traditionally, application configuration files are often stored directly under the user's home directory, but their names usually start with a dot (for instance, the mutt email client stores its configuration in ~/.muttrc). Note that filenames that start with a dot are hidden by default; and ls only lists them when the -a option is used, and graphical file managers need to be told to display hidden files.
Some programs also use multiple configuration files organized in one directory (for instance, ~/.ssh/). Some applications (such as the Iceweasel web browser) also use their directory to store a cache of downloaded data. This means that those directories can end up using a lot of disk space.
These configuration files stored directly in a user's home directory, often collectively referred to as dotfiles, have long proliferated to the point that these directories can be quite cluttered with them. Fortunately, an effort led collectively under the FreeDesktop.org umbrella has resulted in the “XDG Base Directory Specification”, a convention that aims at cleaning up these files and directory. This specification states that configuration files should be stored under ~/.config, cache files under ~/.cache, and application data files under ~/.local (or subdirectories thereof). This convention is slowly gaining traction, and several applications (especially graphical ones) have started following it.
Graphical desktops usually display the contents of the ~/Desktop/ directory (or whatever the appropriate translation is for systems not configured in English) on the desktop (ie, what is visible on screen once all applications are closed or iconized).
Finally, the email system sometimes stores incoming emails into a ~/Mail/ directory.