PuTTY: How to increase the scroll buffer size
You may have noticed that PuTTY does not allow you to scroll up very far
This can become annoying when running programs that have lots of output you might need to scroll through and review
Let’s look at an example
We have already logged in to one of our saved SSH sessions
One command that can sometimes produce a lot of output is ls — the command to list a directory’s contents
1) Type ls -l / to list the contents of the root directory. Remember — press Enter to execute a shell command
2) Now, type the command shown to list the contents of all directories contained by the home directory
3) Scroll up
Here is the command we just typed
Above that, the output of the previous command
4) Scroll up a bit more
As you can see, we’ve reached the top of the scrollbar, and still can’t see the first command we typed; it’s just barely out of range
5) Let’s increase the size of the scroll buffer. Close this session and re-open PuTTY to the configuration window
6) Select the session from the list, then click Load
8) Enter a higher value for Lines of scrollback. We’ll change ours from 200 to 20000
9) Return to the Session category
11) Finally, press Open
12) Now, log in normally, as seen earlier in this series
Once logged in, let’s test out the new scroll buffer size
13) Type the command from before, several times. End each line with a shell comment as shown, thus marking each one
Watch the size of the scrollbar
14) Now, scroll up
Here’s the first command. Clearly, our change worked!
This is the end of the tutorial. You now know how to increase the scroll buffer size in PuTTY
Ravi Motwani January 18, 2013 at 1:19 am
Can this be achieved using command?
John Oliver at Site5 January 22, 2013 at 5:36 pm
You can use the “| less” command to achieve a similar result. The less option sends the output of the command to a buffer and the buffer will send the output to your shell until your screen is full. You can then hit any key to continue until you reach the end of the saved buffer. This allows you to see everything without scrolling though the results.
For example, you can use the following command to limit the results of ls to one screen at a time:
ls | less
Once you are done, simply hit “q” on your keyboard.
Jason Brown November 21, 2013 at 4:02 pm
This is a great tutorial! I have been wondering how to increase my scroll size on a putty session. Thanks!
Fahd Hamad May 27, 2014 at 7:54 am
Thanks for the tips.. it points me directly to what i wanted.
Ramasamy July 30, 2014 at 1:47 pm
Hi want to log the output into a file.Is that possible please let me know.
Corey Mahon August 7, 2014 at 1:02 pm
Hi Ramasamy,
Not a problem at all, in order to log your output to a file, all you would need to do is add > filename to the end of your command.
For example, if you wanted to have the contents of a file output into a different file, you would just need to use:
cat file1.php > fileoutput.txt
I hope this helps!
Marcus March 19, 2015 at 2:07 pm
Thanks for the info much appreciated
Mark McQuaid March 20, 2015 at 10:36 am
Thanks for letting us know it was helpful Marcus!
Ganesh Satpute May 4, 2015 at 1:08 am
Is there any way to apply this to all sessions (new as well)?
James Davey May 4, 2015 at 5:40 am
Hello Ganesh,
Following these steps without selecting a session first should do this.
Ganesh Satpute May 5, 2015 at 6:36 am
Thanks James for your response.
I have tried that, somehow it is not working. And after restarting PuTTy it gets resets.
James Davey May 5, 2015 at 1:09 pm
Hi Ganesh,
Try clicking on the ‘default settings’ session. Select the settings you want, then ‘save session’.
Ganesh Satpute May 7, 2015 at 2:34 am
Thanks James, Your trick worked.
I don’t know why it’s not that straight forward.
Thanks again :)
anil mishra October 18, 2015 at 8:46 pm
Thanks for very useful tip.
Jung December 15, 2015 at 8:52 pm
Thanks for the tips :D
dsd April 13, 2016 at 3:14 am
Thans you very much for the tip, it helps me.