一 systemd基本知识
提高启动速度
自动服务依赖管理
systemd基本管理unit
Service unit .service A system service.
Target unit .target A group of systemd units.
Automount unit .automount A file system automount point.
Device unit .device A device file recognized by the kernel.
Mount unit .mount A file system mount point.
Path unit .path A file or directory in a file system.
Scope unit .scope An externally created process.
Slice unit .slice A group of hierarchically organized units
that manage system processes.
Snapshot unit .snapshot A saved state of the systemd manager.
Socket unit .socket An inter-process communication socket.
Swap unit .swap A swap device or a swap file.
Timer unit .timer A systemd timer.
2.相关配置文件
/usr/lib/systemd/system
/run/systemd/system/
/etc/systemd/system/
runnerlevel
3.服务启动停止命令 systemctl
start
stop
status
systemctl stop bluetooth.service
4.显示所有服务状态
systemctl list-units --type service --all
systemctl --failed --type=service
5.添加自动启动
systemctl enable name.service
6. 查看target
sytemctl list-units --type target
systemctl list-units --type target --all
7.更改target
systemctl set-default multi-user.target
8.重启操作系统
systemctl halt
systemctl poweroff
systemctl reboot
本文出自 “痞子厨子戏子” 博客,请务必保留此出处http://chenwei.blog.51cto.com/32183/1841958
原文地址:http://chenwei.blog.51cto.com/32183/1841958