本文中的内容主要参考http://www.tldp.org/并将其核心内容进行总结翻译,并提供对应原文给读者参考。tldp全程是The Linux Documentation Project,具有非常高的权威性。我就充当一下搬运工给需要的人士提供一些关键信息及翻译。原linux文档链接会放在标题上。为什么这么干呢?来源于我想知道/usr的含义,结果发现,可供参考的地方并不多,而且也没有很好的揭开疑惑。所以就我在tldp上看到的放到这里权当参考,不足之处多多见谅。文中多次提到的FSSTND全称为:Filesystem Hierarchy Standard。链接指向wiki。中文翻译为:文件系统层次结构标准。
The Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Linux distributions.
文件系统层次结构标准(FHS)定义Linux发行版中的目录结构和目录内容。
To comply with the FSSTND the following directories, or symbolic links to directories, are required in /.
要符合FSSTND,/中需要以下目录或目录的符号链接。
/bin Essential command binaries
/boot Static files of the boot loader
/dev Device files
/etc Host-specific system configuration
/lib Essential shared libraries and kernel modules
/media Mount point for removeable media
/mnt Mount point for mounting a filesystem temporarily
/opt Add-on application software packages
/sbin Essential system binaries
/srv Data for services provided by this system
/tmp Temporary files
/usr Secondary hierarchy
/var Variable data
/bin Essential命令二进制文件
/dev 设备文件
/lib Essential 共享库和内核模块
/mnt 临时安装文件系统的挂载点
/sbin 基本系统二进制文件
/tmp 临时文件
/var 可变数据
The following directories, or symbolic links to directories, must be in /, if the corresponding subsystem is installed:
如果安装了相应的子系统,则以下目录或目录的符号链接必须位于/中:
/ -- the root directory
/home User home directories (optional)
/lib Alternate format essential shared libraries
(optional)
/root Home directory for the root user (optional)
/ - 根目录
/ lib 备用格式基本共享库(可选的)
/ root root用户的主目录(可选)
Unlike /sbin, the bin directory contains several useful commands that are of use to both the system administrator as well as non-privileged users. It usually contains the shells like bash, csh, etc…. and commonly used commands like cp, mv, rm, cat, ls. For this reason and in contrast to /usr/bin, the binaries in this directory are considered to be essential. The reason for this is that it contains essential system programs that must be available even if only the partition containing / is mounted. This situation may arise should you need to repair other partitions but have no access to shared directories (ie. you are in single user mode and hence have no network access). It also contains programs which boot scripts may depend on.
与/sbin不同,bin目录包含几个对系统管理员和非特权用户都有用的有用命令。它通常包含像bash,csh等的shell ….以及常用的命令,如cp,mv,rm,cat,ls。出于这个原因,与/usr /bin相反,此目录中的二进制文件被认为是必不可少的。原因是它包含必要的系统程序,即使只安装包含/的分区也必须可用。如果您需要修复其他分区但无法访问共享目录(即您处于单用户模式,因此无法访问网络),则可能会出现这种情况。它还包含引导脚本可能依赖的程序。
Compliance to the FSSTND means that there are no subdirectories in /bin and that the following commands, or symbolic links to commands, are located there.
符合FSSTND意味着/bin中没有子目录,并且以下命令或命令的符号链接位于那里。
cat Utility to concatenate files to standard output
chgrp Utility to change file group ownership
chmod Utility to change file access permissions
chown Utility to change file owner and group
cp Utility to copy files and directories
date Utility to print or set the system data and time
dd Utility to convert and copy a file
df Utility to report filesystem disk space usage
dmesg Utility to print or control the kernel message buffer
echo Utility to display a line of text
false Utility to do nothing, unsuccessfully
hostname Utility to show or set the system's host name
kill Utility to send signals to processes
ln Utility to make links between files
login Utility to begin a session on the system
ls Utility to list directory contents
mkdir Utility to make directories
mknod Utility to make block or character special files
more Utility to page through text
mount Utility to mount a filesystem
mv Utility to move/rename files
ps Utility to report process status
pwd Utility to print name of current working directory
rm Utility to remove files or directories
rmdir Utility to remove empty directories
sed The `sed' stream editor
sh The Bourne command shell
stty Utility to change and print terminal line settings
su Utility to change user ID
sync Utility to flush filesystem buffers
true Utility to do nothing, successfully
umount Utility to unmount file systems
uname Utility to print system information
If /bin/sh is not a true Bourne shell, it must be a hard or symbolic link to
the real shell command.
The rationale behind this is because sh and bash mightn't necessarily behave
in the same manner. The use of a symbolic link also allows users to easily
see that /bin/sh is not a true Bourne shell.
The [ and test commands must be placed together in either /bin or /usr/bin.
The requirement for the [ and test commands to be included as binaries
(even if implemented internally by the shell) is shared with the POSIX.2
standard.
The following programs, or symbolic links to programs, must be in /bin if the
corresponding subsystem is installed:
csh The C shell (optional)
ed The `ed' editor (optional)
tar The tar archiving utility (optional)
cpio The cpio archiving utility (optional)
gzip The GNU compression utility (optional)
gunzip The GNU uncompression utility (optional)
zcat The GNU uncompression utility (optional)
netstat The network statistics utility (optional)
ping The ICMP network test utility (optional)
If the gunzip and zcat programs exist, they must be symbolic or hard links to
gzip. /bin/csh may be a symbolic link to /bin/tcsh or /usr/bin/tcsh.
The tar, gzip and cpio commands have been added to make restoration of a
system possible (provided that / is intact).
Conversely, if no restoration from the root partition is ever expected,
then these binaries might be omitted (e.g., a ROM chip root, mounting /usr
through NFS). If restoration of a system is planned through the network,
then ftp or tftp (along with everything necessary to get an ftp connection)
must be available on the root partition.
这些就不翻译了,了解一下。
This directory contains everything required for the boot process except for configuration files not needed at boot time (the most notable of those being those that belong to the GRUB boot-loader) and the map installer. Thus, the /boot directory stores data that is used before the kernel begins executing user-mode programs. This may include redundant (back-up) master boot records, sector/system map files, the kernel and other important boot files and data that is not directly edited by hand. Programs necessary to arrange for the boot loader to be able to boot a file are placed in /sbin. Configuration files for boot loaders are placed in /etc. The system kernel is located in either / or /boot (or as under Debian in /boot but is actually a symbolically linked at / in accordance with the FSSTND).
此目录包含引导过程所需的所有内容,但引导时不需要的配置文件(最值得注意的是属于GRUB引导加载程序的配置文件)和映射安装程序除外。因此,/ boot目录存储在内核开始执行用户模式程序之前使用的数据。这可能包括冗余(备份)主引导记录,扇区/系统映射文件,内核和其他重要引导文件以及未直接手动编辑的数据。安排引导加载程序能够引导文件所需的程序放在/ sbin中。引导加载程序的配置文件放在/ etc中。系统内核位于/或/ boot中(或者在Debian中的/ boot,但实际上是根据FSSTND,符号链接在/上)。
/dev is the location of special or device files. It is a very interesting directory that highlights one important aspect of the Linux filesystem - everything is a file or a directory. Look through this directory and you should hopefully see hda1, hda2 etc…. which represent the various partitions on the first master drive of the system. /dev/cdrom and /dev/fd0 represent your CD-ROM drive and your floppy drive. This may seem strange but it will make sense if you compare the characteristics of files to that of your hardware. Both can be read from and written to. Take /dev/dsp, for instance. This file represents your speaker device. Any data written to this file will be re-directed to your speaker. If you try ‘cat /boot/vmlinuz > /dev/dsp’ (on a properly configured system) you should hear some sound on the speaker. That’s the sound of your kernel! A file sent to /dev/lp0 gets printed. Sending data to and reading from /dev/ttyS0 will allow you to communicate with a device attached there - for instance, your modem.
/ dev是特殊文件或设备文件的位置。这是一个非常有趣的目录,突出了Linux文件系统的一个重要方面 - 一切都是文件或目录。查看此目录,您应该看到hda1,hda2等….它代表系统的第一个主驱动器上的各种分区。 / dev / cdrom和/ dev / fd0代表您的CD-ROM驱动器和软盘驱动器。这可能看起来很奇怪,但如果您将文件的特征与硬件的特征进行比较,这将是有意义的。两者都可以读写。以/ dev / dsp为例。此文件代表您的扬声器设备。写入此文件的任何数据都将重定向到您的扬声器。如果您尝试’cat / boot / vmlinuz> / dev / dsp’(在正确配置的系统上),您应该在扬声器上听到一些声音。那是你内核的声音!发送到/ dev / lp0的文件将被打印。向/ dev / ttyS0发送数据和从/ dev / ttyS0读取数据将允许您与连接在那里的设备进行通信 - 例如,您的调制解调器。
The majority of devices are either block or character devices; however other types of devices exist and can be created. In general, ‘block devices’ are devices that store or hold data, ‘character devices’ can be thought of as devices that transmit or transfer data. For example, diskette drives, hard drives and CD-ROM drives are all block devices while serial ports, mice and parallel printer ports are all character devices. There is a naming scheme of sorts but in the vast majority of cases these are completely illogical.
大多数设备是块设备或字符设备;但是存在并且可以创建其他类型的设备。通常,“块设备”是存储或保存数据的设备,“字符设备”可以被认为是传输或传输数据的设备。例如,软盘驱动器,硬盘驱动器和CD-ROM驱动器都是块设备,而串行端口,鼠标和并行打印机端口都是字符设备。有一种命名方案,但在绝大多数情况下,这些都是完全不合逻辑的。
total 724
lrwxrwxrwx 1 root root 13 Sep 28 18:06 MAKEDEV -> /sbin/MAKEDEV
crw-rw---- 1 root audio 14, 14 Oct 7 16:26 admmidi0
crw-rw---- 1 root audio 14, 30 Oct 7 16:26 admmidi1
lrwxrwxrwx 1 root root 11 Oct 7 16:26 amidi -> /dev/amidi0
crw-rw---- 1 root audio 14, 13 Oct 7 16:26 amidi0
crw-rw---- 1 root audio 14, 29 Oct 7 16:26 amidi1
crw-rw---- 1 root audio 14, 11 Oct 7 16:26 amixer0
crw-rw---- 1 root audio 14, 27 Oct 7 16:26 amixer1
drwxr-xr-x 2 root root 4096 Sep 28 18:05 ataraid
lrwxrwxrwx 1 root root 11 Oct 7 16:26 audio -> /dev/audio0
crw-rw---- 1 root audio 14, 4 Oct 7 16:26 audio0
crw-rw---- 1 root audio 14, 20 Oct 7 16:26 audio1
crw-rw---- 1 root audio 14, 7 Mar 15 2002 audioctl
lrwxrwxrwx 1 root root 9 Oct 14 22:51 cdrom -> /dev/scd1
lrwxrwxrwx 1 root root 9 Oct 14 22:52 cdrom1 -> /dev/scd0
crw------- 1 root tty 5, 1 Jan 19 20:47 console
lrwxrwxrwx 1 root root 11 Sep 28 18:06 core -> /proc/kcore
crw-rw---- 1 root audio 14, 10 Oct 7 16:26 dmfm0
crw-rw---- 1 root audio 14, 26 Oct 7 16:26 dmfm1
crw-rw---- 1 root audio 14, 9 Oct 7 16:26 dmmidi0
crw-rw---- 1 root audio 14, 25 Oct 7 16:26 dmmidi1
lrwxrwxrwx 1 root root 9 Oct 7 16:26 dsp -> /dev/dsp0
crw-rw---- 1 root audio 14, 3 Oct 7 16:26 dsp0
crw-rw---- 1 root audio 14, 19 Oct 7 16:26 dsp1
crw--w---- 1 root video 29, 0 Mar 15 2002 fb0
crw--w---- 1 root video 29, 1 Mar 15 2002 fb0autodetect
crw--w---- 1 root video 29, 0 Mar 15 2002 fb0current
crw--w---- 1 root video 29, 32 Mar 15 2002 fb1
crw--w---- 1 root video 29, 33 Mar 15 2002 fb1autodetect
crw--w---- 1 root video 29, 32 Mar 15 2002 fb1current
lrwxrwxrwx 1 root root 13 Sep 28 18:05 fd -> /proc/self/fd
brw-rw---- 1 root floppy 2, 0 Mar 15 2002 fd0
brw-rw---- 1 root floppy 2, 1 Mar 15 2002 fd1
crw--w--w- 1 root root 1, 7 Sep 28 18:06 full
brw-rw---- 1 root disk 3, 0 Mar 15 2002 hda
brw-rw---- 1 root disk 3, 64 Mar 15 2002 hdb
brw-rw---- 1 root disk 22, 0 Mar 15 2002 hdc
brw-rw---- 1 root disk 22, 64 Mar 15 2002 hdd
drwxr-xr-x 2 root root 12288 Sep 28 18:05 ida
prw------- 1 root root 0 Jan 19 20:46 initctl
brw-rw---- 1 root disk 1, 250 Mar 15 2002 initrd
drwxr-xr-x 2 root root 4096 Sep 28 18:05 input
crw-rw---- 1 root dialout 45, 128 Mar 15 2002 ippp0
crw-rw---- 1 root dialout 45, 0 Mar 15 2002 isdn0
crw-rw---- 1 root dialout 45, 64 Mar 15 2002 isdnctrl0
crw-rw---- 1 root dialout 45, 255 Mar 15 2002 isdninfo
crw------- 1 root root 10, 4 Mar 15 2002 jbm
crw-r----- 1 root kmem 1, 2 Sep 28 18:06 kmem
brw-rw---- 1 root cdrom 24, 0 Mar 15 2002 lmscd
crw------- 1 root root 10, 0 Mar 15 2002 logibm
brw-rw---- 1 root disk 7, 0 Sep 28 18:06 loop0
brw-rw---- 1 root disk 7, 1 Sep 28 18:06 loop1
crw-rw---- 1 root lp 6, 0 Mar 15 2002 lp0
crw-rw---- 1 root lp 6, 1 Mar 15 2002 lp1
crw-rw---- 1 root lp 6, 2 Mar 15 2002 lp2
crw-r----- 1 root kmem 1, 1 Sep 28 18:06 mem
lrwxrwxrwx 1 root root 10 Oct 7 16:26 midi -> /dev/midi0
crw-rw---- 1 root audio 14, 2 Oct 7 16:26 midi0
crw-rw---- 1 root audio 14, 18 Oct 7 16:26 midi1
lrwxrwxrwx 1 root root 11 Oct 7 16:26 mixer -> /dev/mixer0
crw-rw-rw- 1 root root 14, 0 Nov 11 16:22 mixer0
crw-rw---- 1 root audio 14, 16 Oct 7 16:26 mixer1
lrwxrwxrwx 1 root root 11 Oct 7 06:50 modem -> /dev/ttyLT0
crw-rw---- 1 root audio 31, 0 Mar 15 2002 mpu401data
crw-rw---- 1 root audio 31, 1 Mar 15 2002 mpu401stat
crw-rw---- 1 root audio 14, 8 Oct 7 16:26 music
crw-rw-rw- 1 root root 1, 3 Sep 28 18:06 null
crw-rw-rw- 1 root root 195, 0 Jan 6 03:03 nvidia0
crw-rw-rw- 1 root root 195, 1 Jan 6 03:03 nvidia1
crw-rw-rw- 1 root root 195, 255 Jan 6 03:03 nvidiactl
crw-rw---- 1 root lp 6, 0 Mar 15 2002 par0
crw-rw---- 1 root lp 6, 1 Mar 15 2002 par1
crw-rw---- 1 root lp 6, 2 Mar 15 2002 par2
-rw-r--r-- 1 root root 665509 Oct 7 16:41 pcm
crw-r----- 1 root kmem 1, 4 Sep 28 18:06 port
crw-rw---- 1 root dip 108, 0 Sep 28 18:07 ppp
crw------- 1 root root 10, 1 Mar 15 2002 psaux
crw-rw-rw- 1 root root 1, 8 Sep 28 18:06 random
crw-rw---- 1 root root 10, 135 Mar 15 2002 rtc
brw-rw---- 1 root cdrom 11, 0 Mar 15 2002 scd0
brw-rw---- 1 root cdrom 11, 1 Mar 15 2002 scd1
brw-rw---- 1 root disk 8, 0 Mar 15 2002 sda
brw-rw---- 1 root disk 8, 1 Mar 15 2002 sda1
brw-rw---- 1 root disk 8, 2 Mar 15 2002 sda2
brw-rw---- 1 root disk 8, 3 Mar 15 2002 sda3
brw-rw---- 1 root disk 8, 4 Mar 15 2002 sda4
brw-rw---- 1 root disk 8, 16 Mar 15 2002 sdb
brw-rw---- 1 root disk 8, 17 Mar 15 2002 sdb1
brw-rw---- 1 root disk 8, 18 Mar 15 2002 sdb2
brw-rw---- 1 root disk 8, 19 Mar 15 2002 sdb3
brw-rw---- 1 root disk 8, 20 Mar 15 2002 sdb4
crw-rw---- 1 root audio 14, 1 Oct 7 16:26 sequencer
lrwxrwxrwx 1 root root 10 Oct 7 16:26 sequencer2 -> /dev/music
lrwxrwxrwx 1 root root 4 Sep 28 18:05 stderr -> fd/2
lrwxrwxrwx 1 root root 4 Sep 28 18:05 stdin -> fd/0
lrwxrwxrwx 1 root root 4 Sep 28 18:05 stdout -> fd/1
crw-rw-rw- 1 root tty 5, 0 Sep 28 18:06 tty
crw------- 1 root root 4, 0 Sep 28 18:06 tty0
crw------- 1 root root 4, 1 Jan 19 14:59 tty1
crw-rw---- 1 root dialout 62, 64 Oct 7 06:50 ttyLT0
crw-rw---- 1 root dialout 4, 64 Mar 15 2002 ttyS0
crw-rw---- 1 root dialout 4, 65 Mar 15 2002 ttyS1
crw-rw---- 1 root dialout 4, 66 Mar 15 2002 ttyS2
crw-rw---- 1 root dialout 4, 67 Mar 15 2002 ttyS3
crw-rw---- 1 root dialout 188, 0 Mar 15 2002 ttyUSB0
crw-rw---- 1 root dialout 188, 1 Mar 15 2002 ttyUSB1
cr--r--r-- 1 root root 1, 9 Jan 19 20:46 urandom
drwxr-xr-x 2 root root 4096 Sep 28 18:05 usb
prw-r----- 1 root adm 0 Jan 19 14:58 xconsole
crw-rw-rw- 1 root root 1, 5 Sep 28 18:06 zero
/usr usually contains by far the largest share of data on a system. Hence, this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc…. X and its supporting libraries can be found here. User programs like telnet, ftp, etc…. are also placed here. In the original Unix implementations, /usr was where the home directories of the users were placed (that is to say, /usr/someone was then the directory now known as /home/someone). In current Unices, /usr is where user-land programs and data (as opposed to ‘system land’ programs and data) are. The name hasn’t changed, but it’s meaning has narrowed and lengthened from “everything user related” to “user usable programs and data”. As such, some people may now refer to this directory as meaning ‘User System Resources’ and not ‘user’ as was originally intended.
/usr通常包含迄今为止系统中最大的分享数据。因此,这是系统中最重要的目录之一,因为它包含所有用户二进制文件,它们的文档,库,头文件等等.X及其支持库可以在这里找到。 telnet,ftp等用户程序也放在这里。在最初的Unix实现中,/usr是放置用户主目录的地方(也就是说,/usr/某人就是现在称为/home/someone的目录)。在当前的Unices中,/usr是用户范围的程序和数据(与“系统范围”内的程序和数据相对应)的地方。名称没有改变,但它的含义已从“用户相关的所有内容”缩小并延长到“用户可用的程序和数据”。因此,有些人现在可能将此目录称为“用户系统资源”而不是最初预期的“用户”。
>
/usr is shareable, read-only data. That means that /usr should
be shareable between various FHS-compliant hosts and must not be written to.
Any information that is host-specific or varies with time is stored elsewhere.
Large software packages must not use a direct subdirectory under the /usr
hierarchy.
/usr 是可共享的只读数据。这意味着/usr应该可以在各种符合FHS标准的主机之间共享,不得写入。 任何特定于主机或随时间变化的信息都存储在其他位置。 大型软件包不得使用/ usr下的直接子目录 层次结构。
This is the nerve center of your system, it contains all system related configuration files in here or in its sub-directories. A “configuration file” is defined as a local file used to control the operation of a program; it must be static and cannot be an executable binary. For this reason, it’s a good idea to backup this directory regularly. It will definitely save you a lot of re-configuration later if you re-install or lose your current installation. Normally, no binaries should be or are located here.
这是系统的神经中枢,它包含此处或其子目录中的所有系统相关配置文件。 “配置文件”被定义为用于控制程序操作的本地文件;它必须是静态的,不能是可执行的二进制文件。因此,定期备份此目录是个好主意。如果您重新安装或丢失当前安装,它肯定会为您节省大量的重新配置。通常,此处不应包含二进制文件。
Linux is a multi-user environment so each user is also assigned a specific directory that is accessible only to them and the system administrator. These are the user home directories, which can be found under ‘/home/$USER’ (~/). It is your playground: everything is at your command, you can write files, delete them, install programs, etc…. Your home directory contains your personal configuration files, the so-called dot files (their name is preceded by a dot). Personal configuration files are usually ‘hidden’, if you want to see them, you either have to turn on the appropriate option in your file manager or run ls with the -a switch. If there is a conflict between personal and system wide configuration files, the settings in the personal file will prevail.
Linux是一个多用户环境,因此每个用户也被分配了一个只有他们和系统管理员才能访问的特定目录。这些是用户主目录,可以在’/ home / $ USER’(〜/)下找到。这是你的游乐场:一切都在你的命令,你可以写文件,删除它们,安装程序等….你的主目录包含你的个人配置文件,即所谓的点文件(它们的名称前面有一个点)。个人配置文件通常是“隐藏的”,如果要查看它们,您必须在文件管理器中打开相应的选项或使用-a开关运行ls。如果个人和系统范围的配置文件之间存在冲突,则以个人文件中的设置为准。
Dotfiles most likely to be altered by the end user are probably your .xsession and .bashrc files. The configuration files for X and Bash respectively. They allow you to be able to change the window manager to be startup upon login and also aliases, user-specified commands and environment variables respectively. Almost always when a user is created their dotfiles will be taken from the /etc/skel directory where system administrators place a sample file that user’s can modify to their hearts content.
最终用户最有可能改变的Dotfiles(以.
开头的文件上面的翻译有提到(作者注))可能是你的.xsession和.bashrc文件。分别为X和Bash的配置文件。它们允许您在登录时更改窗口管理器以及别名,用户指定的命令和环境变量。在创建用户时总是将他们的dotfiles从/ etc / skel目录中获取,系统管理员在该目录中放置一个用户可以修改其内容的示例文件。
/home can get quite large and can be used for storing downloads, compiling, installing and running programs, your mail, your collection of image or sound files etc.
/home可以变得非常大,可用于存储下载,编译,安装和运行程序,邮件,图像集或声音文件等。
This directory is reserved for all the software and add-on packages that are not part of the default installation. For example, StarOffice, Kylix, Netscape Communicator and WordPerfect packages are normally found here. To comply with the FSSTND, all third party applications should be installed in this directory. Any package to be installed here must locate its static files (ie. extra fonts, clipart, database files) must locate its static files in a separate /opt/’package’ or /opt/’provider’ directory tree (similar to the way in which Windows will install new software to its own directory tree C:\Windows\Progam Files\”Program Name”), where ‘package’ is a name that describes the software package and ‘provider’ is the provider’s LANANA registered name.
此目录保留给不属于默认安装的所有软件和附加软件包。例如,StarOffice,Kylix,Netscape Communicator和WordPerfect软件包通常可在此处找到。要符合FSSTND,应在此目录中安装所有第三方应用程序。这里要安装的任何软件包必须找到其静态文件(即额外字体,剪贴画,数据库文件)必须将其静态文件放在单独的/ opt /’package’或/ opt /’provider’目录树中(类似于其中Windows将新软件安装到其自己的目录树C:\ Windows \ Progam Files \“Program Name”),其中’package’是描述软件包的名称,’provider’是提供商的LANANA注册名称。
This is the home directory of the System Administrator, ‘root’. This may be somewhat confusing (‘root on root’) but in former days, ‘/’ was root’s home directory (hence the name of the Administrator account). To keep things tidier, ‘root’ got his own home directory. Why not in ‘/home’? Because ‘/home’ is often located on a different partition or even on another system and would thus be inaccessible to ‘root’ when - for some reason - only ‘/’ is mounted.
这是系统管理员的主目录“root”。这可能有些令人困惑(’root on root’)但在以前的日子里,’/’是root的主目录(因此是Administrator帐户的名称)。为了让事情更整洁,’root’有了自己的主目录。为什么不在’/ home’?因为’/ home’通常位于不同的分区上,甚至位于另一个系统上,因此当 - 由于某种原因 - 只安装’/’时,’root’将无法访问。
Linux discriminates between ‘normal’ executables and those used for system maintenance and/or administrative tasks. The latter reside either here or - the less important ones - in /usr/sbin. Locally installed system administration programs should be placed into /usr/local/sbin.
Linux区分“正常”可执行文件和用于系统维护和/或管理任务的可执行文件。后者驻留在这里或 - 不太重要的 - 在/ usr / sbin中。本地安装的系统管理程序应放在/ usr / local / sbin中。
This directory contains mostly files that are required temporarily. Many programs use this to create lock files and for temporary storage of data. Do not remove files from this directory unless you know exactly what you are doing! Many of these files are important for currently running programs and deleting them may result in a system crash. Usually it won’t contain more than a few KB anyway. On most systems, this directory is cleared out at boot or at shutdown by the local system. The basis for this was historical precedent and common practice. However, it was not made a requirement because system administration is not within the scope of the FSSTND. For this reason people and programs must not assume that any files or directories in /tmp are preserved between invocations of the program. The reasoning behind this is for compliance with IEEE standard P1003.2 (POSIX, part 2).
该目录主要包含临时需要的文件。许多程序使用它来创建锁文件和临时存储数据。除非您确切知道自己在做什么,否则不要从此目录中删除文件!其中许多文件对于当前运行的程序很重要,删除它们可能会导致系统崩溃。通常它不会包含超过几KB。在大多数系统上,此目录在引导时或在本地系统关闭时清除。其基础是历史先例和普遍做法。但是,由于系统管理不在FSSTND的范围内,因此没有提出要求。因此,人们和程序不得假定/ tmp中的任何文件或目录在程序的调用之间保留。这背后的原因是符合IEEE标准P1003.2(POSIX,第2部分)
帮搬运工,没有搬全,实在是没有必要。需要详细了解的可以点击对应的标题链接过去看。文中没有提的一些目录也可以在http://www.tldp.org/里去翻阅。