()命令可实现重新启动Linux操作系统。
- A.init 0
- B.halt
- C.shutdown –r
- D.shutdown –h
正确答案及解析
正确答案
解析
Linux中常用的关机和重新启动命令有shutdown、halt、reboot以及init,它们都可以达到关机和重新启动的目的,但是每个命令的内部工作过程是不同的,下面将逐一进行介绍。
(1)shutdown
shutdown命令用于安全关闭Linux系统。执行shutdown命令时,系统会通知所有登录的用户系统将要关闭,并且login指令会被冻结,即新的用户不能再登录系统。使用shutdown命令可以直接关闭系统,也可以延迟指定的时间再关闭系统,还可以重新启动。延迟指定的时间再关闭系统,可以让用户有时间储存当前正在处理的文件和关闭已经打开的程序。
shutdown命令的部分参数如下:
[-t] 指定在多长时间之后关闭系统
[-r] 重启系统
[-k] 并不真正关机,只是给每个登录用户发送警告信号
[-h] 关闭系统(halt)
shutdown命令的工作实质是给init程序发送信号(signal),要求其切换系统的运行级别(Runlevel)。系统的运行级别包括:
0:关闭系统
1:单用户模式,如果没有为shutdown命令指定-h或-r参数而直接执行,则默认将切换到此运行级别
2:多用户模式(不支持NFS)
3:多用户模式(支持NFS),一般常用此种运行级别
5:多用户模式(GUI模式)
6:重新启动系统
(2)halt
halt是最简单的关机命令,其实际上是调用shutdown -h命令。halt执行时,杀死应用进程,文件系统写操作完成后就会停止内核。halt命令的部分参数如下:
[-f] 没有调用shutdown而强制关机或重启
[-i] 关机或重新启动之前,关掉所有的网络接口
[-p] 关机时调用poweroff,此选项为缺省选项
(3)reboot
reboot的工作过程与halt类似,其作用是重新启动,而halt是关机。其参数也与halt类似。
(4)init
init是所有进程的祖先,其进程号始终为1。init用于切换系统的运行级别,切换的工作是立即完成的。init 0命令用于立即将系统运行级别切换为0,即关机;init 6命令用于将系统运行级别切换为6,即重新启动。
包含此试题的试卷
你可能感兴趣的试题
Advancements in ( )have contributed to the growth of the automotive industry through the creation and evolution of self-driving vehicles.
-
- A.Artificial Intelligence
- B.Cloud Computing
- C.Internet of Things
- D.Big Data
- 查看答案
In project human resource management , ( )is not a source of power for the project manager.
-
- A.referent power
- B.expert power
- C.reward power
- D.audit power
- 查看答案
At the project establishment stage , the feasibility study mainly includes techinical feasibility analysis , ( ), operation environment feasibility analysis and other aspects of feasibility analysis.
-
- A.detail feasibility analysis
- B.opportunity analysis
- C.economic feasibility analysis
- D.risk analysis
- 查看答案
( )is a grid that shows the project resources assigned to each work package.
-
- A.Stakeholder engagement assessment matrix
- B.Requirements traceability matrix
- C.Probability and impact matrix
- D.Responsibility assignment matrix
- 查看答案
Xinhua News Agency reported in January 2022,Chian will further promote the developmet of a digital economy during the 14th Five-Year Plan eriod(2021-2025). The plan also emphasized industrial ( )transformation.
-
- A.digital
- B.networking
- C.intelligentize
- D.informatization
- 查看答案