Linux (Ubuntu) Terminal - how to view previous pages that are no longer displayed

When scrolling up, say, to see the log, the first part of it will not be visible, since the terminal supports only a limited number. lines. So, if you want to scroll up and be able to see everything, at least a few pages, how do you do it?

+48
linux terminal
Jul 08 '10 at 4:13
source share
10 answers

Use Shift + Page Up and Shift + Page Down .

+74
Jul 08 '10 at 4:16
source share

Pager output, as shown below, is the best choice:

command | less command | more 
+19
Jul 08 '10 at 6:01
source share

You can enable unlimited scrolling back (or a huge amount if you want).

To do this, go to

File โ†’ Profile Settings โ†’ Scrolling [tab]

Then select the Unlimited check box or specify the desired number of lines. And, of course, this only applies to the following printed lines.

+10
May 03 '13 at 20:30
source share

Some tricks I use are

some terminal applications (gnome-terminal) allow you to increase the size of the scroll buffer

output to file:

 command > file.log 

translate your command to a smaller one:

 command | less 

tail tail and pipes for grep to reduce output

 tail -f example.log | grep 'search text' 
+5
Jul 08 '10 at 4:19
source share

Try using the screen command and set your scroll buffer to a larger size.

screen has many other advantages and great features.

If everything you do is looking through the log, you can use the pager one by one, for example less

+3
Jul 08 '10 at 4:14
source share

An alternative to the screen is to use tee to copy all the output to a file when it is printed on the terminal:

 yourcommand | tee output.txt 
+3
Jul 08 '10 at 4:16
source share

If you want to scroll line by line, you can use

Ctrl + Shift + up / down arrows.

+3
Apr 11 '14 at
source share

If you use gnome-term (default), you can change your settings. Or set no. from strings to unlimited or to a much larger buffer than the default.

+2
Jul 08 2018-10-10T00:
source share

Essentially a shutdown to @zerick's solution, but if you are on gnome-terminal you can change its configuration. See this .

+1
Aug 13 '13 at 18:08
source share

If you are in tmux (you can create several terminal sessions in a session with one terminal, it is highly recommended), you can easily use the usual navigation keys to scroll after doing Ctrl - b , then [ , for more details, consider: How to scroll in tmux?

0
Oct 23 '17 at 15:22
source share



All Articles