Pure dry! Linux under construction Description and purpose of each folder introduction

linux lower structure description and describes the use of each folder:

/ Bin: binary executable command.

/ Dev: device special file.

/ Etc: system administration and configuration files.

/etc/rc.d: startup configuration files and scripts.

/ Home: base point user's home directory, such as the user's home directory user is / home / user, can be represented by ~ user.

/ Lib: standard programming library, also known as dynamic link shared libraries, in a role similar to windows .dll files.

/ Sbin: system management commands, is stored here hypervisor system administrators.

/ Tmp: Temporary files are stored common point.

/ Root: home directory of the system administrator.

/ Mnt: The system provides this directory is to enable users to temporarily mount other file systems.

/ Lost + found: This directory is usually empty, abnormal system shutdown while leaving the "homeless" document here.

/ Proc: virtual directory is the system memory map. You can directly access the directory to obtain system information.

/ Var: some overflow area large file, say a variety of services log files.

/ Usr: The most extensive catalog to use the applications and files in this directory are almost. Which includes:

/ Usr / x11r6: x window of the store directory.

/ Usr / bin: numerous applications.

/ Usr / sbin: some administrative procedures superuser.

/ Usr / doc: linux document.

/ Usr / include: development and header files under linux compile your application needs.

/ Usr / lib: common dynamic link library and package configuration files.

/ Usr / man: Help documentation.

/ Usr / src: source code, linux kernel source code in / usr / src / linux inside.

/ Usr / local / bin: increase local command.

/ Usr / local / lib: libraries increase local root file system.

Typically, the root file system footprint in general be relatively small, because most of the files do not require frequent changes, but also strict file and a small file system do not change often is not easy to damage. Except possibly one called / vmlinuz standard system boot image, generally does not contain any root file. All other files in subdirectories in the root file system.

1. / bin directory

/ Bin directory contains the desired boot command or a user ever used (possibly after booting). These commands are executable binary file (bin is short for binary), multi-system is an important system files.

2. / sbin directory

/ Sbin directory similar to / bin, is also used to store binary files. Because most of the documents are mostly basic system programs used by system administrators, although it can be used when necessary and allow ordinary users, but generally do not give ordinary users.

3. / etc directory

The / etc directory files stored with various system configurations, including the user information file / etc / passwd, the system initialization file / etc / rc like. It was able to run linux normally rely on these documents.

4. / root directory

/ Root directory is the root user's directory.

5. / lib directory

/ Lib directory of the program are shared libraries needed on the root file system to store shared files in the root file system program requires to run. These files contain many programs can be shared code to avoid each program contains a copy of the same subroutine, it is possible to make the executable file smaller, saving space.

6. / lib / modules directory

/ Lib / modules loadable core system directory contains various modules, especially modules required to reboot the system in those systems to recover a corrupted (e.g., network and file system driver).

7. / dev directory

/ Dev directory for a device file that the device drivers, user access to external devices through these files. For example, users can access the mouse input by accessing / dev / mouse, just as access to other file.

8. / tmp directory

/ Tmp directory to store information and data generated by the program at run time. But after booting, running is best to use / var / tmp instead of / tmp, since the former may have a larger disk space.

9. / boot directory

/ Boot directory for the boot loader (bootstrap loader) file used, such as LILO, the core image often placed here rather than in the root directory. But if there are many kernel images, the directory can become large, then it would be better to use a separate file system. Another point to note is that, to ensure that the image must be within the core of the first 1024 cylinders in the ide hard drive.

10. / mnt directory

/ Mnt directory is the system administrator to install temporary mount point (mount) file system. The program does not automatically support the installation to / mnt. / Mnt below can be divided into a number of subdirectories, such as / mnt / dosa might be the floppy drive using the msdos file system, and / mnt / exta might be to use the floppy ext2 filesystem, / mnt / cdrom drive and so on.

11. / proc, / usr, / var, / home directory

Other file system mount points.

Directory tree can be divided into smaller parts, each can on its own disk or partition. The main part is the root, / usr, / var, and / home file system. Each part has a different purpose.

Each machine has the root file system that contains the system boot files and allow other systems to mount the necessary files, the root file system should have enough content necessary for single-user state. It should also include repair a damaged system, backup recovery tool.

The / usr filesystem contains all commands required libraries, man pages and other general operations do not change the file.

/ Usr file should not have to be modified in general use. This allows files in this file system via a network share, so you can be more effective because it saves disk space (/ usr easily be hundreds of megabytes), and easy to manage (When upgrading the application, only the master / usr needs to be changed, without having to change each machine) even if the file system on the local disk, may be read-only mount, to reduce damage to the file system when the system crashes.

/ Var file system containing a file will change, such as spool directory (mail, news, etc. with a printer), log files, formatted manual pages, and temporary files. Traditionally / var everything had somewhere under / usr, but that / usr can not be read-only install.

/ Home file system contains user home directory, that is, all the real data on the system. A big / home might be divided into a number of file system, in / home plus one under names such as / home / students, / home / staff and so on.

The following details:

/ Etc file system

The / etc directory contains various system configuration files, some of which are described below. Else you should know which program they belong to, and read the man page for the program. Many network configuration files are in / etc.

1. / etc / rc or /etc/rc.d or /etc/rc?.d: start, or change the directory scripts or scripts that run when you run the class.

2. / etc / passwd: User database, which gives the user the domain name, real name, user's home directory, encrypted passwords and other user information.

3. / etc / fdprm: floppy disk parameter table to illustrate the different formats of the floppy disk. Available setfdprm set. For more information, see setfdprm help page.

4. / etc / fstab: when starting the system a list of files to be automatically installed. Also includes information swapon -a enable the swap area.

5. / etc / group: Similar / etc / passwd, but the information is not described, but the information the user group. It includes various data sets.

6. / etc / inittab: init configuration file.

7. / etc / issue: output information includes user login prompt before. Usually include a short description of the system or welcome information. Details determined by the system administrator.

8. / etc / magic: "file" configuration file. Description contains different file formats, "file" based on its guess file type.

9. / etc / motd: motd is abbreviated message of the day, the user logs in successfully automatically output. Content determined by the system administrator.

Often used to announce information, such as warnings of planned shutdown time.

10. / etc / mtab: list of file systems currently installed. Initialized by the script (scritp), updated automatically by the mount command. Use (e.g. df command) when a required file list of currently installed systems.

11. / etc / shadow: shadow password file on the shadow password software installed (shadow) system. The encrypted password shadow password file / etc / passwd file is moved to the / etc / shadow, whereas the latter only for the superuser (root) readable. This makes it more difficult to decipher passwords, in order to increase the security of the system.

12. /etc/login.defs:login configuration file commands.

13. / etc / printcap: similar to the / etc / termcap, but for the printer. Different syntax.

14. / etc / profile, / etc / csh.login, / etc / csh.cshrc: bourne or file cshells executed at login or startup. This allows the system administrator to establish global default for all users environment.

15. / etc / securetty: confirm the safety terminal, which terminal that is allowed superuser (root) login. Generally only lists the virtual console, so it is impossible (at least very difficult) via a modem (modem) or network to break into the system and get superuser privileges.

16. / etc / shells: lists the shell can be used. chsh command allows the user to change the login shell in this document specified range. Providing a machine service process ftpd ftp service checking the user's shell is listed in / etc / shells file, if not, will not allow the user to log in.

17. / etc / termcap: terminal capability database. DESCRIPTION different terminals what "escape sequences" control. Does not directly output the escape sequence (this can only work for a particular brand of terminal) written procedures, but to find the correct sequence of work to be done from the / etc / termcap in. Thus, most of the program can be run on most terminal.

/ Dev file system

/ Dev directory contains device files for all devices. Device with a specific file naming conventions, which shows the list of devices. Device file generated by the system when installed, can be used later / dev / makedev described. /dev/makedev.local system administrator for the local device files (or connection) written description document (i.e., as part of some non-standard device driver is not the standard makedev). Some common file Below is a brief introduction / dev.

1. / dev / console: the system console, which is directly connected to the system monitor.

2. / dev / hd: ide hard disk driver interface. Such as: / dev / hda refers to the first hard disk, had1 is first partition / dev / hda of. The other hard disk system, the order of / dev / hdb, / dev / hdc ,.;..... If there are a plurality of partitions were hda1, hda2......

3. / dev / sd: scsi disk driver interface. The system has a scsi hard disk, it will not access / dev / had, but will access the / dev / sda.

4. / dev / fd: floppy device drivers. Such as: / dev / fd0 first floppy disk system, which is commonly referred to as a disk, / dev / fd1 refers to second floppy disk, and / dev / fd1 h1440 1 indicates access to the drive...... the 4.5 compact disk.

5. / dev / st: scsi tape drive driver.

6. / dev / tty: providing a virtual console support. Such as: / dev / tty1 refers to the first virtual console system, / dev / tty2 second system is the virtual console.

7. / dev / pty: provide remote access pseudo-terminal support. During telnet login is necessary to use / dev / pty devices.

8. / dev / ttys: Computer Serial Interface, it is to dos "com1" port.

9. / dev / cua: Computer Serial Interface, for use with a modem device.

10. / dev / null: "black hole", all of the information written to this device will disappear. For example: When you want to output the information on the screen to hide, as long as the input to the output / dev / null can be.

/ Usr file system

/ Usr is a very important directory, the file system is usually large, because all the programs installed here. All files in / usr in general from linux distribution; locally installed programs and other stuff under / usr / local, as it can without having to reinstall the entire program when you upgrade or a new release of the new system. Many contents of the / usr directory is optional, but these features make the user to use the system more efficient. / Usr can accommodate many large software packages and their configuration files. Here are some important directories (some of the less important directories have been omitted) list.

1. / usr / x11r6: All executables, configuration files, and support files containing x window system. To simplify the development and installation of x, x is not integrated into the file system. x window system is a powerful graphical environment, provides a number of graphical utilities. If microsoft windows users are more familiar with it, you would not have x window system feel helpless.

2. / usr / x386: Similar / usr / x11r6, but is dedicated to the x 11 release 5.

3. / usr / bin: concentrated almost all user commands, the system software libraries. Some other commands in / bin or / usr / local / bin in.

4. / usr / sbin: it contains the root file system unnecessary system management commands, such as most of the service program.

5. / usr / man, / usr / info, / usr / doc: The directory contains all the manual pages, gnu information documents and various other document files. "Festival" each online manual has two subdirectories. For example: / usr / man / man1 contains the online manual first source (not original file format), / usr / man / cat1 contains the formatted content first. Online manual is divided into nine sections: internal commands, system calls, library functions, device, file format, games, macro package, system management and core processes.

6. / usr / include: c contains language header files, these files are mostly end .h, c language used to describe the data structures used in the program, constants and subroutines. For consistency, this should actually be placed in the / usr / lib, but the habit has been used for the name.

7. / usr / lib: it contains the same data file or a program subsystem, including a number of site - wide profile. Name lib comes from library (library); original programming library there / usr / lib Lane. When compiling the program, and the program will be one of the libraries to connect. There are also many programs the configuration file into it.

8. / usr / local: locally installed software and other files placed here. This is similar to / usr. Users may find that some of the larger software packages, such as tex, emacs, etc. on this.

/ Var file system

/ Var runtime system generally comprises a data to be changed. The size of the directory is usually where these data are constantly changing to or expanded. The original / var directory of some of the content is in / usr, but in order to maintain the relative stability of the / usr directory, put the directory that require frequent changes put in / var a. It is specific for each system, i.e., not shared with other computers via a network. Here are some important directories (some of the less important directories omitted).

1. / var / catman: include formatted assistance (man) page. Help page source files are generally present / usr / man / catman in; some man page may have pre-formatted version, there is / usr / man / cat in. While others will need to be formatted man pages in the first look, complete formatted version exists / var / man in so that others will not have to wait to look the same when formatting the page. (/ Var / catman is often clear, as clear as the temporary directory.)

2. / var / lib: storage systems up and running when you want to change the file.

3. / var / local: storage / usr / local variable data program installed (i.e., the system administrator to install a program). Note that, if necessary, even locally installed programs should use the other / var directory, such as / var / lock.

4. / var / lock: lock file. Many programs follow a lock file in / var / lock in the agreement, they are to be used to support the use of a particular device or file. Other programs will notice the lock file, you will not use this device or file.

5. / var / log: Log various programs (log) files, especially (login and logout / var / log / wtmplog to record all of the system) login and syslog (/ var / log / messages record and store all core information system program). / Var / log where files are often grow indefinitely, should be regularly cleared.

6. / var / run: Save the following useful information about the file system before the system boot. For example, / var / run / utmp contains information of the user currently logged on.

7. / var / spool: placing "spool (spool)" program directory, such as mail, news, printer queues, and other work queues. Each different spool has its own subdirectory in / var / spool, for example, the user's mailbox will be stored in / var / spool / mail in.

8. / var / tmp: temporary files to allow greater or longer than the required presence / tmp. Note that the system administrator might not allow / var / tmp has a very old one.

/ Proc file system

/ Proc file system is a pseudo file system, that it is actually a directory that does not exist, so this is a very special directory. It does not exist on a disk, but by the kernel in memory. This directory is used to provide information about the system. The following describes some of the most important files and directories (/ proc file system is described in more detail in the proc man page).

1. / proc / x: catalog information about the process x, which x is an identification number that process. Each process has a directory named own process ID in / proc.

2. / proc / cpuinfo: storing information processor (cpu), as cpu type, manufacturer, model, and performance.

3. / proc / devices: List of device drivers configured into the kernel currently running.

4. / proc / dma: display dma channel currently in use.

5. / proc / filesystems: core configuration file system information.

6. / proc / interrupts: interrupt information and display information occupants are occupied, and the number is occupied.

7. / proc / ioports: currently used i / o ports.

8. / proc / kcore: physical system memory image. Exactly the same as the physical memory size, but in fact did not take up so much memory; it is only when the program was created to access it. (Note: unless you copy it to any place, otherwise there is no under / proc anything take up any disk space.)

9. / proc / kmsg: core output message. It would be sent to syslog.

10. / proc / ksyms: Core symbol table.

11. / proc / loadavg: System "load average"; 3 no sense indicator indicates the current system workload.

12. / proc / meminfo: various memory usage information, including the physical memory and swap (swap).

13. / proc / modules: which store currently loaded kernel module information.

14. / proc / net: Network protocol state information.

15. / proc / self: store to view / sign proc process directory of the program connection. When the two processes View / proc, this will be a different connection. This is mainly to facilitate the program gets its own process directory.

16. / proc / stat: different states of the system, for example, the number of errors occurred after system startup page.

The length of time the system starts: 17. / proc / uptime.

18. / proc / version: Core version.

Under / usr / local directory you typically install the software, this directory is equivalent to programefiles in the windows directory

/ Opt This directory is the installation directory of some large-scale software, or some of the installation directory service program

For example: I just installed the beta version of firefox, you can opt to install under / / firefox_beta directory, / opt / firefox_beta directory contains all the files, libraries, data needed to run firefox and so on. To delete firefox, you simply delete the / opt / firefox_beta directory can be very simple.

/usr/local

Here 's where most manually installed, that is, not through the "Synaptic" or apt-get install the software. It and the / usr directory having a similar directory structure. Let the package manager to manage the / usr directory, and put any custom scripts (scripts) into the / usr / local directory, I think this should be a good idea.

Source: Small Ningge

www.cnblogs.com/xningge/p/8331631.html

Guess you like

Origin www.cnblogs.com/WIU1905/p/11802874.html
Recommended