The basics of how to use Linux (如何使用Linux,基础笔记二)
Outline:
As the saying, everything is a file in the Linux system. The directory is a kind of file, and there are some interesting and default directories in the system. Let’s explore those directories.
-
“/” : root directory, it contains every thing in the Linux.
-
“/bin” : It contains all binary files which are needed when the system activates and operates.
-
“/boot” : It contains Linux kernel, RMA disk image and boot loader.
3.1. “/boot/grub/grub.comf | menu.lst” are used to config boot loader.
3.2. “/boot/vmlinuz” is the kernel of Linux system -
“/dev” is a special directory which includes device nodes, and the kernel maintains those devices.
-
“etc/” contains all config files about system-layer and some shell scripts. When the system activates, those shell scripts are going to start system services.
5.1. “etc/crontab” defines tasks of automatical running
5.2. “etc/fstab” includes the list of storage devices and their associated mount points
5.3. “/etc/passwd” includes the list of user accounts -
“/home”: In general system setting, under “/home” directory, the system distributes a directory to every user, and they only can create files in their directory in case of corruptions.
-
“/lib” contains some library files which are needed by the system activation.
-
“/media” : In the modern Linux system, the directory contains removable mount points of media devices, like USB driver. When those devices connected with the computer, those devices will automatically mount at “/media” directory.
-
“/mnt” contains mount points for removable devices that have been mounted manually.
-
“/opt” is used to install optional softwares, and it primarily stores some commercial softwares.
-
“/root” : The home directory of the root user
-
“/sbin” contains system binary files, and it prepares for super user to perform some vital system programs.
-
“tmp” contains various temp files created by other programs.
-
“/usr” contains all programs and files belonging to normal users.
-
“/usr/bin” contains system-installed programs.
-
“/usr/bin” contains shared libs for programs in “/usr/bin”
-
“/usr/sbin” contains system adminstration programs.
-
“/var/log” contains some important system log files which record system activaties.
-
Detailed and rest function-description of directories: