[linux] How do you scroll up/down on the console of a Linux VM

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.

This question is related to linux terminal rhel

The answer is


Shift Pageup/End works for me.


For some commands, such as mtr + (plus) and - (minus) work to scroll up and down.


Shift+Fn+ UP or DOWN on a Macbook will allow you to scroll.


Fn + Up/Down can scroll Terminal in Mac OS X 10.11


Alternative: you can use the less command.

Type in console:

"your_command" | less   

This will allow you to scroll with the up and down arrow keys.

Basically your output has been piped with the less command.


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.


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
<CTRL-A> [

# Now use the arrows to scroll

# To exit copy mode, do
<ESC>

See man screen for much more useful options (multiple windows, ...)...


PERSISTENT, definitive solution

Add this line to your ~/.screenrc

termcapinfo xterm* ti@:te@

Now you can create a screen, and scroll it up/down with your mouse; Like you normally do.


I ran into the same problem with VMWare workstation with Ubuntu guest, turns out VmWare doesn't support scrolling back up from the server view. What I did was to install x GUI, then run xterm from there. For some reason it runs the same, but lets you scroll the normal ways. Hope this helps future readers in VmWare virtual boxes.


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.


Press the Shift key when scrolling the mouse up/down works for me when loggin in Ubuntu using Terminal ssh in Yosemite.


VM Ubuntu on a Mac...fn + shift + up/down arrows


In some VPS hostings (like linode) you have to click Ctrl+A and then ESC. Exit with double ESC too.


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).

You could use tmux scrolling:

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)


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.


Examples related to linux

grep's at sign caught as whitespace How to prevent Google Colab from disconnecting? "E: Unable to locate package python-pip" on Ubuntu 18.04 How to upgrade Python version to 3.7? Install Qt on Ubuntu Get first line of a shell command's output Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running? Run bash command on jenkins pipeline How to uninstall an older PHP version from centOS7 How to update-alternatives to Python 3 without breaking apt?

Examples related to terminal

Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Can't compile C program on a Mac after upgrade to Mojave Flutter command not found VSCode Change Default Terminal How to switch Python versions in Terminal? How to open the terminal in Atom? Color theme for VS Code integrated terminal How to edit a text file in my terminal How to open google chrome from terminal? Switch between python 2.7 and python 3.5 on Mac OS X

Examples related to rhel

Docker CE on RHEL - Requires: container-selinux >= 2.9 How to redirect output of systemd service to a file Completely remove MariaDB or MySQL from CentOS 7 or RHEL 7 RHEL 6 - how to install 'GLIBC_2.14' or 'GLIBC_2.15'? How to run a command as a specific user in an init script? Error when using scp command "bash: scp: command not found" How do you scroll up/down on the console of a Linux VM How to find which version of Oracle is installed on a Linux server (In terminal) Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist Installing Python 3 on RHEL