Linux系统中的一些重要文件

/etc/sudoers

将一个用户加入到sudoers,需要在root下使用visudo命令编辑这个文件。
可以看到如一些文本行:

root    ALL=(ALL)   ALL
# %wheel    ALL=(ALL)   ALL
# %wheel    ALL=(ALL)   NOPASSWD: ALL

三个ALL的意思分别为主机、用户、命令。
上述片段的意思是 root用户/wheel组成员 可以在任何终端任何用户的身份运行任何命令。如果想加新的成员、成员组到sudoer中,仿照上述格式新增一行就行了。
更详细的解答可以参考文章How to edit the sudoers file

/etc/*-release

这些文件中包含Linux发行版版本号信息。
下述列表引自/etc/release equivalents for sundry Linux (and other Unix) distributions

Annvix: /etc/annvix-release
Arch Linux: /etc/arch-release
Arklinux: /etc/arklinux-release
Aurox Linux: /etc/aurox-release
BlackCat: /etc/blackcat-release
Cobalt: /etc/cobalt-release
Chakra: /etc/lsb-release
Conectiva: /etc/conectiva-release
Debian: /etc/debian_version, /etc/debian_release (rare)
Fedora / Fedora Core: /etc/fedora-release
FreeEOS: /etc/eos-version
Gentoo Linux: /etc/gentoo-release
HLFS: /etc/hlfs-release, /etc/hlfs_version
Immunix: /etc/immunix-release
IYCC: /etc/lsb-release
Knoppix: knoppix_version
Linux-From-Scratch / LFS: /etc/lfs-release, /etc/lfs_version
Linux-PPC: /etc/linuxppc-release
Linux Mint: /etc/lsb-release
Mageia: /etc/mageia-release
Mandrake: /etc/mandrake-release
Mandriva/Mandrake Linux: /etc/mandriva-release, /etc/mandrake-release, /etc/mandakelinux-release
MkLinux: /etc/mklinux-release
Novell Linux Desktop: /etc/nld-release
PLD Linux: /etc/pld-release
RHEL / RHAS / Red Hat Linux: /etc/redhat-release, /etc/redhat_version (rare)
Rubix: /etc/rubix-version
Scientific Linux / ScientificSL / ScientificCERNSLC / ScientificFermiLTS / ScientificSLF: /etc/redhat-release, /etc/redhat_version
Slackware: /etc/slackware-version, /etc/slackware-release (rare)
SME Server (Formerly E-Smith): /etc/e-smith-release
Solaris SPARC: /etc/release
Sun JDS: /etc/sun-release
SUSE Linux: /etc/SuSE-release, /etc/novell-release
SUSE Linux ES9: /etc/sles-release
Synology: /etc/synoinfo.conf
Tiny Sofa: /etc/tinysofa-release
Trustix: /etc/trustix-release, /etc/trustix-version
TurboLinux: /etc/turbolinux-release
Ubuntu Linux: /etc/lsb-release
UltraPenguin: /etc/ultrapenguin-release
UnitedLinux: /etc/UnitedLinux-release (covers SUSE SLES8)
VA-Linux/RH-VALE: /etc/va-release
Yellow Dog: /etc/yellowdog-release

/etc/issue/etc/issue.net文件也包含类似信息。
tty login会展示issue的信息,network login会展示issue.net的信息。

/etc/rc.d/rc.local

想要在系统启动时自动做一些事情,主要就是修改这个脚本了。默认情况下它什么也不做。
rc.d系统具体介绍参见The rc.d System,最主要就是这几句话:

  • After the kernel has initialized all devices at startup, it starts init(8), which in turn runs /etc/rc.
  • /etc/rc sorts the scripts in /etc/rc.d using rcorder(8) and then runs them in that order.
  • /etc/rc.subr contains common functions used by /etc/rc and various rc.d scripts.
  • When shutting down the system with shutdown(8), /etc/rc.shutdown is run, which runs the scripts in /etc/rc.d in reverse order (as defined by rcorder(8)). Note that if you shut down the system using the halt(8) command, these scripts will not be run.

/etc/group

用户组配置文件,都是这种格式:

group_name:passwd:GID:user_list

使用usermod来添加成员到某用户组:

usermod -aG group_name user_name

/etc/passwd

/etc/shadow

/etc/fstab

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值