/boot/grub2/grub.cfg     #引导表开机启动:![](http://139.199.161.77/linhut/2017726_files/Image [1].png)5/6):/etc/init.d会加载:  rc.sysinit     #专门启动和关闭服务的               rc(0-6)        #选择服务的开关     开机脚本文件: /etc/rc.local7):     /lib/systemd/system     这下面有运行级别:          ll | grep run![](http://139.199.161.77/linhut/2017726_files/Image [2].png)5,6,7安装图形化runlevel 运行级别:5/6):     0:系统停机状态。系统默认运行级别不能设为0,否则不能正常启动。     1:单用户工作状态,root权限,用于系统维护,禁止远程登陆。     2:多用户模式(没有NFS)     3:完全的多用户状态(有NFS),登陆后进入控制台命令行模式。     4:系统未使用,保留。     5:图形化     6:系统正常关闭并重启,默认不设置6,否则不能正常启动7):     0:关机。     1:营救。     2:字符。     3:多用户。     4:系统未使用,保留。     5:图形化。     6:重启。     切换运行级别:          3]:          systemctl     isolate runlevel3.target          5]:          systemctl     isolate runlevel5.target          或startx     查看当前运行级别:          systemctl     get-default      设置默认启动级别           3]:           systemctl set-default multi-user.target           5]:           systemctl set-default graphical.targetsystemctl:查看状态:![](http://139.199.161.77/linhut/2017726_files/Image [3].png)![](http://139.199.161.77/linhut/2017726_files/Image [4].png)下次开机启动,替换成enable查看service的状态:![](http://139.199.161.77/linhut/2017726_files/Image [5].png)查看开机启动失败的服务:   systemctl –failedREDHAT7破密码:     》1     开机后在内核安E     》2     在linux16/linux/linuxefi 行加入 init=/bin/bash     》3     ctrl+x启动到shell     》4     挂载文件系统为可写模式:mount -o remount,rw /     》5     运行passwd,安提示修改密码     》6     如果使用了selinux则需要运行 touch  .autorelabel 或 >.autorelabel     》7     运行exec /sbin/init 来正常启动     或 exec /sbin/reboot  重启内核开关:     /etc/sysyremctl.conf**     cd /etc/sysctl.d/ 下**![](http://139.199.161.77/linhut/2017726_files/Image [6].png)#这里是路由功能开关![](http://139.199.161.77/linhut/2017726_files/Image [7].png)sudo:     最高权限位。![](http://139.199.161.77/linhut/2017726_files/Image [8].png)中![](http://139.199.161.77/linhut/2017726_files/Image [9].png)还可以做别名让用户调用:![](http://139.199.161.77/linhut/2017726_files/Image [10].png)![](http://139.199.161.77/linhut/2017726_files/Image [11].png)还可以加NOPASSWD不需要密码![](http://139.199.161.77/linhut/2017726_files/Image [12].png)%wheel  给wheel组最高权限登录日志:![](http://139.199.161.77/linhut/2017726_files/Image [13].png)** **关于内核:    /boot/grub2/grub.cfg        内核引导文件![](http://139.199.161.77/linhut/2017726_files/Image [14].png)这里的位置问题他的默认选择内核也不同,以先后为排序。

5、拷贝/etc/fstab到/var/tmp。要求用户属于root,组也属于root,没有一个人能对这个/var/tmp/fstab有执行权限,natasha用户对这个文件有可读可写的权限;harry既不能读也不能写;其他人现在或者将来都只有读的权限 chown root:root fstab chmod 644 fstab setfacl -m u:natasha:rw fstab setfacl -m u:harry:0 fstab-m 是添加-x   是移除

视频链接: 链接: http://pan.baidu.com/s/1eRWLiWq 密码: sx13