The default font size in the Linux terminal can seem small. If you have eye problems like me, you need to focus hard to read the text. Worry not because there are some tricks that let you zoom the Linux terminal so that you can see and read everything without any hardship.
Even without eye problems, this zooming trick is useful for other cases. For example, if you’re presenting to a large audience in a room, people in the back will find it difficult to see what you’re doing on the terminal. Zooming it to an appropriate size solves that problem. So let’s see how you can achieve this.
We’re using Ubuntu’s default terminal. If you’re using a distro other than Ubuntu, your layout and specific options won’t be the same but they won’t be too different.
The easiest way to control the terminal’s zoom is by using the menu options you are given. You first press the hamburger menu button in the top right corner of the terminal.
You should see three options: a plus button, a minus button, and a 100% button. Pressing the plus button will zoom in on the terminal. The minus button will zoom out from the terminal. The 100% button will return it to the default zoom.
Using Keyboard Shortcuts
Using the menu options is easy. However, you need to go to the menu every time to zoom in or out. Because once you press a button, the menu collapses. So it can be a bit irritating if you need to zoom in multiple times. Keyboard shortcuts are the faster way to control the zoom. To change the zoom, you can use the following keyboard shortcuts:
- Ctrl++ (Ctrl+Shift+=) will zoom in on the terminal.
- Ctrl+- will zoom out from the terminal.
- Ctrl+0 sets the default size on the terminal.
If you don’t want to use the default shortcuts, you can change them as you please. To do so, open the hamburger menu and go to “Preferences.”
Then go to “Shortcuts.”
Under the “View” tab, you have the zoom options. Double-click any shortcut, and you’ll see the text “New Accelerator” switching places with the shortcut. Now, type your own shortcut and it will replace the old shortcut. For example, I’ve changed the shortcut for zooming in to Ctrl+=.
Likewise, you can define other shortcuts from here.
There are also many command-line tools for zooming the terminal. These tools often provide extra features than built-in options. You have xzoom and xdotool, among other tools. Let’s see how you can make good use of these.
xzoom
This tool isn’t just limited to magnifying the terminal. In fact, you can magnify or zoom any portion of the screen. First, install the xzoom tool on Debian, Ubuntu, and their derivatives with this command:
sudo apt install xzoom
Then launch the app from the terminal with this command:
xzoom
If you hover your mouse over the screen, the zoomed version will be displayed in xzoom’s window.
I didn’t have a good experience with xzoom. Firstly, it wasn’t even working on Wayland. It only worked on Xorg. I tried it on Ubuntu 24.04 and Debian 12. It felt quite buggy to me.
xdotool
xdotool is a command-line automation tool. It lets you simulate keyboard key presses and mouse clicks. So, you can simulate the keyboard shortcuts for zooming the terminal using this tool. First, install it by running:
sudo apt install xdotool
If you want to zoom in on the terminal, run this command:
xdotool key Ctrl+plus
To zoom out, run:
xdotool key Ctrl+minus
Lastly, to set the terminal to the default size, run:
xdotool key Ctrl+0
Similar to xzoom, you may have trouble running this on Wayland. There are alternatives you can try, such as
ydotool
on Wayland.
With that, you can simulate other terminal shortcuts as well.
Now you know how to zoom the Linux terminal and even other portions of the screen. There are many more terminal tricks you can learn to become more productive as a Linux user.