修改ubuntu的启动级别 runlevel

-----------------------------------------------------------------------------------------------------

37down voteaccepted

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设定的更多相关文章

  1. ubuntu 13.04 设定静态IP

    切换到root用户,然后进入/etc/network目录.备份interfaces文件(备份文件是一个好习惯) 下面编辑interfaces文件,添加如下语句: # Assgin static IP ...

  2. Ubuntu下pycharm设定任务栏图标后打开出现问号图标

    事情是这样的: ubuntu16.04,安装好pycharm后,bin下只有一个sh执行文件,想要弄成任务栏图标,所以在/usr/share/applications下新建文件pycharm.desk ...

  3. Ubuntu基础设定:openssh-server安装和使用

    记录一下Ubuntu17.10的openssh-server的安装和使用.安装之后就可以使用ssh登陆Ubuntu了,所以是Ubuntu的基础设定之一. 事前准备 Ubuntu版本:17.10 dev ...

  4. Ubuntu 开机自启动工具 update-rd.d 使用详解

    常用命令: $ sudo update-rc.d nginx defaults      #增加服务 $ sudo update-rc.d -f nginx remove    #移除服务 Linux ...

  5. ubuntu执行级别,设置单用户模式

    redhat的runlevel级别定义例如以下:   0:关机.不能将系统缺省执行级别设置为0,否则无法启动. 1:单用户模式.仅仅同意root用户对系统进行维护. 2:多用户模式.但不能使用NFS( ...

  6. 简单解决Ubuntu修改locale的问题

      本文针对的问题是“Ubuntu 安装中文语言包”“Ubuntu Server中文问题”,“Ubuntu更改语言环境”,“Ubuntu locale的设定”,“cannot change local ...

  7. ubuntu启动脚本一览分析

    #rc--run command的意思[rc解释]harvey@ubuntu:/etc$ cat ./init/rc-sysinit.conf # rc-sysinit - System V init ...

  8. linux学习笔记1-ubuntu的安装与基本设置

    ubuntu的安装 (1) 要装ubuntu首先当然得捣鼓一台机器,当然你用虚拟机也是可以的.本人的这台DELL品牌机是从某师兄脚底下挖出来的,大概很多年没人用了,内存1.25G|||- -,但是硬盘 ...

  9. Linux课程实践一:Linux基础实践(基础操作)

    一.软件源维护 1. 基本操作 (1)查看源列表 sudo vim /etc/apt/sources.list deb:二进制软件安装包 deb-src:源码包 (2)备份软件源列表 sudo cp ...

随机推荐

  1. nutch 抓取需要登录的网页

    题记:一步一坑,且行且珍惜 最近接到任务,要利用nutch去抓取公司内部系统的文章,可是需要登录才能抓到.对于一个做.net,不熟悉java,不知道hadoop,很少接触linux的我,这个过程真是艰 ...

  2. 使用python获取网易云音乐无损音频教程

    博客园主页:http://www.cnblogs.com/handoing/ github项目:https://github.com/handoing/get-163-music 环境:Python ...

  3. lr_Controller界面图

    lr可用运行图介绍: lr集合点策略:

  4. H264 帧边界识别简介

    http://blog.csdn.net/wzw88486969/article/details/50364017

  5. Larazrus 快捷键 总结。

    delphi+cnpack 用惯了,转移到 lazarus 有点难受是不是!其实, lazaurs 的编辑器也是蛮强 大的,支持代码补全,自动完成,模板编辑,多行缩进注释,选定代码后批量更改里面的单 ...

  6. Python 2.7.13安装

    参考文章:安装Python 进入至Python官方网站,点击下载 下载完成后直接进行安装 选择安装的路径 选择安装的组件,请注意选择安装pip和Add python.exe to Path这两个选项 ...

  7. DaemonSet

    What is a DaemonSet? DaemonSet能够让所有(或者一些特定)的Node节点运行同一个pod.当节点加入到kubernetes集群中,pod会被(DaemonSet)调度到该节 ...

  8. RadioGroup多行显示

    今天做一个单选框,效果如下: 使用原始的RadioGroup可以实现布局,但因为把6个单选分为两个LinearLayout,导致无法互斥,Google官方的做法是写两个RadioGroup,但是要动态 ...

  9. eclipse 查看jdk源码

    eclipse中引入jdk源码的设置:  设置: 1.点 "window"-> "Preferences" -> "Java" ...

  10. POJ1456 supermarket [堆]

    题目传送门 Supermarket Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 15192   Accepted: 685 ...