Categories: ShellUbuntu

How to Change Screen Resolution through the Ubuntu Terminal

The resolution of your display monitor/screen means the clarity of the content (text and images) that you can view on your screen. When your screen is set to a higher resolution, say 1366x768, the contents appearing on your screen will be sharper to look at. You might also notice that in high resolution the items on your screen look smaller; this happens so that more items can fit on the display. On the other hand, low resolution means a less clearer display where items appear larger and thus fewer. If you have a larger monitor, it supports a higher display resolution. Your video card also plays a big role in the capability of your system to support a large screen resolution.

This article will help you in configuring the resolution of your screen on a Ubuntu system. We are specifically using the command line in order to change the resolution. There is always a way to do almost all of our stuff right inside the Terminal. So, why should changing screen resolution be any different! Using the Terminal makes certain tasks more efficient, and even faster. The command-line tools do not use too many resources and thus form great alternatives to the widely used graphical applications, especially if you are stuck up with older hardware.

We have run the commands and procedures mentioned in this article on a Ubuntu 18.04 LTS system.

Changing Screen Resolution through the Command Line

Please follow these steps in order to adjust the screen resolution on a Ubuntu system:

Open the Terminal application either by using the Ctrl+Alt+T shortcut or by accessing it through the application launcher search as follows:

The Xrandr tool (an app component in Xorg) is a command-line interface to RandR extension and can be used to set outputs for a screen dynamically, without any specific setting in xorg.conf. This utility is installed, by default, on a Ubuntu 18.04 system.

We will be using the following flag of xrandr tool to configure the screen size:

-s, --size size-index or --size widthxheight

This sets the screen size, either matching by size or using the index into the list of available sizes.

These are one of the two commands you can use:

$ xrandr--size [size-index]

For example:

$ xrandr--size 4:3

Or,

$ xrandr--size [widthxheight]

For example:

$ xrandr --size 1366x768

Through this simple tool, that comes already installed on Ubuntu, you can adjust the resolution of your screen right from your command line. Adjusting the screen resolution through the UI is also every. All you need to do is use the Devices>Displays tab view on the Settings utility to manually set the resolution according to your requirements.

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn

Recent Posts

How to Install Magento 2 on AlmaLinux

Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…

1 year ago

How to Install ISPConfig Hosting Control Panel with Apache Web Server on Ubuntu 24.04

ISPConfig is an open-source control panel that allows users to manage multiple servers from a…

1 year ago

How to Test your Email Server (SMTP) Using the Telnet Command

As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…

1 year ago

Managing Network Interfaces and Settings on Ubuntu 24.04 with nmcli

Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…

2 years ago

Using Restic Backup on Ubuntu 24.04

Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…

2 years ago

Installing phpMyAdmin on Rocky Linux 9 and Securing it with Let’s Encrypt SSL

phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…

2 years ago