49

How does one go about getting the command line prompt back after using the systemctl status command? The command appears to succeed as it displays the status information of the requested service. However, the terminal appears to lock up after using the command.

David Foerster
  • 35,754
  • 55
  • 92
  • 145
Brian Ankeny
  • 593
  • 1
  • 4
  • 4
  • 9
    You can use the `--no-pager` option - see related [How to avoid horizontal scrolling in “systemctl status”?](https://askubuntu.com/questions/747156/how-to-avoid-horizontal-scrolling-in-systemctl-status) – steeldriver Oct 01 '17 at 13:36
  • @DavidFoerster as I noted in the other q, that doesn't actually use a pager, only the appearance of one. – muru Oct 02 '17 at 09:50

3 Answers3

78

If you mean

systemctl status

at the end it shows this:

      ├─systemd-journald.service
         │ └─318 /lib/systemd/systemd-journald
         ├─fwupd.service
         │ └─1703 /usr/lib/fwupd/fwupd
         ├─systemd-networkd.service
         │ └─395 /lib/systemd/systemd-networkd
         └─cups-browsed.service
           └─2918 /usr/sbin/cups-browsed
lines 172-194/194 (END)

... then press a q for quit.


As steeldriver noted in comments: use --no-pager if you do not want this behaviour see details.

systemctl status --no-pager
Nam G VU
  • 2,138
  • 4
  • 21
  • 30
Rinzwind
  • 293,910
  • 41
  • 570
  • 710
11

Check what systemctl is running in another terminal:

$ pstree -pa $(pgrep systemctl)
systemctl,2100 status
  └─less,2101

And from man less:

q or Q or :q or :Q or ZZ
  Exits less.
muru
  • 193,181
  • 53
  • 473
  • 722
5

systemctl status | cat does the job as well. You're just redirecting the output of systemctl status to cat which in turn dumps everything on the console without any pagination

blueren
  • 191
  • 1
  • 4