ubuntu 的runlevel设定
修改ubuntu的启动级别 runlevel
-----------------------------------------------------------------------------------------------------
Ubuntu 16.04 uses systemd instead of init and hence the concept of runlevels is replaced by the term targets. So there is indeed a mapping between init-based runlevels and systemd-based targets:
Mapping between runlevels and systemd targets
┌─────────┬───────────────────┐
│Runlevel │ Target │
├─────────┼───────────────────┤
│0 │ poweroff.target │
├─────────┼───────────────────┤
│1 │ rescue.target │
├─────────┼───────────────────┤
│2, 3, 4 │ multi-user.target │
├─────────┼───────────────────┤
│5 │ graphical.target │
├─────────┼───────────────────┤
│6 │ reboot.target │
└─────────┴───────────────────┘
Now, to just change the "runlevels" in 16.04, you can use for eg:
sudo systemctl isolate multi-user.target
To make this the default "runlevel", you can use:
sudo systemctl enable multi-user.target
sudo systemctl set-default multi-user.target
From man systemctl
isolate NAME
Start the unit specified on the command line and its dependencies and stop all others. If
a unit name with no extension is given, an extension of ".target" will be assumed.
This is similar to changing the runlevel in a traditional init system. The isolate command
will immediately stop processes that are not enabled in the new unit, possibly including
the graphical environment or terminal you are currently using
Also have a look at man systemd.special to know more about the targets in systemd.
ubuntu 的runlevel设定的更多相关文章
- ubuntu 13.04 设定静态IP
切换到root用户,然后进入/etc/network目录.备份interfaces文件(备份文件是一个好习惯) 下面编辑interfaces文件,添加如下语句: # Assgin static IP ...
- Ubuntu下pycharm设定任务栏图标后打开出现问号图标
事情是这样的: ubuntu16.04,安装好pycharm后,bin下只有一个sh执行文件,想要弄成任务栏图标,所以在/usr/share/applications下新建文件pycharm.desk ...
- Ubuntu基础设定:openssh-server安装和使用
记录一下Ubuntu17.10的openssh-server的安装和使用.安装之后就可以使用ssh登陆Ubuntu了,所以是Ubuntu的基础设定之一. 事前准备 Ubuntu版本:17.10 dev ...
- Ubuntu 开机自启动工具 update-rd.d 使用详解
常用命令: $ sudo update-rc.d nginx defaults #增加服务 $ sudo update-rc.d -f nginx remove #移除服务 Linux ...
- ubuntu执行级别,设置单用户模式
redhat的runlevel级别定义例如以下: 0:关机.不能将系统缺省执行级别设置为0,否则无法启动. 1:单用户模式.仅仅同意root用户对系统进行维护. 2:多用户模式.但不能使用NFS( ...
- 简单解决Ubuntu修改locale的问题
本文针对的问题是“Ubuntu 安装中文语言包”“Ubuntu Server中文问题”,“Ubuntu更改语言环境”,“Ubuntu locale的设定”,“cannot change local ...
- ubuntu启动脚本一览分析
#rc--run command的意思[rc解释]harvey@ubuntu:/etc$ cat ./init/rc-sysinit.conf # rc-sysinit - System V init ...
- linux学习笔记1-ubuntu的安装与基本设置
ubuntu的安装 (1) 要装ubuntu首先当然得捣鼓一台机器,当然你用虚拟机也是可以的.本人的这台DELL品牌机是从某师兄脚底下挖出来的,大概很多年没人用了,内存1.25G|||- -,但是硬盘 ...
- Linux课程实践一:Linux基础实践(基础操作)
一.软件源维护 1. 基本操作 (1)查看源列表 sudo vim /etc/apt/sources.list deb:二进制软件安装包 deb-src:源码包 (2)备份软件源列表 sudo cp ...
随机推荐
- maven中profile的激活方式
1.默认激活 Maven给我们提供了多种不同的profile激活方式.比如我们可以使用-P参数显示的激活一个profile,也可以根据环境条件的设置让它自动激活等. <profile> & ...
- Apache配置基于端口号的虚拟主机 Apache virtual host configuration is based on the port
有可能只有一个ip出口,但却有多个项目,那么就需要基于端口号架设虚拟主机. Step 1: 检查是否开启 httpd-vhosts.conf apache/conf/httpd.conf文件 # Vi ...
- 画图工具除了echarts我使用highcharts
文件 :密码:xewx 官方文档教程地址:https://www.hcharts.cn/docs/basic-color 上手容易,api友好,尽管也有不尽人意的地方,但是它很适合我当前的项目,如果想 ...
- rsync数据定时增量备份知识管理服务器数据
为了保证公司知识管理服务器数据的安全性,所以计划每天同步confluence服务器上面数据 一.安装rsync服务端 1.查看是否安装rsync ps -ef | grep rsync 2.添加配置文 ...
- DaemonSet
What is a DaemonSet? DaemonSet能够让所有(或者一些特定)的Node节点运行同一个pod.当节点加入到kubernetes集群中,pod会被(DaemonSet)调度到该节 ...
- Eclipse中快速 打出 main方法的签名
有时,我们创建一个空白类,需要打出main方法 public static void main(String [] args){ } 在Eclipse先敲main字符,然后按住ALT+/,再按回车即可 ...
- 关于std::ios::sync_with_stdio(false)
std::ios::sync_with_stdio(false); 很多C++的初学者可能会被这个问题困扰,经常出现程序无故超时,最终发现问题处在cin和cout上,(甚至有些老oier也会被这个问题 ...
- JavaScript之函数和this
一. 函数的内部属性 1. 在函数内部有两个特殊的对象: arguments: 类数组对象,包含传入函数中的所有参数.其有一个callee属性,该属性是一个指针,指向拥有这个arguments对象的函 ...
- Codeforces Round #260 (Div. 1) Boredom(DP)
Boredom time limit per test 1 second memory limit per test 256 megabytes input standard input output ...
- [BZOJ4824][CQOI2017]老C的键盘(树形DP)
4824: [Cqoi2017]老C的键盘 Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 193 Solved: 149[Submit][Statu ...