Linux中使用init命令关机、重启、切换模式等
Linux中使用init命令关机、重启、切换模式等
发布时间:2017-01-10 来源:查字典编辑
摘要:正在学习Linux中。。。一边学一边记录着。。所有观点只是个人观点Linux有个文件/etc/inittab##inittabThisfil...

正在学习Linux中。。。一边学一边记录着。。所有观点只是个人观点

Linux有个文件 /etc/inittab

#

# inittab This file describes how the INIT process should set up

# the system in a certain run-level.

#

# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>

# Modified for RHS Linux by Marc Ewing and Donnie Barnes

#</p> <p># Default runlevel. The runlevels used by RHS are:

# 0 - halt (Do NOT set initdefault to this)

# 1 - Single user mode

# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)

# 3 - Full multiuser mode

# 4 - unused

# 5 - X11

# 6 - reboot (Do NOT set initdefault to this)

#

id:3:initdefault:

0是关机

1是单用户

2是多用户,不联网

3是多用户

4是不使用的

5是xwindows,也就是有界面的

6是重启

init命令很简单。直接输入init + 你想要的模式 回车就行。

比如 输入 : init 0 就是关机

init 3 就是切换到多用户

init 5 就是切换到界面

init 6 就是重启

Linux中使用init命令关机、重启、切换模式等1

我实验的时候都是在root用户下进行的,不知道其它用户可不可以,再实验实验。

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新unix linux学习
热门unix linux学习
操作系统子分类