CentOS7改变目标(运行级别)
分类:CentOS教程 阅读:26979 次
1.使用命令切换运行级别/目标
# systemctl isolate multi-user.target //切换到运行级别3,该命令对下次启动无影响,等价于telinit 3 # systemctl isolate runlevel3.target //切换到运行级别3,该命令对下次启动无影响,等价于telinit 3 # systemctl isolate graphical.target //切换到运行级别5,该命令对下次启动无影响,等价于telinit 5 # systemctl isolate runlevel5.target //切换到运行级别5,该命令对下次启动无影响,等价于telinit 5 |
2.修改默认运行级别/目标
可以执行下面命令,设置启动时默认进入文本模式或图形模式。
# ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target //文字模式 # ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target//图形模式 |
开机启动进的目标是default.target,默认链接到graphical.target(大致相当于原来的运行级别5)。可以通过内核参数更改默认运行级别(见第1章)。
也可以执行systemctl命令,设置启动时默认进入文本模式或图形模式。
# systemctl -f enable multi-user.target //文字模式 # systemctl -f enable graphical.target //图形模式 |
热门推荐
- CentOS下限制SSH远程终端连接数
- Centos6下限制用户只能sftp并出不了家目录
- CentOS下安装 Realtek 8110SC 千兆网卡驱动
- CentOS下phpmyadmin配置
- Centos6.3下Apache配置https证书访问
- lnmp中nginx静态化的配置
- Centos6上一键搭建PPTP VPN 服务器
- CentOS下libiconv库的安装和使用
- CentOS下svn迁移备份的三种方法
- CentOS下编译安装Nagios步骤
- Linux系统下的数据镜像备份工具——Rsync
- 开源Cheops软件在企业中的应用
- CentOS 5.10 系统安装配置图解教程
- CentOS下配置vsftpd匿名用户下载和上传
- CentOS下安装KeePassX管理多个密码
- CentOS下rdesktop安装和使用
- CentOS6.4下编译安装Bandwidthd和Postgrsql
- CentOS下kvm安装配置
- CentOS 安装cacti完美配置
- 国外VPS主机上搭建vpn及wordpress