Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

systemctl short status output format for specific service

Tags:

systemctl

is it possible to get status for specific systemd service

$ systemctl -a | grep sshd.service
  sshd.service              loaded    active   running   OpenSSH server daemon
$

but without grep, only with systemctl ? Something like systemctl SHOW_STATUS_LIKE_A_OPTION sshd.service

systemctl status - too long and multiline...

like image 315
Dmitry Perfilyev Avatar asked Feb 19 '20 10:02

Dmitry Perfilyev


1 Answers

You can try systemctl is-active sshd.service, systemctl is-enabled sshd.service and systemctl is-failed sshd.service.

like image 150
Samuel Verschelde Avatar answered Sep 17 '22 15:09

Samuel Verschelde