RHEL6和RHEL7系统运行级别设置以及切换
2016-01-01 18:03
423 查看
RHEL6操作系统
7个运行级别:
init 0 -6
init 0 关机
init 1 单用户模式
init 2 多用户状态,没有网络服务
init 3 字符界面
init 4 系统未使用保留给用户
init 5 图形界面
init 6 系统重启
设置默认启动级别:
[root@localhost ~]# vim /etc/inittab
可修改id:3:initdefault: 这一行中的数字
RHEL7操作系统
切换到第3运行级别:
[root@localhost ~]# systemctl isolate multi-user.target 或者使用软链接
[root@localhost ~]# systemctl isolate runlevel3.target
切换到第5运行级别
[root@localhost ~]# systemctl isolate graphical.target 或者使用软链接
[root@localhost ~]# systemctl isolate runlevel5.target
设置默认的运行级别:
方法一:
在创建新链接前,先删除存在的链接
[root@localhost ~]# rm -rf /etc/systemd/system/default.target
默认启动级别
[root@localhost ~]# ln -sf /lib/systemd/system/multi-user.target(graphical.target) /etc/systemd/system/default.target
方法二:[root@localhost ~]# systemctl -f enable multi-user.target(graphical.target)
查看当前运行级别:runlevel
Passwd l 锁定用户
Passwd L 锁定用户
7个运行级别:
init 0 -6
init 0 关机
init 1 单用户模式
init 2 多用户状态,没有网络服务
init 3 字符界面
init 4 系统未使用保留给用户
init 5 图形界面
init 6 系统重启
设置默认启动级别:
[root@localhost ~]# vim /etc/inittab
可修改id:3:initdefault: 这一行中的数字
RHEL7操作系统
切换到第3运行级别:
[root@localhost ~]# systemctl isolate multi-user.target 或者使用软链接
[root@localhost ~]# systemctl isolate runlevel3.target
切换到第5运行级别
[root@localhost ~]# systemctl isolate graphical.target 或者使用软链接
[root@localhost ~]# systemctl isolate runlevel5.target
设置默认的运行级别:
方法一:
在创建新链接前,先删除存在的链接
[root@localhost ~]# rm -rf /etc/systemd/system/default.target
默认启动级别
[root@localhost ~]# ln -sf /lib/systemd/system/multi-user.target(graphical.target) /etc/systemd/system/default.target
方法二:[root@localhost ~]# systemctl -f enable multi-user.target(graphical.target)
查看当前运行级别:runlevel
Passwd l 锁定用户
Passwd L 锁定用户
相关文章推荐
- 应用领航:盘点那些年我们一起追过的OS
- 无奇不有!盘点各国自己开发的操作系统
- JQuery插件Style定制化方法的分析与比较
- 可自定义oem的萝卜家园 Ghost XP 新春装机版 V200801 下载
- C#实现判断操作系统是否为Win8以上版本
- CSS和JS标签style属性对照表(方便js开发的朋友)
- js获取本机操作系统类型的两种方法
- ppk谈JavaScript style属性
- Linux操作系统添加新硬盘方法
- java如何获取本地操作系统进程列表
- Linux rdesktop操作系统下远程登录Windows XP桌面
- 32位操作系统认出超出4G内存的方法
- Linux rpm tar 操作系统下软件的安装与卸载方法
- JavaScript 获取用户客户端操作系统版本
- jsp 获取客户端的浏览器和操作系统信息
- asp中去除html中style,javascript,css代码
- javascript下用for( in )语句 获得所有style 内容的脚本代码
- JavaScript修改css样式style动态改变元素样式
- JavaScript修改css样式style
- Default style sheet for HTML 4