You can also use Apple Script - if you can ssh into your mac, you can then, in the ssh session, type the following:
osascript -e 'tell application "System Events"
key code 113
Please note, that you actually need to press Enter at the end of each line. Also, be careful with the quote characters - there's a single quote after the
-e option, and then a closing single quote at the end of line 3 above (following the
end tell). Each execution of the script will increase the brightness by one notch. If you want it dimmer, change
If this is something you see yourself use more often, then it might be worth it to either define an alias or write a small shell script, eg:
MacBook:~😈 alias brightup="osascript -e 'tell application \"System Events\"
> key code 113
> end tell'"
MacBook:~😈 alias brightdn="osascript -e 'tell application \"System Events\"
> key code 107
> end tell'"
Again, be careful with the quotes. When you put the above aliases into your
.bashrc, all you'll need to type is
If you can't ssh into your box, you can blindly type the first
osascript command. I would do it in the following way:
- press CommandSpace
terminal and press Enter
- blindly and slowly (and carefully) type the first
osascript... command from the example above, exactly as it is there. This should bump the brightness up a bit, enough so that you should see what you're doing. If not, try a couple of times to press Up ArrowEnter