How do you scroll up/down on the console of a Linux VM [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
I recognize that Up / Down will give you the command history. But, how do you look at past output by scrolling up and down? I have used Shift + Page Up / Page Down , Alt + Shift + Up / Down and Page Up / Page Down but none of these seem to work. It is a Redhat Linux box.
Is that a vmware thing? If you’re not using a regular terminal emulator, you won’t have terminal functions like scrollback.
15 Answers 15
SHIFT + Page Up and SHIFT + Page Down . If it doesn’t work try this and then it should:
Go the terminal program, and make sure
Edit/Profile Preferences/Scrolling/Scrollback/Unlimited
is checked.
The exact location of this option might be somewhere different though, I see that you are using Redhat.
Only the first line of this answer is useful on the Linux console, the rest might be useful on a GUI terminal like gnome-terminal, though unlimited is not needed.
Shift + Fn + UP or DOWN on a Macbook will allow you to scroll.
Thanks for this Lauren, and thanks @anizzomc. I was on my macbook pro running Ubuntu server in virtual box and was having a heck of a time trying to figure this out.
As the comments show, this is the only correct answer. Everyone else is talking about terminal emulators, which is not what the OP is asking. It is the only thing which worked for me on Ubuntu Server 14.04 emulation in Parallels on Macbook Pro
that’s simply because your PageUp/PageDown keys are mapped to Fn+Up/Down, it won’t work in other keyboards. And Fn is not a real key that the OS recognizes (except on Macs)
Alternative: you can use the less command.
This will allow you to scroll with the up and down arrow keys.
Basically your output has been piped with the less command.
Interesting enough this was the only way that actually worked when using the shell on a FreeNAS install disk.
FreeNAS is FreeBSD based, and there you scroll differently. First you press scroll lock to get into paging mode and then use plain arrows and page up / page down to scroll. Press scroll lock again to get back to typing mode.
ALTERNATIVE FOR LINE-BY-LINE SCROLLING
Ctrl + Shift + Up Arrow or Down Arrow
Unlike Shift + Page Up or Page Down , which scrolls the entire page, this will help with a smoother line-by-line scrolling, which is exactly what I was looking for.
SHIFT + Page Up and SHIFT + Page Down are the correct keys to operate on the linux (virtual) console, but vmware console doesn’t have those terminal settings. The virtual console has fixed scroll back size, it sounds like it’s limited to video memory size according to this Linux virtual console Scrolling behavior documentation.
In order to prevent the Matthew Effect, from now on I will try to upvote the second and correct answer to encourage ppl to answer the questions who already have a correct answer.
Another alternative, that might be already installed on your system is to use GNU screen :
# This starts screen which adds basic window management in terminals screen # This starts the copy mode you can use to scroll [ # Now use the arrows to scroll # To exit copy mode, do
See man screen for much more useful options (multiple windows, . ).
Shift Pageup/End works for me.
It seems as though this is not easily possible: The Arch Linux Wiki lists no way to do this on the console (while easily possible on the virtual terminal).
Ctrl — b then [ then you can use your normal navigation keys to scroll around (eg. Up Arrow or PgDn ). Press q to quit scroll mode.
Alternatively you can press Ctrl — b PgUp to go directly into copy mode and scroll one page up (which is what it sounds like you will want most of the time)
How to scroll in a terminal using keyboard?
How can I scroll in bash using only the keyboard? If it’s not possible in bash, are there any other shells that support this?
This is not a feature of the shell, it’s a feature of the terminal emulator. See What is the exact difference between a ‘terminal’, a ‘shell’, a ‘tty’ and a ‘console’? What terminal are you using?
I think this is too broad. As mentioned, scrolling is a terminal emulator feature, not a shell feature. There are really very many terminal emulators many of which implement scrolling in different ways, or not at all.
On that score: For a question specifically about GNOME Terminal, although the questioner initially also did not specify the terminal emulator program, see unix.stackexchange.com/questions/460422 .
12 Answers 12
In «terminal» (not a graphic emulator like gterm ), Shift + PageUp and Shift + PageDown work.
I use the default terminal in Ubuntu 14 (bash) and to scroll by page it is Shift + PageUp or Shift + PageDown to go up/down a whole page.
Ctrl + Shift + Up or Ctrl + Shift + Down to go up/down by line.
This depends on your terminal emulator, not the shell you are using. I personally use GNU Screen. From the description:
Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.
You can use C-a [ to enter scrollback mode. From here, you can scroll with the keyboard and even copy and paste. The mode can be exited from by using the Esc key.
How to scroll up and down in sliced «screen» terminal
I just installed screen and like the idea to divide linux terminal into multiple pieces. But I can’t figure out one thing: How to scroll up and down, when I’m in screen . When I’m using regular linux terminal I can achieve this with Shift + Pg Up or Shift + Pg Dn `. but unfortunatelly it doesn’t work in divided terminal. That’s what I mean when saying screen and divided terminal: And that’s a regular termina (just in case):
5 Answers 5
1. Ctrl + A , then Esc
2. After that, you should be able to move your cursor around using the arrow keys:
↑ , ↓ , PgUp , PgDn and sometimes using the mouse wheel
3. Return control: Q or Esc
@MihaiDanila: How would you «normally» use the navigation keys? The navigation keys are handled by the current foreground application. If it’s an editor, they’ll probably work. If it’s a shell, they’ll probably go back through your command history without scrolling the display.
If my pageup/pagedown keys work in a normal shell, I’d like for them to work in a shell from screen . I think that’s what I’m asking here.
in this mode selection of any text is available by typing Space or Enter key once and finish your text selection with another Space or Enter. the selection will enter into the screen based clipboard. you could paste clipboard data later using Ctrl+a then ]
How to Scroll Up in the Linux Terminal
If you’re a new Linux user trying to navigate the lines of inputs and outputs filling your terminal, it might be a bit overwhelming. Because recent lines remain visible, as your inputs increase and your outputs grow longer, your screen can quickly grow unrecognizable, buried in a wall of white text. When you don’t need this previous information, you can always clear the terminal, but what if you realize later that you’ve lost something important? Maybe you’re troubleshooting an issue, or looking to repeat a previously entered command. Regardless of why, if you’re looking for how to scroll up and down in the Linux terminal, then read on to learn several methods for easily navigating the Linux terminal using your keyboard.
How to Scroll Up and Down in Linux
As with many things in Linux, the ability to scroll up and down within your terminal depends on the specific terminal you are using. For most users, you should be able to scroll up and down, one line at a time using Shift+UpArrow or Shift+DownArrow. To jump an entire page at a time, try Shift+PageUp or Shift+PageDown.
If these commands don’t work, it’s likely your terminal is using different keybindings. While determining exactly which keyboard shortcuts work for your terminal requires you to know which terminal you’re running, there is a secondary method which is quite common as well. The other common method for moving up and down a line at a time involves using Ctrl+Shift+UpArrow or Ctrl+Shift+DownArrow. This same alternate pattern can be used to jump whole pages at a time using Ctrl+Shift+PageUp or Ctrl+Shift+PageDown.
Keep in mind, some terminals don’t allow scrolling at all, or only keep a very limited history of previous inputs. These options may be modifiable from within the terminal’s configuration file, but this will depend entirely on the terminal being used.
Some terminals also offer a designated “scroll mode,” allowing users to easily navigate using the arrow keys when active. To see if this is something your terminal offers, try hitting the Scroll Lock key on your keyboard. If your keyboard does not have a designated Scroll Lock key, try using the command Ctrl+A. This activates scrollback mode on GNU Screen, allowing users to move through the terminal easily using the keyboard. Whether or not this option is available to you is entirely dependent on the specific terminal you are running.
*Note: To exit scroll mode, simply hit the Esc key at any time.
And there you have it! Depending on your terminal, one of these methods may work better than the others, but for most instances, you can scroll up in the Linux terminal using either Shift+PageUp or Ctrl+Shift+PageUp.
For more information on Linux, check out the links below or search our Knowledge Base for more useful tips and tricks for Linux novices and veterans alike.
Looking for more information on Linux ? Search our Knowledge Base !
Interested in more articles about Operating Systems ? Navigate to our Categories page using the bar on the left or check out these popular articles:
Popular tags within this category include: Linux , Windows , Apache , CentOS , Debian , Fedora , RedHat , and more.
Don’t see what you’re looking for? Use the search bar at the top to search our entire Knowledge Base.
The Hivelocity Difference
Seeking a better Dedicated Server solution? In the market for Private Cloud or Colocation services? Check out Hivelocity’s extensive list of products for great deals and offers.
With best-in-class customer service, affordable pricing, a wide-range of fully-customizable options, and a network like no other, Hivelocity is the hosting solution you’ve been waiting for.
Unsure which of our services is best for your particular needs? Call or live chat with one of our sales agents today and see the difference Hivelocity can make for you.