-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystemctl.cheat
40 lines (28 loc) · 1.29 KB
/
systemctl.cheat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
% systemctl, service
# Start service
systemctl start <service_inactive>
# Stop service
systemctl stop <service_active>
# Enable service
systemctl enable <service_disabled>
# Disable service
systemctl disable <service_enabled>
# Restart service
systemctl restart <service>
# Reload service
systemctl reload <service_active>
# Service status
systemctl status <service>
# List running services
systemctl list-units --type=service --state=running
# List enabled services
systemctl list-unit-files --type=service --state=enabled
# List disabled services
systemctl list-unit-files --type=service --state=disabled
# Set keymap to altgr-intl
localectl set-x11-keymap us "" altgr-intl
$ service_inactive: systemctl list-units --type=service --state=inactive | awk '{print $1}' | grep .service | sed 's/.service$//'
$ service_active: systemctl list-units --type=service --state=active | awk '{print $1}' | grep .service | sed 's/.service$//'
$ service_enabled: systemctl list-unit-files --type=service --state=enabled | awk '{print $1}' | grep .service | sed 's/.service$//'
$ service_disabled: systemctl list-unit-files --type=service --state=disabled | awk '{print $1}' | grep .service | sed 's/.service$//'
$ service: systemctl list-units --type=service --all | awk '{print $1}' | grep .service | sed 's/.service$//'