Ubuntu Command-Line – Return Control After Command Ends

command linepromptUbuntu

Apologies for this newbie question but I can't find the answer anywhere.

If I run the command systemctl in a SSH terminal accessing an Ubuntu VM in Azure, then it ends with lines 159-187/187 (END), it doesn't return the control and I don't know what key to press to let it continue and finish. I can press Ctrl-C to cancel, but that's probably not the correct way.

...........

systemd-tmpfiles-clean.timer   loaded active waiting   Daily Cleanup of Temporary

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

179 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
lines 159-187/187 (END)  

Best Answer

This isn't a general thing, it is specific to the systemctl command. Some commands, like systemctl, automatically open a pager (programs like less or more) for their output. That's why you can press space to load the next page of output.

To exit the pager, just press q. You can also use Ctrl+C though, it doesn't really make much difference.

Related Question