The brightness of the control screen using the terminal on CentOS 8

Controlling the screen brightness in CentOS via GUI mode is very simple. However, if you work in a command line system and want to control the brightness of the monitor through the terminal, you need to know some command line tools that are used to control the brightness of your monitor in this situation. After doing some research, I came across a command line tool called “xrandr”, which allows you to easily adjust the brightness of the screen. The xrandr utility allows you to adjust the size and orientation of the specified screen.

In this article, I will show you how you can adjust the screen brightness using the pre-installed xrandr utility on CentOS 8.

To adjust the screen brightness, do the following:

Step 1: Open the terminal window using the keyboard shortcuts Ctrl + Alt + t or you can open it using the search bar of the application launcher as follows:

Step 2: Current Status of the Display System

To check the current state of the display system, screen resolution and size, enter the following command in the terminal:

$ xrandr -q

It looks like this in a terminal:

Screen brightness control on the case

As you can see in the image above, the current connected screen is “XWAYLAND0”. The current resolution and screen size are also displayed in the terminal window after executing the above command.

Print only active display name

The brightness of the control screen using the terminal on CentOS 8

If you want to view only the current display name, you will use “xrandr” with the “grep” and “head” commands as follows:

Step 3: Set the screen brightness

You can set the monitor brightness using the following syntax:

$ xrandr –output [monitor-name] -brightness [brightness-level]

The brightness value is limited from 0 to 1, where 0 indicates the full black color and 1 indicates the brightest value.

For example, we want to set the screen brightness, then you write the name of the display screen “XWAYLAND0” and set the value to 0.75. Use the following command to set the brightness of the display screen.

$ xrandr --output XWAYLAND0 --brightness 0.75

The brightness of the control screen using the terminal on CentOS 8

Conclusion

In this article, you learned how to control screen brightness with the simple xrandr tool installed on your CentOS 8. You can also use the brightness control applications on your system to adjust the screen brightness. I hope you find this article useful in the future.

The brightness of the control screen using the terminal on CentOS 8

Sidebar