让我们了解下Linux的运行级别
source link: https://www.linuxprobe.com/linux-dyxjb.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
导读 Linux的运行级别有6个,而这6个运行级都有各自的功能,某个程序在一个运行级别里面运行在另一个级别就不启动,这6个运行级别可以通过如下命令查看
从上图可以看到这6个运行级别分别是:0 系统停止 1 单用户模式 2 多用户模式除开NFS功能(进入无网络服务) 3 完整多用户模式 4 未使用 5 X11图形模式 6重启
一般情况下我们处于的运行级在3或者5,那么如何切换呢,使用"init + 运行级别"回车即可直接进入,比如输入init 0电脑就会关机,输入init 6电脑就会重启
那么怎么查看在这个模式下可以使用什么功能呢,查看/etc/rc.d/init.d这个文件夹下,就是可以运行的脚本,如下图这些
那么又该如何查看每个模式下可以用的脚本文件呢,在/etc/rc.d/rcN.d文件夹中,可以分别查看各个运行级别的相对应的文件,如下图
这6种模式还有许多功能,比如说如果忘记了root密码就可以进入单用户模式,在启动后的提示符界面下输入init = /bin/sh rw就进入了模式1,把root文件挂为读写就可以跳过系统认证,直接用passwd程序来更改root用户口令了,然后再启动到正常的运行级去即可
Recommend
-
148
程序员 - @issuz -
-
48
版权和解下的“暗涌”:网易云与阿里音乐互授权,大战下半场将来
-
46
-
33
Android - @yinbowu95 - RT 虽然不知道这里面有什么利益纠葛,但难得看到各个毒瘤厂商集合在一起切蛋糕,也是比较引人注目了。详细 :https://mp.weixin.qq.com/s?__biz=Mz
-
56
IT教育领导品牌 职场/人工智能/大数据 关注 人工智能人才缺口500万...
-
40
问与答 - @v2xe2v -
-
53
软件定义广域网(SD-WAN)发展势头强劲,企业的技术大部分都可以适应SD-WAN的优化,供应商提供服务的方式也在不断变化中。目前业内还有一个趋势,通过软件管理分支机构的许多网络功能,创建一个软件定义的分支(SD-Branch)。...
-
48
-
30
点击▲关注 “ CU技术社区 ” 给公众号标星置顶 更多精彩 第一时间直达 您...
-
5
您可以将Linux运行级别视为操作系统运行的不同模式。这些模式或运行级别中的每一个都有其打开或关闭的进程和服务列表。从Linux启动开始,它就始终处于某个运行级别。随着您继续使用计算机,此运行级别可能会发生变化,具体取决于操作系统需要访问的服务类型。...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK