Windows 10 Bash (Ubuntu) - How to scroll up?
BashWindows 10Windows Subsystem-for-LinuxBash Problem Overview
I have bash installed on my W10 laptop, but one thing that is very frustrating is I can not scroll up.
Does anyone know of a way to enable scrolling with the mouse wheel? I could not find anything after many google searches.
Context: If I compile some C++ files and get a lot of errors, I can not scroll up to see all those errors.
Bash Solutions
Solution 1 - Bash
You must set Properties
→ Layout
→ Screen Buffer Size
→ Height
to the number of lines you want.
The default was 50 lines. I set it to 1000 and that's enough for me.
Solution 2 - Bash
Right click the window frame, select "properties" from the contextual menu. In Properties, first tab, in the edit option area, tick the "QuickEditMode". That will allow you to mouse scroll.
Screenshot of properties:
Solution 3 - Bash
Make sure you're hitting properties, and not defaults. Both menus will appear the same, but only properties will give you the result you're looking for!
Solution 4 - Bash
- Switch to a different Windows application to bring the WSL terminal out of focus (e.g. by pressing AltTab or clicking an empty part of the Windows taskbar)
- Hover over the (now out-of-focus) terminal running WSL and scroll using the mouse wheel
And make sure that in the Windows Settings, you have Mouse > "Scroll inactive windows when I hover over them" turned on.
I know this is a bit unsatisfying but it's the only thing that actually works well for me.
- My screen buffer size was sufficiently large and the scroll bar works fine otherwise. However, the mouse wheel still doesn't start working by increasing the buffer size alone.
- I'm not interested in QuickEdit mode because it stalls running programs indefinitely if I so much as accidentally click
- editing my tmux configuration did nothing.
Solution 5 - Bash
I found that this doesn't work when running the current Ubuntu 20.04 LTS image (or 16.04 LTS either, IME). This is because tmux is enabled.
Try enabling tmux's mouse mode:
echo 'set -g mouse on' >> "~/.tmux.conf"
And restart your terminal window (close/open).
See related post: https://superuser.com/questions/209437/how-do-i-scroll-in-tmux