1、alias别名
vim /etc/bashrc
alias xiao='ls -l /tmp'
source /etc/bashrc
2、sudo提权
[root@xiaochen ~]# vim /etc/sudoers
%wheel ALL=(ALL) NOPASSWD: ALL
[root@xiaochen ~]# visudo //可以验证sudoers文件是否有语法错误
3、==开机自动挂载 /etc/fstab、/etc/rc.local
1./etc/rc.local 进入系统前的最后一个执行脚本
[root@localhost ~]# chmod +x /etc/rc.local
[root@localhost ~] ll /etc/rc.local
lrwxrwxrwx. 1 root root 13 8月 22 2017 /etc/rc.local -> rc.d/rc.local
[root@localhost ~]# systemctl enable rc-local
[root@localhost ~] vim /etc/rc.local
mount /dev/sdb1 /opt
3.2
[root@xiaochen ~]# blkid
/dev/sdb1: UUID="653a949d-ebf5-4543-9f67-4b71cbe5cf2b" TYPE="ext4"
/dev/sdb2: UUID="7ca49b1d-5359-413f-83aa-ed51c7421877" TYPE="ext4"
[root@xiaochen ~]# vim /etc/fstab
UUID="653a949d-ebf5-4543-9f67-4b71cbe5cf2b" /mnt/disk1 ext4 ro,noauto 0 0
UUID="7ca49b1d-5359-413f-83aa-ed51c7421877" /mnt/disk2 ext4 defaults 0 0
[root@xiaochen ~]# mount -a //读取/etc/fstab并挂载
4.yum的配置文件
[root@xiaochen ~]# vim /etc/yum.conf
5.rsyslog配置文件
/etc/logrotate.d/syslog //和日志的轮转(切割)相关
/etc/rsyslog.conf //rsyslogd的主配置文件
/etc/sysconfig/rsyslog //rsyslogd相关文件
网友评论