Ask Your Question

how to return to commandline

asked 2018-11-14 04:54:39 -0500

Unik-Web gravatar image

Hi, How to return to command line when i fire systemctl status firewalld I get this message stop line 1-13 (END) and only way to come to command line is CTRL+C and it's feel wrong command. is there better shortcut ?

edit retag flag offensive close merge delete


Why do you say “it feels wrong”? It accomplishes the job, doesn’t it?

Aeyoun gravatar imageAeyoun ( 2018-11-14 06:24:03 -0500 )edit

It could be helpful to add the info on the last line showing how to quit. Just like the man command does:

 Manual page man(1) line 1 (press h for help or q to quit)
villykruse gravatar imagevillykruse ( 2018-11-14 10:10:00 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2018-11-14 07:18:09 -0500

ozeszty gravatar image

Hi, just press q and it will exit to terminal prompt. In this case using q or Ctrl-C (sending SIGINT) makes no difference, because no important action will be interrupted - systemctl status just views information and doesn't write or send anything back (I think).

edit flag offensive delete link more

answered 2018-11-14 07:52:08 -0500

rzbyn gravatar image

There are other shortcuts like ctrl + z, ctrl + d and ctrl + \ to come back to your command line. You can run stty -a on your terminal to see other shorcuts like:

intr = ^C; quit = ^\; erase = ^?; kill = ^U;
eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O;

I often to usectrl + z to get back to my command line because it suspends current job which later I can bring it back without redoing commands.
When top stopped with ctrl + z
The terminal will show:
[1]+ Stopped top
Then you can run other command on your terminal.
When 1 or more jobs are suspended, jobs command will list them down:
[1]- Stopped top
[2]+ Stopped systemctl status httpd.service
[3]+ Stopped systemctl status mariadb.service
Then use fg n to bring a jobs back to foreground without redoing the full command
or bg n to make the process runs on the background.
If you want to kill a suspended program you can do kill %n
where n is the number from the list [n].


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2018-11-14 04:54:39 -0500

Seen: 76 times

Last updated: Nov 14 '18