Systemctl kurz und knapp

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

Listing aller Services

  • systemctl --type=service

Logging eines Dienstes

  • journalctl -u ssh

Logging eines Dienstes fortlaufend

  • journalctl -f -u ssh

Starten eines Service

  • systemctl start dienst

Stoppen eines Service

  • systemctl stop dienst

Restarten eines Service

  • systemctl restart dienst

Aktivieren eines Service

  • systemctl enable dienst

Deaktivieren eines Service

  • systemctl disable dienst

Status eines Service

  • systemctl status dienst

Set Target

  • systemctl -f enable multi-user.target
  • systemctl -f enable graphical.target

Get Default Target

  • systemctl get-default
graphical.target

Changing Target

  • systemctl isolate multi-user.target

Set Default Target

  • systemctl set-default multi-user.target

Show Targets

  • systemctl list-units --type target
UNIT                        LOAD   ACTIVE SUB    DESCRIPTION
basic.target                loaded active active Basic System
bluetooth.target            loaded active active Bluetooth
ceph-mds.target             loaded active active ceph target allowing to start/stop all ceph-mds@.service instances at once
ceph-mon.target             loaded active active ceph target allowing to start/stop all ceph-mon@.service instances at once
...