A Linux server is running in single user mode, but the problem that existed before is now fixed. What command is most appropriate to restore the server to service?
A.
reboot
B.
telinit 2
C.
shutdown -r now
D.
telinit 3
E.
shutdown -h now
题解
「telinit」指令可以改变 RunLevel。「telinit 1」可以将 RunLevel 改变成 RunLevel 1,也就是单人模式(Single User Mode)。「telinit 2」可以将 RunLevel 改变成 RunLevel 2,也就是多人无网络模式。「telinit 3」可以将 RunLevel 改变成 RunLevel 3,也就是多人有网络模式。正常情况下,文字界面会使用 RunLevel 3,图形界面会使用 RunLevel 5。
「reboot」指令可以将电脑重新开机。「shutdown」指令可以让电脑在指定时间关机或是重新开机,「-h」、「-P」或是「--poweroff」参数可以将电脑关机,「-r」或是「--reboot」可以将电脑重新开机。
选项 D 是正确答案。
