Linux systemd启动流程
以Ubuntu 18.04.2 LTS为例,列出Systemd启动target中涉及单元(Unit).
default.target (= graphical.target by default)
graphical.targetRequires=multi-user.targetWants=display-manager.serviceConflicts=rescue.service rescue.targetAfter=multi-user.target rescue.service rescue.target display-manager.serviceAllowIsolate=yes# ls -l /etc/systemd/system/display-manager.service
lrwxrwxrwx 1 root root 32 6月 3 2019 /etc/systemd/system/display-manager.service -> /lib/systemd/system/gdm3.service[Unit]After=getty@tty1.serviceAfter=rc-local.service plymouth-start.service systemd-user-sessions.serviceOnFailure=plymouth-quit.service[Service]ExecStartPre=/usr/share/gdm/generate-configExecStart=/usr/sbin/gdm3# ls -l /lib/systemd/system/graphical.target.wants/
lrwxrwxrwx 1 root root 39 6月 3 2019 systemd-update-utmp-runlevel.service -> ../systemd-update-utmp-runlevel.service[Unit]Requisite=systemd-update-utmp.serviceAfter=systemd-update-utmp.serviceAfter=runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.targetBefore=shutdown.target[Service]ExecStart=/lib/systemd/systemd-update-utmp runlevel# ls -l /etc/systemd/system/graphical.target.wants/
lrwxrwxrwx 1 root root 43 6月 3 2019 accounts-daemon.service -> /lib/systemd/system/accounts-daemon.service
lrwxrwxrwx 1 root root 35 6月 3 2019 udisks2.service -> /lib/systemd/system/udisks2.service
Multi-user.target
Multi-user.target[Unit]Description=Multi-User SystemDocumentation=man:systemd.special(7)Requires=basic.targetConflicts=rescue.service rescue.targetAfter=basic.target rescue.service rescue.targetAllowIsolate=yes# ls -l /lib/systemd/system/multi-user.target.wants/
lrwxrwxrwx 1 root root 15 6月 3 2019 dbus.service -> ../dbus.service
lrwxrwxrwx 1 root root 15 6月 3 2019 getty.target -> ../getty.target
lrwxrwxrwx 1 root root 24 6月 3 2019 plymouth-quit.service -> ../plymouth-quit.service
lrwxrwxrwx 1 root root 29 6月 3 2019 plymouth-quit-wait.service -> ../plymouth-quit-wait.service
lrwxrwxrwx 1 root root 33 6月 3 2019 systemd-ask-password-wall.path -> ../systemd-ask-password-wall.path
lrwxrwxrwx 1 root root 25 6月 3 2019 systemd-logind.service -> ../systemd-logind.service
lrwxrwxrwx 1 root root 39 6月 3 2019 systemd-update-utmp-runlevel.service -> ../systemd-update-utmp-runlevel.service
lrwxrwxrwx 1 root root 32 6月 3 2019 systemd-user-sessions.service -> ../systemd-user-sessions.service# ls -l /etc/systemd/system/multi-user.target.wants/
lrwxrwxrwx 1 root root 35 6月 3 2019 anacron.service -> /lib/systemd/system/anacron.service
lrwxrwxrwx 1 root root 40 6月 3 2019 avahi-daemon.service -> /lib/systemd/system/avahi-daemon.service
lrwxrwxrwx 1 root root 42 7月 31 2019 binfmt-support.service -> /lib/systemd/system/binfmt-support.service
lrwxrwxrwx 1 root root 41 6月 3 2019 console-setup.service -> /lib/systemd/system/console-setup.service
lrwxrwxrwx 1 root root 38 2月 5 2021 containerd.service -> /lib/systemd/system/containerd.service
lrwxrwxrwx 1 root root 32 6月 3 2019 cron.service -> /lib/systemd/system/cron.service
lrwxrwxrwx 1 root root 40 6月 3 2019 cups-browsed.service -> /lib/systemd/system/cups-browsed.service
lrwxrwxrwx 1 root root 29 6月 3 2019 cups.path -> /lib/systemd/system/cups.path
lrwxrwxrwx 1 root root 37 6月 3 2019 dns-clean.service -> /lib/systemd/system/dns-clean.service
lrwxrwxrwx 1 root root 38 6月 3 2019 irqbalance.service -> /lib/systemd/system/irqbalance.service
lrwxrwxrwx 1 root root 38 6月 3 2019 kerneloops.service -> /lib/systemd/system/kerneloops.service
lrwxrwxrwx 1 root root 40 6月 3 2019 ModemManager.service -> /lib/systemd/system/ModemManager.service
lrwxrwxrwx 1 root root 47 6月 3 2019 networkd-dispatcher.service -> /lib/systemd/system/networkd-dispatcher.service
lrwxrwxrwx 1 root root 38 6月 3 2019 networking.service -> /lib/systemd/system/networking.service
lrwxrwxrwx 1 root root 42 6月 3 2019 NetworkManager.service -> /lib/systemd/system/NetworkManager.service
lrwxrwxrwx 1 root root 36 6月 3 2019 ondemand.service -> /lib/systemd/system/ondemand.service
lrwxrwxrwx 1 root root 36 6月 3 2019 pppd-dns.service -> /lib/systemd/system/pppd-dns.service
lrwxrwxrwx 1 root root 36 6月 3 2019 remote-fs.target -> /lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 33 6月 3 2019 rsync.service -> /lib/systemd/system/rsync.service
lrwxrwxrwx 1 root root 35 6月 3 2019 rsyslog.service -> /lib/systemd/system/rsyslog.service
......
lrwxrwxrwx 1 root root 31 2月 5 2021 ssh.service -> /lib/systemd/system/ssh.service
lrwxrwxrwx 1 root root 44 6月 3 2019 systemd-resolved.service -> /lib/systemd/system/systemd-resolved.service
lrwxrwxrwx 1 root root 36 6月 3 2019 thermald.service -> /lib/systemd/system/thermald.service
lrwxrwxrwx 1 root root 38 2月 5 2021 ubuntu-fan.service -> /lib/systemd/system/ubuntu-fan.service
lrwxrwxrwx 1 root root 31 6月 3 2019 ufw.service -> /lib/systemd/system/ufw.service
lrwxrwxrwx 1 root root 47 6月 3 2019 unattended-upgrades.service -> /lib/systemd/system/unattended-upgrades.service
lrwxrwxrwx 1 root root 42 6月 3 2019 wpa_supplicant.service -> /lib/systemd/system/wpa_supplicant.service
basic.target
basic.target[Unit]Description=Basic SystemDocumentation=man:systemd.special(7)Requires=sysinit.targetWants=sockets.target timers.target paths.target slices.targetAfter=sysinit.target sockets.target paths.target slices.target tmp.mountRequiresMountsFor=/var /var/tmpWants=tmp.mount# ls -l /lib/systemd/system/sockets.target
-rw-r--r-- 1 root root 396 1月 28 2018 /lib/systemd/system/sockets.target
# ls -l /lib/systemd/system/sockets.target.wants
lrwxrwxrwx 1 root root 14 6月 3 2019 dbus.socket -> ../dbus.socket
lrwxrwxrwx 1 root root 25 6月 3 2019 systemd-initctl.socket -> ../systemd-initctl.socket
lrwxrwxrwx 1 root root 32 6月 3 2019 systemd-journald-audit.socket -> ../systemd-journald-audit.socket
lrwxrwxrwx 1 root root 34 6月 3 2019 systemd-journald-dev-log.socket -> ../systemd-journald-dev-log.socket
lrwxrwxrwx 1 root root 26 6月 3 2019 systemd-journald.socket -> ../systemd-journald.socket
lrwxrwxrwx 1 root root 31 6月 3 2019 systemd-udevd-control.socket -> ../systemd-udevd-control.socket
lrwxrwxrwx 1 root root 30 6月 3 2019 systemd-udevd-kernel.socket -> ../systemd-udevd-kernel.socket
# ls -l /etc/systemd/system/sockets.target.wants/
lrwxrwxrwx 1 root root 32 6月 3 2019 acpid.socket -> /lib/systemd/system/acpid.socket
lrwxrwxrwx 1 root root 41 6月 3 2019 apport-forward.socket -> /lib/systemd/system/apport-forward.socket
lrwxrwxrwx 1 root root 39 6月 3 2019 avahi-daemon.socket -> /lib/systemd/system/avahi-daemon.socket
lrwxrwxrwx 1 root root 31 6月 3 2019 cups.socket -> /lib/systemd/system/cups.socket
lrwxrwxrwx 1 root root 33 2月 5 2021 docker.socket -> /lib/systemd/system/docker.socket
lrwxrwxrwx 1 root root 32 6月 3 2019 snapd.socket -> /lib/systemd/system/snapd.socket
lrwxrwxrwx 1 root root 32 6月 3 2019 uuidd.socket -> /lib/systemd/system/uuidd.socket# ls -l /lib/systemd/system/timers.target
-rw-r--r-- 1 root root 445 1月 28 2018 /lib/systemd/system/timers.target
# ls -l /lib/systemd/system/timers.target.wants
lrwxrwxrwx 1 root root 31 6月 3 2019 systemd-tmpfiles-clean.timer -> ../systemd-tmpfiles-clean.timer
# ls -l /etc/systemd/system/timers.target.wants/
lrwxrwxrwx 1 root root 33 6月 3 2019 anacron.timer -> /lib/systemd/system/anacron.timer
lrwxrwxrwx 1 root root 35 6月 3 2019 apt-daily.timer -> /lib/systemd/system/apt-daily.timer
lrwxrwxrwx 1 root root 43 6月 3 2019 apt-daily-upgrade.timer -> /lib/systemd/system/apt-daily-upgrade.timer
lrwxrwxrwx 1 root root 32 6月 3 2019 fstrim.timer -> /lib/systemd/system/fstrim.timer
lrwxrwxrwx 1 root root 35 6月 3 2019 motd-news.timer -> /lib/systemd/system/motd-news.timer
lrwxrwxrwx 1 root root 43 6月 3 2019 snapd.snap-repair.timer -> /lib/systemd/system/snapd.snap-repair.timer# ls -l /lib/systemd/system/paths.target
-rw-r--r-- 1 root root 394 1月 28 2018 /lib/systemd/system/paths.target
# ls -l /etc/systemd/system/paths.target.wants/
lrwxrwxrwx 1 root root 30 6月 3 2019 acpid.path -> /lib/systemd/system/acpid.path
lrwxrwxrwx 1 root root 42 6月 3 2019 apport-autoreport.path -> /lib/systemd/system/apport-autoreport.path# ls -l /lib/systemd/system/slices.target
-rw-r--r-- 1 root root 449 1月 28 2018 /lib/systemd/system/slices.target
sysinit.target
sysinit.target[Unit]Description=System InitializationDocumentation=man:systemd.special(7)Conflicts=emergency.service emergency.targetWants=local-fs.target swap.targetAfter=local-fs.target swap.target emergency.service emergency.target# ls -l /lib/systemd/system/local-fs.target
-rw-r--r-- 1 root root 547 1月 28 2018 /lib/systemd/system/local-fs.target
# ls -l /lib/systemd/system/local-fs.target.wants/
lrwxrwxrwx 1 root root 29 6月 3 2019 systemd-remount-fs.service -> ../systemd-remount-fs.service# ls -l /lib/systemd/system/swap.target
-rw-r--r-- 1 root root 393 1月 28 2018 /lib/systemd/system/swap.target
local-fs.target
local-fs.target Conflicts=shutdown.targetAfter=local-fs-pre.targetOnFailure=emergency.targetOnFailureJobMode=replace-irreversibly # ls /lib/systemd/system/local-fs.target.wants/
lrwxrwxrwx 1 root root 29 6月 3 2019 systemd-remount-fs.service -> ../systemd-remount-fs.servicesystemd-remount-fs.serviceAfter=systemd-fsck-root.serviceBefore=local-fs-pre.target local-fs.target shutdown.targetWants=local-fs-pre.targetConditionPathExists=/etc/fstabExecStart=/lib/systemd/systemd-remount-fssystemd-fsck-root.serviceWants=systemd-fsckd.socketBefore=local-fs.target shutdown.targetAfter=systemd-fsckd.socketExecStart=/lib/systemd/systemd-fsck
Linux systemd启动流程相关推荐
- 【内核】linux内核启动流程详细分析【转】
转自:http://www.cnblogs.com/lcw/p/3337937.html Linux内核启动流程 arch/arm/kernel/head-armv.S 该文件是内核最先执行的一个文件 ...
- 【内核】linux内核启动流程详细分析
Linux内核启动流程 arch/arm/kernel/head-armv.S 该文件是内核最先执行的一个文件,包括内核入口ENTRY(stext)到start_kernel间的初始化代码, 主要作用 ...
- Linux的启动流程(CentOS 6)
前言 Linux启动的过程在实际生产中有着至关重要的作用.试想一下,如果我们在实际生产中服务器因为某一个服务出了问题,而不能启动,这时我们应该怎么办.如果我们了解Linux的详细启动过程,知道是在哪一 ...
- I.MX6 Linux Qt 启动流程跟踪
/*************************************************************************** I.MX6 Linux Qt 启动流程跟踪* ...
- Linux的启动流程简析(以Debian为例)
Linux的启动流程简析(以Debian为例) 正文: 前面的文章探讨BIOS和主引导记录的作用.那篇文章不涉及操作系统,只与主板的板载程序有关.今天,我想接着往下写,探讨操作系统接管硬件以后发生的事 ...
- Linux驱动(4)--Linux的启动流程
Linux的启动流程 1.Linux的启动流程概述 2. 从串口打印日志中分析 3. 以Exynos 4412启动流程为例 1.Linux的启动流程概述 ARM Linux 的启动流程大致为:Uboo ...
- linux的启动流程和加载程序
linux的启动流程和加载程序 先来了解一下整个过程,大致知道linux是怎么启动的. 启动时要加载内核,让内核来驱动硬件,这样才算是一个真正的操作系统 但内核启动前是要做一些其它工作的.启动过过程如 ...
- linux内核启动流程(文章最后流程图)
原文:linux内核启动流程 本文以Linux3.14版本源码为例分析其启动流程.各版本启动代码略有不同,但核心流程与思想万变不离其宗. 内核映像被加载到内存并获得控制权之后,内核启动流程开始.通常, ...
- Linux开机启动流程分析
Linux开机启动十步骤 收藏分享2012-2-6 11:15| 发布者: 红黑魂| 查看数: 1366| 评论数: 0|来自: 比特网 摘要: 开机过程指的是从打开计算机电源直到LINUX显示用户登 ...
最新文章
- 常见的web漏洞及其防范(转)
- Debian、Ubuntu安装源配置文件说明
- UA MATH567 高维统计I 概率不等式8 亚指数范数
- 现代化 C++ 开发工具 CLion 从入门到精通
- 近视手术─医学界的一个阴谋? !
- 移动IM开发那些事:技术选型和常见问题
- [蓝桥杯2016初赛]搭积木-枚举,next_permutation
- 面向切面编程AspectJ在Android埋点的实践
- canvas 实现图片局部模糊_Canvas 在高清屏下绘制图片变模糊的解决方法
- react native 问题点
- 2010年08月18日
- Hyperworks——Optistruct学习分享
- 人工智能ai下海百度云_云AI就像核电
- tssd加载lisp_几个有用的CAD的加载程序LISP
- 在iphone机型上,input实时中文搜索时,拼音会不断触发onchange的解决方案
- matlab补帧,超清还不够,插帧算法让视频顺滑如丝丨NeurIPS 2019
- 抖音小姐姐太好看了,我用Python把视频全部爬取下来
- 完全免费最好的在线pdf转换成word免费版
- SpringBoot 电子书
- 眼球追踪技术在用户体验中的应用
热门文章
- informatica tips_1
- speedoffice使用方法-word怎么添加边框
- 并发编程的三大特性——原子性,可见性,有序性
- 计算机游戏如何产生娱乐效果,浅谈电脑游戏与信息技术教学
- MySQL相关语句使用注意点
- Premiere室内背景场景MG动画PR素材MOGRT Vol.2
- [RK3288][Android5.1] 调试笔记 --- 根据VIDPID读取不同的rilLib以实现4G模块的适配
- 计算机科学家手抄报图片,关于简洁又漂亮的科学手抄报图片
- 给你一个长度为 n 的整数数组 nums 和 一个目标值 target。请你从 nums 中选出三个整数,使它们的和与 target 最接近。 /返回这三个数的和。
- 抖音电商直播间SOP主播工作计划脚本话术模板方案