!
也想出现在这里? 联系我们
广告位
当前位置:首页>教程分享>服务器教程>Linux中使用init命令关机、重启、切换模式

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

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

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, 

# Modified for RHS Linux by Marc Ewing and Donnie Barnes

# 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 ?就是重启

给TA打赏
共{{data.count}}人
人已打赏
服务器教程

Linux系统绑定多网卡的7种bond模式介绍

2021-4-17 18:16:38

服务器教程

Linux下查看一个进程占用了哪个端口的方法

2021-4-17 18:16:41

声明 本站上的部份代码及教程来源于互联网,仅供网友学习交流,若您喜欢本文可附上原文链接随意转载。无意侵害您的权益,请发送邮件至 [email protected] 或点击右侧 私信:吉吉国王 反馈,我们将尽快处理。
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索
OneEase