In this article I will show you how set the display brightness by the command line interface (terminal or konsole).
Your current brightness value is stored in the /sys/class/backlight/acpi_video0/brightness file.
So, you can echo a value, between 0 and 10 to the /sys/class/backlight/acpi_video0/brightness file.
# echo 3 > /sys/class/backlight/acpi_video0/brightness
# echo 5 > /sys/class/backlight/acpi_video0/brightness
# echo 7 > /sys/class/backlight/acpi_video0/brightness
To set the maximul brightness value, use this trick:
# cat /sys/class/backlight/acpi_video0/max_brightness > /sys/class/backlight/acpi_video0/brightness
To set the minimum brightness, use the 0 (zero) value:
# echo 0 > /sys/class/backlight/acpi_video0/brightness
I have created this two aliases that manipulate my display brightness:
For setting the minimum brightness:
$ alias minbr='echo 0 > /sys/class/backlight/acpi_video0/brightness'
For setting the maximum brightness:
$ alias maxbr='cat /sys/class/backlight/acpi_video0/max_brightness > /sys/class/backlight/acpi_video0/brightness'
If you like my aliases and want to make them persistent, add the two code lines to you ~/.bashrc file.
I just type in the terminal minbr or maxbr, depending on my needs.
i appriciate this thanks for all who put their works in this tips
Hi! First of all thanks for the post.
I have a question, in the line
alias minbr=’echo 0 > /sys/class/backlight/acpi_video0/brightness’
what does exactly ‘‘minbr’’ means? Is it for allowing me to change the file with ordinary permissions?
Thanks
no,it is just a short name for the command. instead of doing echo 0 > /sys/class/backlight/acpi_video0/brightness every time, you just open a terminal and type minbr. it does not change any file permissions.