When I open the terminal in CentOS linux and use su - to work as the root user, I type in commands like journalctl that result in a lot of output. The problem is, when I am done scrolling through the many lines of output, terminal just tells me the line number and does not give me an obvious way to get another command prompt. How can I get a command prompt back in this situation without having to open a new terminal?

  • Don't you have a ':' as prompt at the end? – Anthon Nov 26 '14 at 23:01
  • I thought the output might have been piped through less. I would try Ctrl-D and Ctrl-C. – Anthon Nov 26 '14 at 23:03
  • @Anthon Ctrl-D takes me to the end. Then Ctrl-C gives the the command prompt. If you want to submit that as an answer, I will mark it as accepted and +1. Thank you. – CodeMed Nov 26 '14 at 23:05
  • If the problem is that you've scrolled up and now want to get back to the bottom just type something. Most terminals will automatically scroll back down to the prompt at that point. – Etan Reisner Nov 26 '14 at 23:16
  • Ah, then you are in a pager of some sort. Possibly less or more. Try hitting q. – Etan Reisner Nov 26 '14 at 23:19
up vote 0 down vote accepted

I believe typing "q", whether at the end or not, will return you to your console. Is this not the case on your machine?

Edit: at least, less and journalctl behave this way for me on fedora 20.

  • Thank you. Please see comments above from Anthon and EtanReisner who gave this and more detail earlier. – CodeMed Nov 26 '14 at 23:47
  • Sorry about that, I didn't see that Etan beat me by fifteen minutes. I had the answer prepared but typed it up too late. – Kalvin Lee Nov 30 '14 at 20:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.