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 ...
随机推荐
- AC日记——「SCOI2015」国旗计划 LiBreOJ 2007
#2007. 「SCOI2015」国旗计划 思路: 跪烂Claris 代码: #include <cstdio> #include <algorithm> #define ma ...
- 将对象转换为JSON字符串
将对象转换为JSON串: 方案一: 可以通过json-lib工具jar包进行转化:在www.json.org官网下载jar包. 方案二: 通过ObjectMapper对象进行转换 需要引入相应的jar ...
- python中,将字符串由utf8转gbk
uni_str = utf8_str.decode('utf-8'); gbk_str = uni_str.encode('gbk');
- 《深入浅出Nodejs》笔记——模块机制(2)
前言 书上还有很大一部分讲了C/C++模块的编译过程.核心模块编写和C/C++扩展模块的内容,不过我对C++一窍不通因此没有仔细看,如果以后需要再自习看吧. 包与NPM 第三方模块中,模块和模块之间是 ...
- HDU 6065 RXD, tree and sequence (LCA DP)
RXD, tree and sequence Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 524288/524288 K (Java ...
- 设计模式-迭代器模式(Iterator Pattern)
本文由@呆代待殆原创,转载请注明出处:http://www.cnblogs.com/coffeeSS/ 迭代器模式简介 迭代器相信大部分人都不陌生,java/c++等很多编程语言的容器类都支持迭代器操 ...
- cogs 2039. 树的统计
2039. 树的统计 ★★ 输入文件:counttree.in 输出文件:counttree.out 简单对比时间限制:1 s 内存限制:128 MB [题目描述] 关于树的统计问题有 ...
- [NOI2016]循环之美(杜教筛)
首先要求每个数互不相等,故有$x\perp y$. 可以发现$\frac{x}{y}$在$k$进制下为纯循环小数的充要条件为$x\cdot k^{len}\equiv x(mod\ y)$,即$y\p ...
- 关于abstract class 和 interface
1.abstract class 在 Java 语言中表示的是一种继承关系,一个类只能使用一次继承关系.但是,一个类却可以实现多个interface. 2.在abstract class 中可以有自己 ...
- 源码安装python及paramikon的初步试用
Auth: jin Date: 20140314 OS: CentOS release 5.5 (Final) 默认2.4版本 莫 1.download wget http://www.python. ...