Linux directory structure and function detail

Source: Internet
Author: User
Tags syslog system log

1, Linux system different directory can be distributed in different partitions or different hard disk devices, which is difficult for windows to reach. Directory and disk partitions are not associated.
2, Mount point is the entry of the system into the equipment. such as Mount/dev/cdrom/mnt is to/mnt and/dev/cdrom link up.
3. All catalogs are organized and named according to certain categories. FHS (directory hierarchy) is the directory specification standard for Linux.
4, the following detailed introduction

Common directory features in Linux systems are as follows:
? /root directory; File system entry, highest level directory
? /bin common binary command directory; similar to/usr/bin;
? /boot Store the kernel and the required files for boot;
? /dev Store the device file directory, such as sound card, disk, optical drive, etc. ;
? /etc Storage System configuration file;
? /home directory of ordinary users, the user data is stored in their home directory;
? /lib|lib64 to store the necessary running libraries;
? /MNT is generally used to temporarily mount the storage device mount directory, such as a cdrom,u disk directory, directly inserted into the optical drive can not be used, to be mounted after use. ;
? /PROC Store process and system information;
? /root home directory for super users;
? /sbin mostly involves the storage of system-managed commands, which is the root of the super-privileged user's command, and this directory is similar to the/usr/sbin,/usr/x11r6/sbin or/usr/local/sbin directory;
? /tmp store temporary files;
? /USR stores applications, commands program files, libraries, manuals, and other documents;
? /var stores the system log and cache log directory.
/ etc File System
/etc/sysconfig/network-scripts/ifcfg-eth0 configuration IP,GW and so on.
/etc/resolv.conf Configure client DNS for this computer.
/etc/hosts Configure the corresponding parsing table for IP and domain names.
/etc/fstab/record the file system to be mounted, all partitions will be automatically mounted on boot
/etc/inittab set the system boot level and startup file settings.
/ETC/INIT.D Storage System Startup script
/etc/profile system global Variable configuration path
/ETC/PASSWD account Information
/etc/sudoers sudo command configuration file
/etc/syslog.conf System Log parameter configuration
/etc/skel/The directory is copied to the home directory when the user is created by default
/etc/sysconfig/network configuration of machine name and network card startup.
/etc/exports set the configuration file path for the NFS system.
/ETC/XINETD.D if the server is running in xinetd mode, its script will be placed in this directory.
/ETC/RC or/ETC/RC.D or/etc/rc.d the directory of scripts or scripts that run when the run level is started or changed.
/etc/group Setting the user's group name and related information
/ETC/MOTD MOTD is the abbreviation for message of the day, which automatically outputs the notification information when the user logs in successfully.
/etc/modprobe.conf Kernel module Additional parameter setting
/etc/dir_colors Setting the Color
/etc/protocols System-supported protocol files
/etc/x11x Window's configuration file
/etc/issue record the information displayed before the user logs in
/etc/mtab the list of currently installed file systems. Initialized by scripts and updated automatically by the Mount command. A list of currently installed file systems is required, such as the DF command.
/etc/login.defs set user account limits for files
/etc/shells Lists the trusted SHELL.CHSH command to allow the user to change the login shell within the scope specified in this file. A service process that provides a machine FTP service FTPD checks to see if the user shell is listed in the/etc/shells file. If it is not, the user will not be allowed to log on.
/etc/securetty confirm the secure terminal, which terminal allows root login. Typically only virtual consoles are listed, which makes it impossible (at least difficult) to break into the system via modem or network and gain superuser privileges.

/usr file system
/USR/X11R6 storage of the X-windows directory;
/usr/games Store the Xteamlinux bring the small game;
/usr/doclinux technical documentation;
/usr/include is used to store the header files needed to develop and compile applications under Linux;
/usr/lib store Some common dynamic link shared libraries and static archives;
/usr/man the directory where the Help document resides;
/usr/srclinux Open Source Code, there is this directory, enthusiasts do not let go oh;
/usr/bin/Non-essential executables (not required in single-user mode), for all users.
/usr/lib/libraries for binaries in/usr/bin/and/usr/sbin/.
/usr/sbin/non-essential system binaries, such as: The daemon of a large number of network services.
/usr/share/Architecture-Independent (shared) data.
/usr/src/source code, for example: Kernel source code and its header file.
/usr/x11r6/x Window System version one, release 6.
/usr/local/the third level of local data, specifically to the host computer. In general, there are further subdirectories, such as: bin/, lib/, share/. This is the/USR directory provided to the general user, where the general application software is installed;

/proc File System
A virtual file system that archives the kernel and process state as a text file (System information is stored in this directory). For example: uptime, network. In Linux, the corresponding PROCFS format is mounted. Files in this directory can only be viewed and cannot be changed (including root)
/proc/meminfo Viewing memory information
/proc/loadavg remember top and uptime? That's right! The top three average values are recorded here!
/proc/uptime is to use uptime time, will appear the information!
/proc/cpuinfo information about the processor, such as type, manufacturer, model, and performance.
/proc/cmdline load kernel when the relevant parameters issued! Check out this file to see how the system started!
/proc/filesystems current system has loaded the file system ROM!
/proc/interrupts the IRQ assignment status above the current system.
/proc/ioports the I/O addresses configured for each device on the current system.
/proc/kcore This is the size of the memory! It's so big, right? But don't read him!
/proc/modules currently our Linux has loaded the list of modules can also be thought of as a driver!
The data that is already mounted on the/proc/mounts system is the data that is called with the Mount command!
/proc/swaps what is the memory where the system hangs and loads? Oh! The use of the partition is recorded here!
/proc/partitions use fdisk-l will appear all the partition right now? There is also a record in this document Oh!
/proc/pci the details of each device on the PCI bus line! Lspci can be used to check!
/proc/version core version, is the content of UNAME-A display!
/proc/bus/Some bus line devices, as well as a U disk device is also recorded here Oh!
/PROC/DMA Displays the currently used D-M channel.
/proc/filesystems the file system information for the core configuration.
/proc/interrupts Displays the information about the interrupt information and occupants that are occupied, and the amount that is occupied.
/proc/ioports the I/O port currently in use.
/proc/kcore System physical memory image.
/proc/kmsg the core output message. will also be sent to S Y S l o G.
/proc/ksyms core symbol table.
/proc/loadavg system "average load"; 3 meaningless indicators indicate the current workload of the system.
/proc/meminfo various memory usage information, including physical memory and swap partition (s w a P).
/proc/net Network protocol status information.
/proc/self the symbolic connection to the process directory that is stored to view the/PROC program.
/proc/stat the different states of the system, for example, the number of times a page error occurred after the system started.

/ var file system/var includes data to be changed when the system is generally running. Each system is specific, i.e. it is not shared with other computers over the network.
/var/log/message log information, automatic polling by week
/var/spool/cron/root Timer configuration file directory, by default by user name
/var/log/secure records Log in system access information files, regardless of authentication success or authentication failure will be recorded
/var/log/wtmp record the information of the lander, last,who,w command information from the source
/var/spool/clientmqueue/when the mail service is not turned on, all messages that should be sent to the system administrator are stacked in this
/var/spool/mail/Mail Directory
/var/tmp is larger than/TMP allowed or needs to exist for a longer time temporary file
/var/lib the file to be changed when the system is running normally.
Variable data for programs installed in/var/local/usr/local (that is, programs installed by the system administrator). Note that if necessary, even locally installed programs use other/var directories, such as/var/lock.
/var/lock Lock the file. Many programs follow the convention of creating a locked file in/var/lock to support a particular device or file that they are using. Other programs Note that this lock file will not attempt to use this device or file.
/var/log/log files for various programs, especially login (/var/log/wtmp log all to system log-in and logoff) and syslog (/var/log/messages store all core and System program information./var/log Files often grow in uncertainty and should be cleaned up regularly.
/var/run The information file that is valid for the system before the next boot. such as/var/run/utmp contains information about the currently logged-on user.
The/var/cache/application caches data. This data is a time-consuming I/O or calculation result that is generated locally. The application must be able to regenerate or restore data. Cached files can be deleted without causing data loss.
/ Dev File system
/dev/hd[a-t]ide Equipment
/DEV/SD[A-Z]SCSI Equipment
/DEV/FD[0-7] Standard Floppy drive
/DEV/MD[0-31] Soft RAID device
/DEV/LOOP[0-7] Local loopback device
/DEV/RAM[0-15] Memory
/dev/null Infinite data receiving device, equivalent to black hole
/dev/zero Unlimited 0 Resources
/DEV/TTY[0-63] Virtual terminal
/DEV/TTYS[0-3] Serial Port
/dev/lp[0-3] and the mouth
/dev/console Console
/dev/fb[0-31]framebuffer
/dev/cdrom=>/DEV/HDC
/dev/modem=>/dev/ttys[0-9]
/dev/pilot=>/dev/ttys[0-9]
/dev/random Random number Device
/dev/urandom Random number Device

Linux directory structure and function detail

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.