The Linux system directory contains 8 directories of Home, USR, Var, Bin, Lib, Boot, etc, and Dev , each of which stores the different function data in the LINXU system. I'll simply change a diagram here to make it more intuitive for everyone to see.
Home Directory : The role is to provide account information for each account, if we have more than one account in Linux, then in the home directory can be seen and the account name corresponding directory (if two accounts have different desktop, then these desktop configuration files are placed in the relevant directory). The Hoem directory can be understood as the "My Documents" directory in Windows.
usr directory : Contains all the commands, libraries, man pages, and other files (these files are required for daily operations). The USR directory can be understood as a "Windows" directory in Windows systems.
var directory : Contains changed files, such as offline directory (for effective mail, news, printers, etc.), log files, formatted hand albums and temporary files, the USR directory can be understood as the "Temp" directory in Windows.
Bin directory : During startup, it provides a command for ordinary users to use, and the bin directory can be understood as the "System32" and "program Files" directories in Windows.
The etc and Dev directories are all device-related directories that contain information such as drivers for the device. These two directories can be understood as "drivers" directories in Windows.
Lib directory : The shared directory of the system, the files stored inside the system can be called by multiple programs. This directory can be understood as a collection of DLL files for related programs in Windows.
Boot directory : Contains files used to reproduce the program at startup, such as Lilo. Kernel mirroring is usually stored here, and if there are multiple kernel images, the directory may grow quickly, preferably in a file system. This directory can be understood as a collection of related startup files under the root directory in Windows.
The Linux directories mentioned above are available in any Linux system, and the functionality is the same. Hopefully this article will help friends who are starting to get in touch with Linux systems.
1) root directory "/"
The root directory is located at the top level of the directory structure, denoted by a slash (/), similar to the "C: \" of the Windows operating system, and contains all the directories and files in the Fedora operating system.
2)/bin
The/bin directory, also known as a binary directory, contains binary images of important Linux commands used by system administrators and ordinary users. This directory contains a variety of executable files, as well as symbolic connections to some executables. Common commands are: CP, DMESG, kill, Login, rm, ping, CHOMD, bash, cat, echo, ls, mail, VI, etc.
3)/Boot
The/boot directory holds the system core file and the files that must be read at startup, including the binary image of the Linux kernel.
4)/dev
The/dev directory holds the files for external device code, which are special, and in fact they point to the peripheral devices they represent, such as the terminal, disk drive, optical drive, printer, and so on. You can access these external devices, with no distinction between accessing a file or a directory. If the subdirectory under this directory/dev/cdrom represents the optical drive directory, the subdirectory/dev/console represents the console, the subdirectory/dev/fd represents the floppy drive, the subdirectory/DEV/HD represents a partition on the hard disk, lp0 represents a printer, and ttyS0 represents the serial device of the system. DSP represents the system's speaker device. For example, by typing "cd/dev/cdrom" in the system, you can see the files in the optical drive, and type "Cd/dev/mouse" to see the relevant files of the mouse. /cdrom This directory is empty when the system is just installed, you can hang the optical drive file system in this directory, such as "Mount/dev/cdrom/cdrom".
5)/etc
The/etc directory is the center of the entire Linux system and contains all the configuration files for system administration and maintenance, such as dhcpd.conf, host.conf, logrotate.conf, Man.config, mke2fs.conf, Modprobe.conf, resolv.conf, sysctl.conf, syslog.conf (or rsyslog.conf), xinetd.conf, and yum.conf, and other configuration files are located in separate subdirectories. It is often important to take care to back up the critical configuration files in this directory so that you need to be able to recover the system quickly. Files that are used to store the system's configuration files and specific hosts. For example, record the user account name of the password file, the projection password of the shadow file, and so on. The directory does not contain any binaries, and all files in that directory are used primarily by administrators, and the normal user has read access only. The directory also contains network configuration files, file systems, x system profiles, device configuration information, user information, and so on.
The/ETC/CRON.D is used to store the configuration and control files used by the Cron process to dispatch the background process. Other directories include four directories, such as Cron.hourly, cron.daily, cron.weekly, and cron.monthly, defined by the/etc/crontab file.
/etc/cups is used to store various configuration files used by the Universal Unix Printing system (commom UNIX Printing system,cups).
/etc/default files are used to provide variables and their default values used by some tool software, such as the Useradd program.
/ETC/HTTPD the root directory of the Apache configuration file. Apache is a general-purpose, high-performance HTTP server and the most popular Web server in the world. Apache uses a modular design approach that supports runtime dynamic module selection, virtual hosting, and dynamic adjustment of the number of service processes.
The/ETC/INIT.D is used to store script files that need to be executed by the INIT scheduler when entering the appropriate run level. In Fedora Linux system, this is just a symbolic link file, the actual directory should be/ETC/RC.D/INIT.D.
/ETC/IPSEC.D is used to store configuration files used by Ipsee.
/ETC/KDE contains some KDE initialization files and KDM configuration files.
The/ETC/PKI is used to store various keys, such as keys for installing packages.
The/ETC/PPP is used to store PPP scripts and configuration files.
/ETC/PROFILE.D is used to store secondary initialization files such as/etc/profile, such as lang.sh script files.
The/ETC/RC.D is used to store script files that enter the appropriate run level that are executed by the INIT process schedule. It contains subdirectories such as INIT.D and RCN.D (where n is 0, 1, 2, 3, 4, 5, and 6, indicating the operating level of the system).
/etc/samba the root directory of the Samba configuration file. Samba is a generic term for web-sharing software, and the SMB protocol implemented in Linux systems allows Linux systems to provide file and print sharing services for Windows systems.
/etc/security basic security control files stored by the user, including registration control files, control access control files, and resource restriction control files.
/etc/selinux SELinux (Security enhanced Linux, a GPL-developed project led by the national security Agency, has a flexible and mandatory access control structure, Designed to improve the security of Linux systems and provide robust security assurances against unknown attacks, allegedly equivalent to B1 level military security performance. Much higher than Ms NT's so-called C2. By applying selinux, you can mitigate the disaster caused by malicious attacks or malware, and provide high security for information that requires high confidentiality and integrity. ) The root directory of the configuration file.
/etc/skel contains default initialization files, such as. bash_logout,. Bash_profile,. BASHRC,. Emacs,. KDE,. ZSHRC, and so on. Each time a new user is added, the system will copy some of the initialization files to the user's home directory. Note: The above files are hidden files. (That is, "." File name at the beginning)
/etc/ssh This directory contains the system configuration process, as well as the various configuration files that need to be used during the system boot process, and also the root directory of the various background service process configuration files maintained by Chkconfig. For example, the clock file contains the system's time zone settings, the keyboard file contains the type definition of the keyboard, and the init file contains the parameter definitions used by the system boot process.
/ETC/TOMCAT5 Tomcat root directory
The/etc/vsftpd contains configuration files for the FTP server, including important files such as vsftpd.conf, Ftpusers, and User_list.
/ETC/XINETD.D contains the configuration files that are used by all traditional network services that are controlled by the XINETD service process, especially those that include network applications such as Telnet. In the Linux system, the original inetd has been replaced by a more powerful xinetd service process, and the original inetd.conf configuration file is replaced by a series of separate configuration files in the Xinetd.d directory.
/etc/yum contains the configuration files used by the Yum Software Update Tool.
/ETC/YUM.REPOS.D contains the configuration files for each software warehouse.
6)/lib
The/lib directory stores the necessary runtime libraries, primarily the programming language libraries. Typical Linux operating systems include C, C + +, and Fortran library files. Applications developed in these languages can use these programming language library files. This enables software developers to take advantage of pre-written and test-ready functions. The library file contains the standard C library/lib/libc.so.*, the math library libm.so.*, the shared dynamic link library/lib/ld/so, and other shared libraries used in the directory/bin and/sbin. The core module of the/lib/modules directory storage System, some modular parts of the system does not need to compile the kernel of the core ontology, to avoid the large size of the body resulting in reduced efficiency.
7)/lost+found
This directory holds all files that are not associated with any other directory. In the event of a system error or a problem, Fedora automatically scans the disk drive, corrects the error, and if a missing or faulty fragment is found, convert the fragments to a file for further processing by the administrator.
8)/mnt
This directory is the default file system temporary mount point, which is a common installation point that can temporarily install any file system or remote resources. The system administrator executes the mount command to complete the mount operation. In the system, this directory contains the mount points of the optical drive, disk, and floppy drive.
9)/proc
The root directory of the process file system proc, where some files correspond to a running process and can be used to access the address space of the current process. It is a very special virtual file system, which does not contain "actual" files, but can be used to refer to the system information of the current running system, such as CPU, memory, run time, software configuration, and hardware configuration information, which is generated in memory by the system itself.
/proc/net the files represent the status and statistics of various network protocols, such as TCP, UDP, and ARP, respectively.
/proc/sys This directory contains not only a variety of system information, but also the system kernel and TCP/IP network tunable parameters. The kernel subdirectory contains tunable parameters for shared memory and Message Queuing, and the net subdirectory contains various tunable parameters of TCP/IP. For example, the Shmmax file contains the system's maximum shared memory definition, and if you use the echo somevalue >/proc/sys/kernel/shmmax command, you can directly modify the kernel parameters of the running system without rebooting the system. This is prudent, and some files may contain multiple values, or different types of values, so be sure to clarify the meaning and actual values of the parameters before modifying them. In order to use custom system tunable parameters each time you start the system, you can set up a sysctl.conf profile or write your own shell startup script.
)/opt
The/OPT directory is used to install additional packages, and the user calls the package program under directory/opt/package_name/bin, Package_name is the name of the installation package.
One)/root
The root directory of Superuser root (on Linux systems, the slash character "/" is the entire system roots, not the Superuser's home directory.) )
/sbin)
Directories/sbin,/usr/sbin, and/usr/local/sbin store the programs that are executed when the directory starts the system, such as administrative tools, application software, and common root user rights commands. Include commands such as Getty, init, UPDATE, Mkswap, Swapon, and Swapoff. File management tools include Fdisk, fsck, MKFS, and many other network commands, such as Ifconfig and route.
)/tmp
The temporary file directory, by default, for all users to read, write, and execute files. and temporary files that are generated when some programs are executed are also temporarily stored in the directory. All files in this directory will be deleted periodically to prevent the temporary files from being stained with the entire disk, generally do not delete the files in this directory yourself.
)/usr
The/usr directory is the directory location for the largest shared data in a Linux system, such as user commands, library functions, header files, and documents. It can be used as a separate file system or as a subdirectory under the root directory to store user-available programs and data files. So. The following sub-directories function and function as follows:
/usr/bin Place command programs that users can execute, such as Find, free, and GCC.
/usr/lib the library of functions required for many programs and subsystems is placed in that directory.
/usr/local This directory for users to place their own installed applications.
/USR/SRC the directory where the source code is stored, the Linux OS source code is placed in this directory.
/usr/dict Store the dictionary.
/usr/doc to store additional documents.
/usr/games Store games and teaching documents.
/usr/include the header file that holds the C development tool.
/usr/info store GNU information files.
/man store online Help files.
/usr/share stores data that is structurally independent.
/USR/X11R6 Storage X Window System
)/var
The/var directory is used to store volatile data that is constantly changing during system operation. such as printers, mail, news, and logs. The most important of these files is the log file, whether it is the system log, the mail log, or other server logs are placed in the directory.
/var/account is used to store system bookkeeping information.
/var/cache working directory used by programs such as Yum and samba. The various data files used by the cache program, especially the packages and information files that cache yum downloads.
/VAR/FTP FTP Anonymous user's home directory.
/var/lib is used to store package-specific dynamic link shared libraries, configuration files, data files, and status information.
/var/lock is used to store blocking files that are set when a variety of service processes or applications access specific devices or files.
/var/log the directory location where the system and service process logs reside, including Lastlog (related records for each user's last registration), message (log messages for all kernel and system programs logged by SYSLOGD), and wtmp (System registration for all users/ Log off records) and other important documents. Files located in the/var/log directory continue to grow and therefore require regular backup or cleanup. On the Fedora Linux system, a/usr/sbin/logrotate check is performed on a daily basis and the system log files are processed, and obsolete data is deleted, making the file size moderate.
/var/mail This directory contains the mailbox files for each user's e-mail, each of which is named after the user's user name. In the Fedora Linux system, this is just a symbolic link file, the actual directory is located in/var/spool/mail.
/var/named Domain Name Service the directory location where the configuration files used by Bind are located.
/var/run the root directory of the system run information file, which contains the various system service process ID files, and a typical file is/var/run/utmp, which includes the user registration information in the current system.
/var/spool is used to cache various files waiting to be processed, such as e-mail and print tasks. Typically, each type of cache file to be processed is in its own subdirectory, such as/var/spool/mail,/VAR/SPOOL/LPD, and/var/spool/cron.
/var/tmp is used to store various temporary files.
)/Home
If a user named "XX" is established, then there is a corresponding "/home/xx" path in the/home directory, which is used to store the user's main directory.
/sys)
The root directory of the system's various device configuration information. For example, the block subdirectory contains configuration information for disks and disk partitions, and the bus subdirectory contains configuration information and drivers for PCI and USB.
)/srv
The data file used to store the service process provided by the Local system (now an empty directory).
/media)
The installation point of the Removable storage media. When installing Removable storage media using the Gnome interface, the system will automatically install the mobile media into a subdirectory in this directory.
The role and content of Linux directories