Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Now I can change it by Fn+ arrow right but now I need to do it via my shell script

share|improve this question

7 Answers 7

up vote 17 down vote accepted

adding to what Michał Šrajer says in some cases the brightness may be controlled from /sys/class/backlight/acpi_video0/brightness as is the case with my dell vostro 3400 and my the brightness range is 0-15. You may have to look for other folder in /sys/class if the same path as mine doesnot exit.

share|improve this answer
it works (0-9 for me) –  RiaD Aug 7 '11 at 17:31
See my comment on Michał Šrajer's post below for a way to alias this for easy use. –  hangtwenty Nov 2 '12 at 12:24


sudo su -c 'echo 30 > /proc/acpi/video/VID/LCD0/brightness'

The path may be different in your system. To list all available call:

find /proc/acpi/video -name 'brightness'

To see possible values for each, just cat the file:

cat /proc/acpi/video/VID/LCD0/brightnes
share|improve this answer
have not /proc/acpi/video/ at all. find /proc/acpi -name 'brightness' prints nothing –  RiaD Aug 7 '11 at 17:03
I think the command is sudo sh -c rather than sudo su -c –  sagarchalise Aug 7 '11 at 17:07
@sagarchalise: it is more or less the same, su launch a sh –  enzotib Aug 7 '11 at 20:50
sudo su -c 'echo 4 > /sys/class/backlight/acpi_video0/brightness' worked for me. Using a Samsung laptop and oddly enough the range is 0-7. –  hangtwenty Nov 2 '12 at 12:09
I tried to write a function to call this very easily - wound up with function bri { sudo su -c 'echo $1 > /sys/class/backlight/acpi_video0/brightness';} - but it didn't work for me. So as a substitute, I created aliases bri0 through bri7 which worked -- see here. –  hangtwenty Nov 2 '12 at 12:22

If you are using laptop.

You can use this command: sudo setpci -s 00:02.0 F4.B=xx

Which xx is the brightness in hex ranging from 0 (brightest) to FF (no brightness at all). I Use E0 when working on battery.

share|improve this answer
Do not work, here –  enzotib Aug 7 '11 at 20:47
@enzotib : It works fine with me using 11.04. And I think it is only for a laptop. –  Binarylife Aug 7 '11 at 20:55
Not working in DELL inspiron –  totti Mar 27 '13 at 6:47
Works on my Acer Aspire One –  Host-website-on-iPage Jul 7 '13 at 13:11

In your script you can send the equivalent keystrokes that correspond to Fn+Right Arrow and Fn+Left Arrow i.e. Brightness Up and Down respectively

Install xdotool from the Software Center

Then in your script to increase brightness:

xdotool key XF86MonBrightnessUp

To decrease Brightness

xdotool key XF86MonBrightnessDown
share|improve this answer
thank you cut I want ot set fixed value –  RiaD Aug 7 '11 at 17:42
+1, the only non requiring admin privileges –  enzotib Aug 7 '11 at 20:49

You could install xbacklight package $sudo apt-get install xbacklight and then if you want to increase the brightness level, type $xbacklight -inc <level in a range of 10 - 100> and vice versa: $xbacklight -dec <level in a range of 10 - 100>.

Read xbacklight --help to see more options.

share|improve this answer

Here is a little utility to set brightness from terminal: linux-brightness-binary

Then you can set brightness like this: sudo bright 5 or sudo bright 0

0-15 works for me on Asus UX50V Laptop running Debian 7

share|improve this answer

On Ubuntu trusty 14.04, this command works fine

sudo su -c 'echo 12 > /sys/class/backlight/acpi_video0/brightness'

You can change the value 12 to any value from 0 to 20

Thanks @Michał Šrajer and @sagarchalise

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.