To be able to manage a Linux computer, אתה צריך להיות מוכר עם ספריות ברירת מחדל.
The layout of the Linux file system hierarchy is defined in the Filesystem Hierarchy Standard (FHS).
File System Hierarchy Overview
|/||This is known as the root directory, which is the start of the file system tree. Everything in Linux appears under /, even other partitions.|
|/bin||This directory contains important programs and utilities such as the BASH shell. This directory is essential during boot.|
|/boot||Contains all the files and directories to boot the Linux kernel. The Linux kernel and GRUB boot loader files are stored here.|
|/dev||You can find the device files here, such as the ones to access the physical devices. This directory is essential during boot.|
|/וכו||Contains configuration files that are used by programs and services that are used on your server. These configuration files are used system wide. This directory is essential during boot.|
|/home||This is the home directory for the user. If the user is tim then the home directory would be /home/bob. The home directory contains the user's data files and user specific configuration files. The user only has write access to their own home directory. Only elevated permissions can access all users home directory.|
|/lib, /lib64||Shared libraries that are used by programs in /boot, /bin and /sbin|
|/media, /mnt||/media contains directories where removable media devices such as CDs are mounted. /mnt is where temporary files systems are mounted, לדוגמה, a חלונות partition could be mounted at /mnt/windows.|
|/opt||Optional directory for programs to store files, if they don't use the FHS standard. A program could store its files in /opt/application|
|/proc||This directory is used by the proc file system. Provides access to kernel information.|
|/שורש||Home directory for the root user. This is different to /.|
|/לָרוּץ||Contains process and user specific information that has been created since the last boot. Applications can store information such as sockets and process IDs.|
|/sbin||Similar to /bin, but for system administration commands that are run by the root user.|
|/srv||Directory that may be used for data that is used by services like NFS, FTP & HTTP.|
|/sys||Used to interface to different hardware devices that is managed by the Linux kernel and associated processes|
|/usr||Contains directories with program files, libraries for these program files and documentation. These files are used by user application.|
|/var||Contains files that may change in size. Eg. log files (/var/log), mail boxes and spool files.|
Mounting in Linux
Linux allows mounting devices under the / שורש. This allows to organise the Linux file-system in a flexible way such as distributing the file system among different devices.
/boot : Often mounted to a separate hard disk as this directory contains important information for booting the computer.
/var : Often is on a separate dedicated hard disk as the size of the directory can grow rapidly. Using a separate storage also ensures the space of the computer stays intact.
/home : Often stored on a dedicated device or hard disk for security reasons. You can then mount the device to the Linux file-system in secure way. If the OS needs to be reinstalled user specific files stay intact and can be easily remounted.
/usr : Contains operating system files that users don’t need write access to. Putting this on a dedicated device ensures that it can be mounted read-only.
The mount command is used to show the overview of the mounted devices. The information used by the mount command is read from the /proc/mounts directory. df -Th command shows available disk space on current mounts. -h summarizes the output and -T shows the filesystem type used on the different mounts. findmnt shows mounts and the relation that exists between the different mounts.