/etc
是Linux下的一个目录,在很多的配置过程中我们很可能都接触过它,关于etc
的字面意思,有人说是“et cetera” (直译是“等等,用于放其它目录下不匹配的东西,什么杂七杂八的都有”),也有传言说是"Editable Text Configuration",也有人戏说是“Every Thing Config”,但是至今没有一个明确的定论。
The file system hierarchy standard [FSHS] explains /etc
as follows :
The /etc hierarchy contains configuration files. A "configuration file" is a local file used to control the operation of a program; it must be static and cannot be an executable binary.
It further goes on to say :
No binaries may be located under '/etc'. And the following directories, or symbolic links to directories are required in /etc:
- opt Configuration for /opt
- X11 Configuration for the X Window system (optional)
- sgml Configuration for SGML (optional)
- xml Configuration for XML (optional)
While this is the long and short of the matter, some believe that '/etc' is indeed an acronym and stands for "Editable Text Configuration". Oh well, the media is still not out with the verdict.
/etc/group
/etc/group 文件是管理Linux的用户组的文件,一般的group文件形式如下所示:
$ cat /etc/group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:username
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:username
fax:x:21:
voice:x:22:
cdrom:x:24:username, username1
floppy:x:25:
tape:x:26:
sudo:x:27:
audio:x:29:pulse
dip:x:30:
www-data:x:33:username
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:
sasl:x:45:
plugdev:x:46:username
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
libuuid:x:101:
crontab:x:102:
syslog:x:103:
该文件的解读方法如下所示:
group文件形式
- group_name: It is the name of group. If you run ls -l command, you will see this name printed in the group field.
- Password: Generally password is not used, hence it is empty/blank. It can store encrypted password. This is useful to implement privileged groups.
- Group ID (GID): Each user must be assigned a group ID. You can see this number in your /etc/passwd file.
- Group List: It is a list of user names of users who are members of the group. The user names, must be separated by commas.
Ref:
网友评论