Systemd is now the default in RHEL / CentOS 7, the following post is a cheat sheet for systemd commands, useful for local system enumeration.
Systemd is becoming the default on most distros
Systemd is becoming the default in many distros, RHEL, CentOS, Ubuntu 15
and it offers a single command to manage your system, instead of switching
between chkconfig
or running init scripts.
Systemd Service Commands
Command | Description |
---|---|
|
systemd stop running service |
|
systemctl start service |
|
systemd restart running service |
|
reloads all config files for service |
|
systemctl show if service is running |
|
systemctl start service at boot |
|
systemctl - disable service at boot |
|
show systemctl service info |
|
run systemctl commands remotely |
Systemd Information Commands
Systemd commands that show useful system information.
Command | Description |
---|---|
|
show and units dependencies |
|
systemd list sockets and activities |
|
view active systemd jobs |
|
systemctl list unit files and their states |
|
systemctl list default target (like run level) |
Changing System State
systemd reboot, shutdown, default target etc
Command | Description |
---|---|
|
systemctl reboot the system |
|
systemctl shutdown (power off the system) |
|
Put in emergency mode |
|
systemctl default mode |
##Systemctl Viewing Log Messages
Command | Description |
---|---|
|
show all collected log messages |
|
see sshd service messages |
|
follow messages as they appear |
|
show kernel messages only |