TL;DR
To scroll in Tmux, you can try these methods:
- Activate Tmux commands with
Ctrl+b
, enter copy mode with[
, scroll using arrow keys, and exit withq
. - Enable mouse scrolling in Tmux by adding
set-option -g mouse on
to~/.tmux.conf
, saving the file, and using the mouse wheel or scrollbar to navigate through panes and windows. - Use
Ctrl+b
followed by Page Up or Page Down to scroll through the output of an entire Tmux window.
Explore the article below to learn to scroll in Tmux, essential key bindings to use, and common errors that can occur.
Managing multiple Terminal sessions can be a challenge, but Tmux turns this complexity into a streamlined experience. If you’re struggling to keep track of extensive outputs across various sessions, this post is your solution. Here, I will explore different methods to scroll in Tmux, so you can effortlessly navigate and control your terminal’s history. Expect practical tips on using key bindings and mouse scrolling alongside solutions to common errors to enhance your Tmux efficiency.
How to Scroll in Tmux?
To scroll in Tmux, first ensure that mouse support is enabled by adding set -g mouse on
to your .tmux.conf
file, then restart Tmux. For keyboard scrolling, enter copy mode by pressing Ctrl-b [
and use the arrow keys to navigate up and down. To exit copy mode, simply press q
. This setup allows you to move through your terminal output efficiently, whether you prefer using the mouse or the keyboard.
That was the quick answer. Here is the detailed step-by-step guide to scroll in Tmux:
1. Key Bindings (Copy Mode)
Tmux allows you to enter copy mode, where you can scroll through the terminal output using key bindings. This method provides fine-grained control and precision while scrolling, allowing you to review past output or navigate through logs. Follow these steps:
- Press
Ctrl+b
(default prefix) to activate Tmux commands.

- Press
[
to enter copy mode and use the arrow keys to scroll up and down in Tmux.

- Press
q
to exit copy mode.

2. Tmux Scroll with Mouse
If your terminal emulator and Tmux configuration support it, you can use your mouse to scroll up and down in Tmux panes and windows. Mouse scrolling offers a more intuitive and effortless way to navigate through large amounts of Terminal output, particularly useful when working with graphical applications or lengthy logs. Here are the steps to do it:
- Ensure that your Terminal emulator supports mouse input within Tmux by opening the configuration file of Tmux using the following command:
vi ~/.tmux.conf
- The command will open the configuration file.

- Enter the following command to enable the mouse in Tmux:
set-option -g mouse on
- Save this file and exit.

- Hover the cursor over the Tmux pane or window where you want to scroll. Use the mouse wheel or drag the scrollbar to scroll up and down in Tmux.

3. Key Bindings (Window Scrolling)
Tmux provides specific key bindings for scrolling within windows, which are separate instances of Terminal sessions. This method allows you to scroll through the output of an entire Tmux window, which may consist of multiple panes, providing a broader overview of the session’s history. Here are the steps to do it:
- To activate the Tmux command mode, press
Ctrl+b
. - Press Page Up or Page Down to scroll through the window’s output.

Key Bindings for Effective Scrolling in Tmux
Explore the Tmux Scrolling Key Bindings Table to navigate through Terminal outputs efficiently. This table offers essential shortcuts for seamless scrolling, making your Tmux sessions more manageable and productive.
Action | Key Binding | Description |
---|---|---|
Enter Copy Mode | Ctrl-b [ | Enters copy mode to allow keyboard navigation and selection. |
Scroll Up One Page | Ctrl-b PageUp | Scrolls up one full page in the current tmux pane. |
Scroll Down One Page | Ctrl-b PageDown | Scrolls down one full page in the current tmux pane. |
Scroll Up One Line | Up Arrow (in copy mode) | Scrolls up one line at a time while in copy mode. |
Scroll Down One Line | Down Arrow (in copy mode) | Scrolls down one line at a time while in copy mode. |
Exit Copy Mode | q (in copy mode) | Exits copy mode and returns to normal operation. |
4 Common Errors with Possible Solutions
While using Tmux, you may encounter some common errors. Reading and understanding the error message is helpful in finding the best solution. Here are four frequent errors and their possible solutions:
- 🔄 Unresponsive Scroll Commands: Sometimes key bindings for scrolling don’t respond. This could be because they conflict with your terminal emulator’s shortcuts. Check your
.tmux.conf
for key bindings likeset-window-option -g mode-keys vi
for Vi-like keys, or adjust them to avoid conflicts. - ⚙️ Slow Scroll Performance: Slow scrolling in Tmux can occur when your system is under heavy load, or Tmux is processing a lot of data. To improve performance, consider increasing the history limit in smaller increments or reducing it if it’s excessively high with
set-option -g history-limit 1000
. - ⏫ Incomplete Scrolling in Buffer: If you find that not all expected output is available when you scroll back, your history limit may be set too low. Adjust this by adding or modifying
set-option -g history-limit 5000
in your.tmux.conf
, which increases the number of lines Tmux stores. - 🛑 Erratic Scrolling Behavior: Erratic behavior when scrolling, such as jumping or skipping lines, can often be resolved by updating Tmux to the latest version or resetting your configuration to default settings to eliminate any custom commands that may be causing issues.
Tmux Scroll Up and Down: A Key to Terminal Efficiency
In this article, I have discussed several methods to scroll up and down in Tmux, including keyboard shortcuts, the scroll wheel on your mouse, and adjusting the scroll speed. Furthermore, I have also discussed some common errors with possible solutions.
If you’re interested in exploring Tmux further, I encourage you to read articles on Tmux configurations and productivity hacks, Tmux plugins and integration with other tools, and how Tmux integrates with other command-line tools. By reading these articles, you can unlock Tmux’s full potential and become a master of this powerful terminal multiplexer.
Frequently Asked Questions
Are there any plugins specifically designed to improve scrolling in Tmux?
tmux-yank
and tmux-resurrect
that enhance scrolling and session management in Tmux. These plugins aid in copying text more efficiently and saving session states, which indirectly improve how users interact with the scrollback buffer, making navigation and recovery more intuitive.What are the differences between vertical and horizontal scrolling in Tmux?
Is it possible to scroll through the Tmux scrollback buffer indefinitely?
(~/.tmux.conf)
, you can add the line set-option -g history-limit <number_of_lines>
to adjust the buffer size. Replace <number_of_lines>
with the desired value or set it to unlimited to scroll through the buffer indefinitely. Keep in mind that setting an excessively large buffer size may consume more memory, so consider your system resources when modifying this setting.How do I adjust the scroll speed in Tmux?
.tmux.conf
file to modify mouse scroll sensitivity. For example, add set -g mouse-speed 3 5
to change vertical and horizontal scroll speeds, respectively. Higher numbers result in faster scrolling, enhancing navigation through long outputs.Is it possible to sync scrolling across multiple panes in Tmux?
setw -g synchronize-panes on
in your Tmux session. This command aligns the scroll position of all panes within the same window.