How to rotate screen in Ubuntu using terminal?

Recently I booted Ubuntu 18.04 Live USB and I faced annoying problem. Screen was rotated and there was no rotate options in settings. I had to search not so obvious places in Internet, so I share this Q&A.

2 Answers

You should use xrandr command.xrandr -o normal takes your screen back to normal (landscape) rotation.

You can check this command typing xrandr -o left and then get back to normal.

8

You can use these commands:

xrandr --output $(xrandr |grep eDP|cut -d" " -f1) --rotate left
xrandr --output $(xrandr |grep eDP|cut -d" " -f1) --rotate normal

also right and inverted

I created a script here:

with that script, you can simply call

rotatescreen.sh -r
rotatescreen.sh -l
rotatescreen.sh -i
rotatescreen.sh -n

Alternative, you can use CTRL+F8 to rotate using

gsettings set org.gnome.mutter.keybindings rotate-monitor "['XF86RotateWindows', '<Control>F8']"

see

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like