Introduction to Ubuntu folders [reprint]

Source: Internet
Author: User
Tags syslog temporary file storage ide hard drive

The original address:Ubuntu folder Introduction Superzhy

About Ubuntu folders

/bin binary Executable command
/dev Device files (HDD/CD-ROM, etc.)
/etc system administration and configuration files
/ETC/RC.D startup configuration files and scripts
/home User master directory, which will have the folder name as the login user name
/LIB Standard Program Design Library is also called dynamic Link Shared library, acting like a. dll file in Windows
/sbin System Management commands, which are stored in the hypervisor used by the system administrator
/tmp Common temporary file storage point
/root system Administrator's home directory
The/MNT system provides this directory to allow users to temporarily mount other file systems.
/lost+found This directory is usually empty, the system is not properly shutdown and left "homeless" files
/proc a virtual directory, which is a mapping of system memory. This directory can be accessed directly to obtain system information.
/var overflow area for some large files, such as log files for various services
/usr The largest directory, the applications and files to be used almost all in this directory. These include:
Directory of/USR/X11R6 X-window
/usr/bin applications
/usr/sbin Some management programs for super users
/usr/doc Linux Documentation
/usr/include the header files needed to develop and compile applications under Linux
/usr/lib Common dynamic-link libraries and package profiles
/usr/man Help Documentation
/USR/SRC source code, the Linux kernel source is placed in the/usr/src/linux
/usr/local/bin Local Add-on command
/usr/local/lib local additions to the library
Typically, the root filesystem occupies a smaller space because most of the files do not need to be changed frequently, and include strict files and a small, infrequently changed file system that cannot be easily damaged.
In addition to a possible system boot image called the/vmlinuz standard, the root directory generally does not contain any files. All other files are in subdirectories of the root file system.
1./bin Directory
The/bin directory contains commands that are required for boot startup or commands that may be used by ordinary users (possibly after boot boot). These commands are binary executable programs (bin is the binary-binary abbreviation), most of the system is an important system file.
2./sbin Directory
The/sbin directory is similar to/bin and is also used to store binary files. Since most of these files are the basic system programs used by the system administrator, they are generally not used by ordinary users, although they can be used when necessary and permissible.
3./ETC Directory
The/etc directory holds various system configuration files, including user information file/etc/passwd, System initialization file/ETC/RC and so on. Linux is the only way that these files can run properly.
4./root Directory
The/root directory is the Super User directory.
5./lib Directory
The/lib directory is the shared library required by the program on the root file system, which holds the shared files required for the root file system program to run. These files contain code that can be shared by many programs to prevent each program from having a copy of the same subroutine, making the executable smaller and space-saving.
6./lib/modules Directory
The/lib/modules directory contains system cores that can load various modules, especially those needed to reboot the system when recovering a damaged system (for example, network and file system drivers).
7./dev Directory
The/dev directory holds device files, which are device drivers, through which users access external devices. For example, the user can access the/dev/mouse to access the mouse input, just like accessing other files.
8./tmp Directory
/tmp directory store information and data generated by the program at run time
9./boot Directory
The/boot directory holds the files used by the boot loader (bootstraploader), such as Lilo, and the core image is often placed here, rather than in the root directory. But if there are many core images, this directory can become very large, and it would be better to use a separate file system. It is also important to note that the core image must be within the first 1024 cylinders of the IDE's hard disk.
10./mnt Directory
The/MNT directory is the installation point of the system administrator temporary mount (mount) file system. The program does not automatically support installation to/mnt. /mnt The following can be divided into many subdirectories, such as/mnt/dosa may be using the Msdos file system floppy drive, and/mnt/exta may be the use of ext2 file system floppy drive,/mnt/cdrom optical drive and so on.
Detailed introduction below;
/etc File System
/etc directory contains various system configuration files
1./ETC/RC or/etc/rc.d or/ETC/RC? D A directory that starts, or alters, a script or script that runs at run-time.
The 2./ETC/PASSWD user database, where the domain gives the user name, real name, user start directory, encrypted password, and other information for the user.
3./ETC/FDPRM floppy disk parameter table to illustrate the different floppy format. Can be set with SETFDPRM. See the SETFDPRM help page for more information.
4./ETC/FSTAB Specifies the list of file systems that need to be installed automatically at startup. Also includes information about the swap area enabled with SWAPON-A.
5./etc/group is similar to/etc/passwd, but it does not describe user information but group information. Includes various data for the group.
6./etc/inittab Init's configuration file.
7./etc/issue includes the user's output information before the logon prompt. Usually includes a short description of the system or a welcome message. Specific content is determined by the system administrator.
8./etc/magic the configuration file for "file". Contains a description of the different file formats, "file" based on it guessing the file type
9./ETC/MOTD MOTD is an abbreviation for Messageoftheday, which is automatically exported after the user has successfully logged in. The content is determined by the system administrator. Often used to advertise information, such as warnings for scheduled shutdown times.
10./etc/mtab the list of currently installed file systems. Initialized by the script (SCRITP) and updated automatically by the Mount command. Used when a list of currently installed file systems is required (for example, the DF command).
11./etc/shadow the shadow password file on the system where the Shadow (shadow) password software is installed. The shadow password file moves the encrypted password in the/etc/passwd file to/etc/shadow, which is only readable by the superuser. This makes it more difficult to decipher the password, which increases the security of the system.
12./etc/login.defs the login command configuration file.
13./etc/printcap similar to/etc/termcap, but for printers. syntax is different.
14./etc/profile,/etc/csh.login,/ETC/CSH.CSHRC the files that are executed Bourne or cshells at logon or startup. This allows the system administrator to establish a global default environment for all users.
15./etc/securetty confirms the secure terminal, which terminal allows Superuser to log on. Only virtual consoles are generally listed, which makes it impossible (at least difficult) to break into the system via a modem or network and gain superuser privileges.
16./etc/shells lists the shells that you can use. The CHSH command allows 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 whether the user shell is listed in the/etc/shells file, and if not, the user will not be allowed to log on.
17./ETC/TERMCAP Terminal Performance database. Describes what "escape sequence" controls are used by different terminals. Instead of outputting the escape sequence directly (so that it works only with a particular brand of terminal), the program looks for the correct sequence of work to be done from/etc/termcap. In this way, most programs can run on most terminals.
/dev File system
The/dev directory includes device files for all devices. The device file is named with a specific convention, which is described in the device list. Device files are generated by the system at installation and can later be described with/dev/makedev/dev/makedev.local is a description of the system administrator's written for local device files (or connections) (such as some non-standard device drivers are not part of the standard Makedev). Below is a brief introduction to some of the commonly used files in/dev.
The 1./dev/console system console, which is a direct and system-attached monitor.
2./DEV/HD IDE hard Drive driver interface
3./DEV/SD SCSI Disk driver interface. If the system has a SCSI hard disk, it will not access the/dev/had, but will access the/DEV/SDA.
4./DEV/FD Floppy drive device driver. If/dev/fd0 refers to the first floppy disk of the system
5./DEV/ST SCSI tape drive driver.
6./dev/tty provides Virtual Console support. As/dev/tty1 refers to the first Virtual console of the system
7./DEV/PTY provides remote login pseudo terminal support. The/dev/pty device is used for Telnet login.
8./dev/ttys computer serial interface, for DOS is "COM1" port.
9./dev/cua a computer serial interface, a device that is used with a modem.
10./dev/null "Black hole", all information written to the device will disappear. For example: When you want to hide the output information on the screen, simply enter the output information into/dev/null.
/usr file system
/usr is a very important directory, usually this file system is very large, because all programs are installed here. All files in/usr typically come from Linux distributions (distribution), locally installed programs, and other things under/usr/local, as this can be done without reinstalling all the programs when upgrading a new system or release. Many of the contents of the/usr directory are
Optional, but these features make it more efficient for users to use the system. /usr can accommodate many large packages and their configuration files. Some important directories are listed below (some of the less important directories have been omitted).
1./usr/x11r6
Contains all executable programs, configuration files, and support files for the Xwindow system. To simplify the development and installation of x, files for x are not integrated into the system. The Xwindow system is a powerful graphical environment that provides a large number of graphical tool programs. If the user is familiar with microsoftwindows or machintosh, they will not feel helpless to the Xwindow system.
2./usr/x386
Similar to/USR/X11R6, but specifically for X11RELEASE5.
3./usr/bin
Centralized almost all user commands, is the software library of the system. Some other commands are in/bin or/usr/local/bin.
4./usr/sbin
Includes unnecessary system administration commands for the root file system, such as most service programs.
5./usr/man,/usr/info,/usr/doc
These directories contain all manual pages, GNU information documents, and various other documentation files. Each online manual has two subdirectories for the section. For example:/usr/man/man1 contains the source code for the first section of the online manual (no formatted original file),/USR/MAN/CAT1 contains the first section of the formatted content. The online manual is divided into the following nine sections: internal commands, system calls, library functions, devices, file formats, games, macro packages, System management, and core programs.
6./usr/include
Contains the header files of the C language, which are used to describe the data structures, sub-procedures, and constants in the C language program, which end with. H. In order to maintain consistency, this should actually be placed under the/usr/lib, but it is customary to use the name
Word.
7./usr/lib
Contains the immutable data files for the program or subsystem, including some site-wide configuration files. The name Lib originates from the library, and the original library of programming exists in the/usr/lib. When the program is compiled, the program connects to the library. There are also a number of programs that store configuration files.
8./usr/local
Locally installed software and other files are placed here. This is similar to/usr. Users may find some of the larger packages, such as Tex, Emacs, and more.
/var file system
/var contains data to be changed when the system is generally running. Usually the size of the directory in which the data resides is constantly changing or expanding. In the original/var directory, some of the content is in/usr, but in order to maintain the relative stability of the/USR directory, the directories that need to change frequently are placed in/var. Each system is specific, i.e. it is not shared with other computers over the network.
Some important directories are listed below (some of the less important directories are omitted).
1./var/catman
The formatted Help (man) page is included. The source file for the help page is generally present in/usr/man/man, and some man pages may have a pre-formatted version, which exists in/usr/man/cat. While the other man pages need to be formatted for the first time, the formatted version exists in/var/man so that other people can look at the same page without waiting for formatting. (/var/catman are often cleared, just as you would clear a temporary directory.) )
2./var/lib
The file to be changed when the system is in normal operation.
3./var/local
Variable data that holds the programs installed in the/usr/local (that is, programs installed by the system administrator). Note that if necessary, even locally installed programs will use other/var directories, such as/var/lock.
4./var/lock
Lock the file. Many programs follow the convention of creating a locked file in/var/lock to support their use of a particular device or file. Other programs will not use this device or file when they notice the lock file.
5./var/log
Logs (log) files for various programs, especially login (/var/log/wtmplog records all log-in and logoff to the system) and Syslog (/var/log/messages Records store all core and System program information). The files in the/var/log often grow in uncertainty and should be cleaned up regularly.
6./var/run
Save the information file about the system that is valid before the next system boot. For example,/var/run/utmp contains information about the user who is currently logged on.
7./var/spool
A directory that places "spool (spool)" programs, such as Mail, news, print queues, and other queues that work. Each of the different spool has its own subdirectory under/var/spool, for example, the user's mailbox is stored in/var/spool/mail.
8./var/tmp
Temporary files that are larger or require a longer time than/TMP are allowed. Note system administrators may not allow/var/tmp to have very old files.
/proc File System
The/proc file system is a pseudo file system, which means that it is a directory that does not actually exist, so this is a very special directory. It does not exist on a disk, but is generated in memory by the core. This directory is used to provide information about the system. Here are some of the most important files and directories (the/proc file system is described in more detail on the Procman page).
1./proc/x the directory of information about process X, which is the identification number for this process. Each process has a directory called its own process number under/proc.
2./proc/cpuinfo stores information about the processor (CPU), such as the type of CPU, manufacturer, model, and performance.
3./proc/devices a list of device drivers for the currently running core configuration.
4./PROC/DMA Displays the DMA channel currently in use.
5./proc/filesystems the file system information for the core configuration.
6./proc/interrupts Displays the information about the interrupt information and occupants that are occupied, and the amount that is occupied.
7./proc/ioports the I/O port currently in use.
8./proc/kcore System physical memory image. It is exactly the same size as the physical memory, but it does not actually occupy so much memory; it is only created when the program accesses it. (Note: Unless you copy it somewhere, there's nothing in the/proc that takes up any disk space.) )
9./proc/kmsg the core output message. will also be sent to the syslog.
10./proc/ksyms core symbol table.
11./proc/loadavg system "average load"; 3 meaningless indicators indicate the current workload of the system.
12./proc/meminfo various memory usage information, including physical memory and swap partition (swap).
13./proc/modules stores which core module information is currently loaded.
14./proc/net Network protocol status information.
15./proc/self the symbolic connection to the process directory that is stored to view the/PROC program. When 2 processes view/proc, this will be a different connection. This is primarily convenient for the program to get its own process directory.
16./proc/stat the different states of the system, for example, the number of times a page error occurred after the system started.
17./proc/uptime the length of time the system started.
18./proc/version Core version.

Introduction to Ubuntu folders [reprint]

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.