Linux directory tree

Source: Internet
Author: User

Linux Directory Trees (directory tree)

Hierarchies (unlike database file systems), the maximum length of a single file/directory is 255 characters and the full path is 4,096 characters

Special File System

File system

Mount point

Description

Root

/

base point of Linux system Operation

Proc

/proc

Operation interface for accessing system kernel data in File system mode (2.4,2.6)

Sysfs

/sys

Operation interface for accessing system kernel data in File system mode (2.6)

Tmpfs

/dev,/var/run,/var/lock

The file system that the program uses when accessing shared memory resources

Usbfs

/proc/bus/usb

file system to use when accessing USB devices

Devpts

/dev/pts

The file system that the kernel uses to interact with the pseudo-terminal

Swap

Special file system used by the kernel , no mount point

Create virtual memory

/(root, Root): The starting point of the directory tree, derived from other directories and related to the boot, restore, system repair, so the smaller the root directory, the better

/bin

Command/execute files in single-user maintenance mode, commands that the general user can execute

The commands required by the base system. Functions and/usr/bin are similar, the files in this directory are executable and can be used by ordinary users.

/sbin

Setup system environment/system maintenance files required during boot, requires root permission

/dev

Devices and interfaces are stored as files in this directory, and read-write files are equivalent to operating interfaces/devices

/etc

System main configuration file (do not place the executable file binary)

/lib

function libraries required to execute files and modules required by the kernel

library files and kernel modules

/boot

boot files, Linux kernel (load) file/boot menu/boot profile, etc. (Vmlinuz/grub)

Kernel and the files required to load the kernel. In general, the GRUB or LILO system Boot Manager is also located in this directory.

/home

User home folder (home directory)

/media

Removable device floppy/media/floppy, CD/media/cdrom

The mount point of a plug-and-play storage device is automatically created in this directory, such as a USB drive, Cdrom/dvd automatically mounted, and a directory is created in this directory.

/mnt

Temporarily mount

/opt

Third-party software configuration

/root

System Administrator Home folder

/srv

Data required for network services

Store the site service data provided by the system.

/tmp

Temp Folder

/lost+found

This directory is usually at the top level of the EXT2/EXT3 partition, with the intention of placing some missing fragments in this directory when the file system is in error

/proc

Virtual file system (Vsan filesystem), recording kernel, process, device status, etc. in memory

/sys

Virtual file system, recording kernel-related information, loaded kernel modules/detected hardware devices, etc.

/usr

UNIX Operating system software resources (Unix software Resource) similar to program file

Store user information such as commands, help files, etc. using system commands and applications.

/var

Runtime generated dynamic files, including cache, login file (log files), Program Files (lock File,run file), database files, etc.

Store data that is constantly changing.

Other important catalogs

/USR/X11R6 the directory where X Window is stored
/usr/bin stores a number of user commands
/usr/games
Store games and educational software
/usr/include store the header files needed to develop and compile applications under Linux
/usr/lib
Put some common dynamic link shared libraries and static archives
/usr/local provides local users with the/usr directory, where local application software is installed
/usr/sbin
The hypervisor that hosts the root super user
/usr/share system common storage place, such as: manuals, documents, fonts, etc.
/USR/SRC is the directory where the kernel source is stored

/usr/x11r6/

X Windows system Important data Placement Directory

/usr/bin/

Most users can use the command (as opposed to whether the/bin is related to the boot process)

/usr/include/

Header file and include file for voice

/usr/lib/

Application software libraries, target files, executable files or scripts that are not commonly used by the general user

/usr/local/

The system administrator installs the directory to download the software by itself

/usr/sbin/

System commands required for non-system uptime

/usr/share/

Shared files with virtually no data readable by the hardware architecture

/usr/src/

Source directory (kernel source code under/usr/src/linux)

/var/cache/

Staging files during program run

/var/lib/

directory where data files are placed, such as mysql:/var/lib/mysql,rpm:/var/lib/rpm

/var/lock/

The device/file can only be accessed by one program (Lock), such as a recorder, printer, etc.

/var/log/

Login files, such as:/var/log/messages,/var/log/wtmp (login information), etc.

/var/mail/

Personal mailbox directory, usually linked files with/var/spool/mail/

/var/run/

Service-initiated PID storage directory

/var/spool/

Queue data, such as new letters/VAR/SPOOL/MAIL, send letters/var/spool/mqueque, etc.

/etc/x11/

X Settings directory for Windows

/etc/altermatives

Store a linked directory of two/More selected one with the same function program

/etc/apm

Configuration directory for Advanced Power management

/etc/init.d

Daemon Startup script Directory

/etc/logrotate.d

Configuration directory for log scrolling scripts

/etc/lvm

LVM2 Configuration Directory

/etc/opt

Configuration directory for the/OPT application

/etc/pam.d

Pam Configuration Directory

/etc/pcmcia

PCMCIA Device Configuration Directory

/etc/ppp

PPP Device configuration Directory

/etc/rc?. D

Start, change the scripts directory at runtime

/etc/skel

Normal User Initialization Environment directory

/etc/ssh

Configuration directory for SSH

/etc/vim

Vim's configuration directory

/etc/w3m

Configuration directory for w3m

/etc/yum

Configuration directory for Yum

/etc/yum.repos.d

Configuration directory for Yum source

/proc/n

n is PID, each process has a directory named its process number under/proc

/proc/cpuinfo

Processor information, such as: type, manufacturer, model, performance

/proc/devices

Device driver list for the currently running core configuration

/proc/dma

DMA channel currently in use

/proc/filesystems

File system for Core configuration

/proc/interrupts

Interruption of Use

/proc/ioports

The I/O port used

/proc/kcore

System physical memory image, exactly the same size as physical memory, but not actually consuming memory

/proc/kmsg

Core output messages are also sent to the syslog

/proc/ksyms

Core symbol Table

/proc/loadavg

System load Balancing: 3 Indicators indicate the current workload

/proc/meminfo

Memory usage information, including physical memory and virtual memory

/proc/modules

The core module currently loaded

/proc/net

Network protocol Status

/proc/self

View a symbolic link to a program in the/proc directory,

/proc/stat

System Status

/proc/uptime

The length of time the system starts

/proc/version

Kernel version Information

Absolute Directory & Relative path

Absolute paths start with the root directory (/), such as:/home, relative paths, such as: CD Var/log CD. /.. /home etc

Linux files

The Linux system does not deliberately differentiate the type of file, but can be added by management suffix, the file name is up to 255 characters, the full path length is 4,096 characters, the file name avoids special characters *?<>;&! []|\(){}

Type of file (ls-l first character)

-Normal files (regular file): Plain text files (ASCII cat viewable)/binary files (binary executables)/data format files (such as log files and other special files such as cat garbled)/source code/shell scripts, etc.:

D Directory files: A directory is a special type of file that stores the filenames and nodes under it, maintained by Linux management, and users can access but not directly modify the contents of a catalog file

L Link file: Is that different file name refers to the same data or program, (pointing to the same block node) also known as a hard connection (for the same file system), any file update will be reflected in other files. A symbolic link file can be used to create a connection file across different physical file systems. The symbolic connection file itself is also a separate data file whose content is a path name to a file or directory

Device files/Special files (special type):

Block device files: A storage device that is associated with a block's organization and processing of a device (disk) that transmits data in a fixed-length block of data, and that can randomly access any of its data blocks, such as disk-to-memory transmission of data in a block-like way, with a file system, Can read and write hot bytes of data at any location on the disk

C-character (character) device files: Any non-data block organization device is a character device, the character device can not be randomly accessed (can not randomly intercept the keyboard), its lowest I/O interface can only handle one character at a time, the mouse, keyboard, console terminal, printer and other serial devices are character special files

s sockets (Sockets): For connection to data on the network, and for Datacom

P Pipeline (fifo,pipe): First-in-first-out first-out, the main purpose is to solve the problems caused by multiple programs to access a file at the same time, there are two kinds of pipelines in Linux system: normal pipe/pipeline file, A normal pipeline is a data buffer that can be identified and accessed by a file descriptor, which disappears automatically after the execution of the program, and the pipe file is present in the system file system as a special file, so the pipe file is also named pipe (named pipe)

Linux directory tree

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.