file structure under linux, and see why each folder is using
/ bin binary executable command
/ dev device special file
/ etc system management and configuration files
configuration files and startup scripts /etc/rc.d
/ home user point 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, a role similar to windows .dll files in the
/ sbin system management command, here is the stored procedure management system administrators
/ tmp common temporary file storage point
/ root system administrator's home directory (Oh, the privileged class)
/ mnt 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" file (.chk what is called under windows) 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 file
/ usr largest directory, use the applications and files to almost all of this directory. Which includes:
/ usr / X11R6 store x window of the directory
/ usr / bin numerous applications
of some management program / usr / sbin superuser
/ usr / doc linux documentation
to develop and compile the application under / usr / include linux needed head File
/ usr / lib common dynamic link library and the package configuration file
/ usr / man help file
/ usr / src source code, linux kernel source code in / usr / src / linux in
/ usr / local / bin locally added command
/ usr / local / lib increase in local libraries
Typically, the root file system footprint in general be relatively small, because most of the documents do not need
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.
- / bin directory
/ bin directory contains the required boot command or a user ever used (possibly after booting). These
commands are executable binary file (bin is binary - - short for binary), multi-system is an important system files. - / sbin directory
/ sbin directory similar to / bin, is also used to store binary files. Because most of which are multi-file system administrator to make
basic system program used, although it can be used when necessary and allow ordinary users, but generally do not give ordinary users. - the / etc directory
/ etc directory for files with various system configurations, including the user information file / etc / passwd, the system initialization file
member / etc / rc like. * These files linux It was able to run normally. - / root directory
/ root directory is the root user's directory. - / lib directory
/ lib directory of the program are shared libraries needed on the root filesystem, shared file storage root file system to run the required
pieces. These files contain many programs can be shared code to avoid Each program contains the same sub-routine of
this, it is possible to make the executable file smaller, saving space. - / lib / modules directory
/ lib / modules loadable core system directory contains various modules, in particular those in the system to recover a corrupted reboot
module guide system is required (e.g., network and file system driver). - / dev directory
/ dev directory for a device file that the device drivers, user access to external devices through these files. For example, a
user can access the mouse input by accessing / dev / mouse, just as access to other file. - the / tmp directory
The / tmp directory to store programs and data information generated at runtime. But after booting, running it is best to use
/ var / tmp instead of / tmp, since the former may have a larger disk space. - / boot directory
/ boot directory storing a boot loader (bootstrap loader) file used, such as LILO, often the core image on here,
rather than in the root directory. But if there are many kernel images, the directory can become large, then use a separate
would be better file system. Another point to note is that, to ensure that the core image must be within the first 1024 cylinders ide hard drive. - / 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 it 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 ext 2 file system floppy, / mnt / cdrom drive and so on. - / proc, / usr, / var , / home directory
mount point other file systems.
The following details;
/ etc file system
/ etc directory contains various system configuration files, some of which are described below. Other You should know that they belong to which
program, and read the man page for the program. Many network configuration files are in / etc.
- / 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. - / etc / passwd
User database, which gives the user the domain name, real name, user's home directory, encrypted passwords and user of its
other information. - / 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. - / etc / fstab
list of file system when starting the need for automatic installation. Also includes information swapon -a enable the swap area. - / etc / group
similar to the / etc / passwd, but the information is not described, but the information the user group. It includes various data sets. - / etc / inittab
the init configuration file. - / etc / issue
includes user output information before the login prompt. Usually include a short description of the system or welcome information. In particular the
content determined by the system administrator. - / etc / Magic
"File" configuration file. Description contains different file formats, "file" based on its guess file type. - / 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. - / etc / mtab
list of file systems currently installed. Initialized by the script (scritp), updated automatically by the mount command. When a need
to use (e.g. df command) a list of currently mounted file system. - / etc / shadow
shadow password file on password software installed shadow (shadow) system. The shadow password file / etc / passwd
encrypted password file is moved to the / etc / shadow, whereas the latter only for the superuser (root) readable. This makes decipher passwords more sleepy
difficult, thus increasing the security of the system. - /etc/login.defs
the Login configuration file commands. - / etc / printcap
similar to the / etc / termcap, but for the printer. Different syntax. - / etc / profile, / etc / csh. login, / etc / csh.cshrc
login or startup files or c shells bourne when executed. This allows the system administrator to establish global default for all users environment. - / etc / securetty
confirm the safety terminal, which terminal that is allowed superuser (root) login. Generally only lists the virtual console, so as not
possible (at least very difficult) via a modem (modem) or network to break into the system and get superuser privileges. - / etc / shells
listed shell may 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 promise of the user. - / etc / termcap
terminal capability database. DESCRIPTION different terminals what "escape sequences" control. Not directly output escaping when writing a program
sequence (this can only work on a particular brand of terminal), 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 / makede v.local a
system administrator for the local device files (or connection) written description document (i.e., as some non-standard device driver is not a standard
part of makedev). Some common file Below is a brief introduction / dev.
- / dev / console
system console, which is directly connected to the system monitor. - / dev / HD
IDE hard disk driver interface. Such as: / dev / hda refers to the first hard disk, had 1 refers to the first / dev / hda the
partition. The other hard disk system, the order of / dev / hdb, / dev / hdc ,.;..... If there are a plurality of partitions were
hda 1, hda 2... ... - / dev / SD
scsi disk driver interface. If the system has scsi hard disk, it will not access / dev / had, but will access the / dev / sda. - / dev / fd
floppy device drivers. Such as: / dev / fd 0 first floppy disk system, which is commonly referred to as a: plate,
...... / Dev /. 1 refers to second floppy disk FD, and / dev / fd 1 h 1 440 indicates an access to the drive in the 4.5 density disc. - / dev / ST
SCSI tape drive driver. - / dev / tty
provides virtual console support. Such as: / dev / tty 1 refers to the first virtual console system, / dev / tty 2 is the system
of the second virtual console. - / dev / pty
provide remote access pseudo-terminal support. When making te lnet login is necessary to use / dev / pty devices. - / dev / ttys
computer serial port, it is to dos "com 1" port. - / dev / cua
computer serial interface for use with a modem device. - / 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
when, 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. / usr where
all the files from the general linux distro (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.
- / usr / x11r6
all executables contain x wi ndow system, configuration and support files. To simplify the development and installation of x,
file x is not integrated into the system. x wi ndow system is a powerful graphical environment, provides a number of graphical
utilities. If the user of microsoft wi ndows or machintosh more familiar with it, I would not have x wi ndow system feel helpless. - / usr / x386
similar / usr / x 11r6, but is dedicated to the x 11 release 5. - / usr / bin
focused almost all user commands, the system software libraries. Some other commands in / bin or / usr / local / bin in. - / usr / sbin
contains the root file system unnecessary system management commands, such as most of the service program. - / 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 / man manual page 1 contains a first source code (not the original text formatted
member), / usr / man / cat 1 contains the first formatted content. l online manual is divided into nine sections: internal commands, system calls
used, library functions, device, file format, games, macro package, system management and core processes. - / usr / include
contains c language header files, these files to multiple end. H, c language used to describe the data structures used in program,
sub-processes, and constants. For consistency, this should actually be placed in the / usr / lib, but the habit has been used for the name of the
word. - / usr / lib
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. Also
there are many programs to the configuration file into it. - / usr / local
locally installed software and other files placed here. This is similar to / usr. Users may find some relatively large in this
package, such as tex, emacs and so on.
the / var filesystem
/ var system generally comprises a runtime 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 away
those needs often change into the directory / var in the. 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).
- / var / catman
including formatted help (man) page. Help page source files are generally present / usr / man / man; the man some pages
may have a pre-formatted version, there is / usr / man / cat in. While the other man pages need to be formatted for the first time to see,
formatting complete 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.) - / var / lib
file storage system during normal operation to be changed. - / var / local
storage / usr / local program installed in the variable data (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. - / 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 the device or file
parts. - / var / log
log various programs (log) files, especially login (/ var / log / wtmp log records all login to the system and note
the pin) and syslog (/ var / log / messages record and store all core systems program information). / var / log files are often not in
determining growth, should be regularly cleared. - / var / run
saved next valid information about the file system before the system boot. For example, / var / run / utmp board comprising a current
user information recorded. - / var / spool
disposed "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. - / var / tmp
ratio allowed for / tmp or more temporary files that require relatively long time.
Note that the system administrator might not allow / var / tmp has a very old one.
/ proc filesystem
/ 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 mention
providing information about the system. The following describes some of the most important files and directories (/ proc file system in more detail in proc man page
fine description).
- / proc / x
information about directory of the process of x, x is the identification number of the process. Each process has a self-titled under / proc
directory has a process ID. - / proc / cpuinfo
storing information processor (cpu), as cpu type, manufacturer, model, and performance. - / proc / devices
List of device drivers configured into the kernel currently running. - / proc / dma
display dma channel currently in use. - / proc / filesystems
kernel configuration file system information. - / proc / interrupts
display interrupt information and information occupants are occupied, and the number is occupied. - / proc / ioports
currently used i / o ports. - / proc / kcore
system physical memory image. Exactly the same as the physical memory size, but in fact did not take up so much memory; it is only
just to access the program when it was created. (Note: unless you copy it to any place, otherwise there is no under / proc any
thing take up any disk space.) - / proc / kmsg
message core output. It would be sent to syslog. - / proc / ksyms
core symbol table. - / proc / loadavg
system "load average"; 3 no sense indicator indicates the current system workload. - / proc / meminfo
various memory usage information, including the physical memory and swap (swap). - / proc / modules
to store what is currently loaded kernel module information. - / proc / net
network protocol state information. - / proc / self
storage 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. - / proc / stat
different states of the system, for example, the number of errors occurred after system startup page. - / proc / uptime
length of the system startup time. - / proc / version
kernel version.