一:什么是绝对路径?什么是相对路径(4分)绝对路径:一切从根开始。 相对路径:从当前路径开始3:简述buffer与cache的区别(4分)Buffer:缓冲:写缓冲 cache:缓存:读缓存4:Linux系统中,一共有多少个运行级别?并详解这些运行级别(3分)
Centos6 Centos7
0 关机 poweroff.target
1 单用户/救援 rescue.target
2 没有网络的多用户 multi-user.target
3 多用户 multi-user.target
4 保留 multi-user.target
5 图形 graphical.target
6 重启 reboot.target
二:CentOS6系统启动流程(6分)
系统 Centos6 Centos7
开机BIOS自检(CPU,内存,磁盘,硬件是否有问题)
MBR引导(通过硬盘启动)
GRUB菜单(选择不同内核)
加载内核
运行INIT进程 运行systemd进程
读取/etc/inittab读取运行级别 读取运行级别(target(7) multi-user.target /etc/systemd/system/)
读取/etc/rc.sysinit初始化系统 并行启动(usr/lib/systemd/system /etc/systemd/system)
根据运行级别选择/etc/rc{0..6}.d下面的脚本 显示
显示
三:说出以下文件功能(每个1分)
1 /etc/sysconfig/network-scripts/ifcfg-eth0或ens33 网卡配置文件
2 /etc/resolv.conf DNS配置文件
3 /etc/hosts 域名解析
4 /etc/fstab 自动挂载
5 /etc/profile 环境变量
6 /etc/rc.local 开机自启
7 /etr/bashrc 别名
8 /var/log/messages 系统日志
24.9 /var/log/secure 登录日志
24.10 /proc/meminfo 内存信息25:翻译(每个2分)
11 mkdir: cannot create directory ‘/lidao’: File exists 无法 创建 目录 因为这个目录已经存在
12 -bash: cd: oldboy: No such file or directory 没有这个目录:文件或路径书写错误
13 -bash: tree: command not found 没有这个命令
14 touch: invalid option -- 'p' 无效的参数(不可用的参数)
Try 'touch --help' for more information. 可以使用help帮助
15 cp: overwrite ‘/tmp/oldboy.txt’? 是否覆盖文件
16 rm: remove regular empty file ‘/oldboy/oldboy.txt’? 是否删除文件
17 rm: cannot remove ‘/data/’: Is a directory 不能删除目录
18 tree: Invalid level, must be greater than 0. 无效层数
19 ping: baidu.com: Name or service not known 域名无法解析
20 w: 56 column window is too narrow 空间太小施展不开。