FAQ: How to scrollback in GNU SCREEN?

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

Q: I was compiling kernel using GNU Screen utility but something happened during the compilation and I want to see full error’s output but I can’t just scrollback using Ctrl+PageUp. How to scrollback in GNU Screen?

A: In GNU Screen press Ctrl + a + [ to enter Copy Mode, then scroll up/down using keys j or k. Below are some other navigation keys:

h -    Move the cursor left by one character
j -    Move the cursor down by one line
k -    Move the cursor up by one line
l -    Move the cursor right by one character
0 -    Move to the beginning of the current line
$ -    Move to the end of the current line.
G -    Moves to the specified line
       (defaults to the end of the buffer).
C-u -  Scrolls a half page up.
C-b -  Scrolls a full page up.
C-d -  Scrolls a half page down.
C-f -  Scrolls the full page down.

By the way, in order to define scrollback buffer size start screen with the following key (5000 lines in this example):

screen -h 5000

Quick info about GNU Screen utility: it is Unix tool that allows to run multiple applications in several “virtual” windows. It is very useful when you need, let’s say, to see hardware resources consumption caused by started application in different console etc. GNU screen is also good option to run applications remotely via ssh: just run application in screen and log off until it’s finished, then just “pick up” screen session and see how the application’s output.

Update: You can use activate copy mode of GNU Screen also by Ctrl + Esc that might be more useful than Ctrl + a + [ shortcut (thanks to Yu-Jie Lin for this tip).

 
 
» You might also be interested in the following articles:
Keep ssh session saved (Unix “screen” utility)
Secure shell (ssh) session timeout
Get FreeBSD ports tree after OS installation
Two desktop apps you must know about
Moving Linux to remote server (over ssh via third server)



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!

4 Responses to “FAQ: How to scrollback in GNU SCREEN?”


  1. 1 Yu-Jie Lin

    Copy mode also can be activated with Ctrl+a, then Escape. I usually stay my left hand on escape after activated, and use right hand to press Page Up/Down. After I read I want to read, I then use the hand on the Escape key to press the key to leave copy mode.

  2. 2 artiomix

    Thanks! See updated post.

  3. 3 Hugo Heden

    You updated your post the wrong way though :-) Yu-Jie Lin wrote “Ctrl+a, then Escape” but you forgot the “a” and wrote only “Ctrl + Esc”

  1. 1 newslife site » lottalinuxlinks.com linux user podcast 104

Leave a Reply




Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | Linux config Wiki | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››