Contact Info

Atlas Cloud LLC 600 Cleveland Street Suite 348 Clearwater, FL 33755 USA

[email protected]

Client Area
Recommended Services
Supported Scripts
WordPress
Hubspot
Joomla
Drupal
Wix
Shopify
Magento
Typeo3

Have you ever been scrolling through your terminal history, only to discover that the crucial details you need have disappeared from view? Often, this is due to the default scrollback buffer size of various terminal emulators being too small. By expanding this buffer size, you can easily access earlier commands and their results at a glance.

In this guide, we’ll explore ways to modify the scrollback buffer size across different terminal emulators.

Typically, most terminal emulators offer an in-built feature to alter the scrollback buffer size via their settings interface. This provides a direct and simple approach to adjust the scrollback buffer size on Linux.

For instance, in the GNOME terminal, you can enlarge the buffer size by navigating to the Preferences menu. This menu can be accessed by clicking on the hamburger menu icon and selecting Preferences.

Next, head over to your profile settings and navigate to the Scrolling tab. From there, you can modify the number of lines that the terminal will keep in its scrollback buffer. Adjust this number according to your needs.

You can also adjust other scrolling-related settings, such as the Scroll on output and Scroll on keystroke options, to fine-tune your scrolling experience.

Click Close to save the changes. That’s it! You have successfully increased the buffer size of the GNOME terminal.

Furthermore, you can also change the buffer size for other popular terminal emulators in a similar manner. For example, to adjust Konsole’s scrollback buffer size, simply right-click anywhere on the terminal and select the Adjust Scrollback option.

Here, you can adjust the scrollback lines setting to your desired value. Konsole also offers an Unlimited scrollback option, which can be useful if you want to keep a record of all your terminal output.

Note: Remember that increasing the scrollback limit uses more RAM. If you have a desktop with enough power, it will not impact your computer’s performance, but not all computers have a lot of memory. Also, make sure you have enough space if you choose the unlimited scrollback option.

Some terminals have different approaches to increasing the scrollback buffer size. For example, if you are using Alacritty, you’ll need to edit its YAML configuration file to increase the buffer size.

Another way for you to view and review larger outputs without increasing the scrollback buffer size is to pipe your command output into the less command.

With the less command, you can scroll through long command outputs at your own pace without worrying about losing any data. It allows you to view the output one page at a time, making it simpler to navigate and search all the content.

For example, if you run a command that generates a large amount of output, such as ls -lR, you can pipe the output into less like this:

This command allows you to view the output one screen at a time. In addition, you can use the arrow keys to navigate up and down. It’s like having a scrollback buffer but with even more control.

You can even search through the output with / followed by your search term, making it easier to find the exact information you need.

Furthermore, if you want to dump the entire output into your terminal instead of viewing it page by page, you can also use the cat command. For example, replace the less command with the cat in the previously mentioned command:

There is an option to find a specific string using the less command. However, if you don’t want to pipe your output to less, you can pipe it to grep along with your target text to locate it in the command output.

The grep command allows you to find specific information within a larger output. Additionally, you can search for patterns within text and filter and extract relevant information from command output.

For example, if you want to filter the output and show only lines that contain the word file, run:

Furthermore, grep offers various options that enhance how you search, including case insensitivity (-i), showing line numbers (-n), or handling multiple patterns simultaneously (-e).

You can also enhance grep searches by incorporating regular expressions for more advanced search capabilities. For example, to look for lines that begin with a digit, you would use the following command:

This command filters and shows any line starting with a number in the file output.txt.

By tuning various settings directly within your terminal emulator or by leveraging robust commands such as less and grep, you ensure that you capture every piece of data. Additionally, you can modify your terminal’s appearance and settings or switch your default terminal with different options available.

Image credit: Unsplash. All alterations and screenshots by Haroon Javed.

Our latest tutorials delivered straight to your inbox

Haroon is a lifelong tech enthusiast with over five years of experience writing thousands of articles about Linux, programming languages, and more. He loves exploring new technologies and experimenting with them to find innovative ways to use them. Haroon’s work has been featured on various online platforms, including HTG, Baeldung, and LinuxHint.

How to Use Sed in Linux

How to Open Any Folder from the Mac Terminal

How to Launch Terminal in the Current Folder Location on Mac

12 of the Best Terminal Emulators for Windows

How to Fix Ubuntu Can’t Open the Terminal Issue

Affiliate Disclosure: Make Tech Easier may earn commission on products purchased through our links, which supports the work we do for our readers.


Welcome to DediRock, your trusted partner in high-performance hosting solutions. At DediRock, we specialize in providing dedicated servers, VPS hosting, and cloud services tailored to meet the unique needs of businesses and individuals alike. Our mission is to deliver reliable, scalable, and secure hosting solutions that empower our clients to achieve their digital goals. With a commitment to exceptional customer support, cutting-edge technology, and robust infrastructure, DediRock stands out as a leader in the hosting industry. Join us and experience the difference that dedicated service and unwavering reliability can make for your online presence. Launch our website.

Share this Post
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x