Just as in Windows you have the option to rotate your screen into any direction in Linux, too. While in Windows you only need to press some keys, a key combination is not configured in Linux by default. But as you may have figured out, there are some terminal commands that let you do the exact same thing (you can configure shortcuts for these manually later on).

First, you need to find out how the screen that you want to rotate is labeled - to do that, use the following command:

xrandr -q

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
1366x768 60.1*+
1360x768 59.8 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA2 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)

You will get a list of connected monitors - I have only one here which is labeled LVDS1, it says connected next to the name. Determine the one that you want to rotate here. Next, we want to turn it around. For that, we use one of the following commands:

xrandr --output LVDS1 --rotate right
xrandr --output LVDS1 --rotate left
xrandr --output LVDS1 --rotate inverted
xrandr --output LVDS1 --rotate normal

Replace LVDS1 with your monitor label in the above commands and you'll be able to rotate the screen to your likings! This is especially helpful if you need to go through documents and can turn your physical monitor around.

Facebooktwittergoogle_plusredditlinkedinmail
Tagged on:                         

12 thoughts on “Rotating screen in Ubuntu and Linux Mint

  • March 8, 2013 at 5:31 pm
    Permalink

    thank you. but i have one correction.
    instead of –output & –rotate use –output & –rotate (two hyphens).

    Reply
  • June 25, 2013 at 3:59 am
    Permalink

    I’ve tried this, but it dosen’t work for me.

    Reply
  • January 25, 2014 at 6:36 pm
    Permalink

    I found “xrandr -o normal” to be the better choice for me

    Reply
  • January 22, 2015 at 8:52 pm
    Permalink

    Simple and easy!

    Thank you 🙂

    Reply
  • April 18, 2015 at 10:04 pm
    Permalink

    I did
    xrandr -o left
    and it did fine.

    But next time that I start my computer, it is again in landscape mode. So now I must rotate the monitor every time to start the terminal mode, enter this instruction and rotate the screen back into vertical position.
    How can I set the preferred rotation permanenty?

    Thanks, Erik

    Reply
  • September 2, 2015 at 4:00 am
    Permalink

    Put it in the startup menu, same command, listed as a program.

    Reply
  • September 5, 2015 at 6:27 pm
    Permalink

    All diconected in the hp pavilio x360 (argh!). Ubuntu 15:

    DP1 disconnected (normal left inverted right x axis y axis)
    HDMI1 disconnected (normal left inverted right x axis y axis)
    HDMI2 disconnected (normal left inverted right x axis y axis)
    VGA1 disconnected (normal left inverted right x axis y axis)
    VIRTUAL1 disconnected (normal left inverted right x axis y axis)

    Reply
  • October 7, 2015 at 7:19 pm
    Permalink

    Thanks! Exactly what I needed.

    Reply
  • January 1, 2016 at 4:28 pm
    Permalink

    it works, rotated the screen to the left. but now my mouse movements are strange. up is left, down is right, etc. it is a mesh! how can you keep a well working mouse?

    Reply
    • January 27, 2016 at 4:29 pm
      Permalink

      Use xinput:
      #apt-get install xinput

      then find your mouse or touch device name
      #xinput –list

      then use this command where you replace Mouse or Touch Device Name with the name given by the previous command

      #xinput –set-prop ‘Mouse or Touch Device Name’ ‘Evdev Axes Swap’ 1
      #xinput –set-prop ‘Mouse or Touch Device Name’ ‘Evdev Axis Inversion’ 0 1

      Reply
  • October 4, 2016 at 6:06 pm
    Permalink

    Perfect, thanks! 🙂

    Reply
  • November 24, 2016 at 7:42 pm
    Permalink

    Hello my firefox rotate but does not fit. anyone know that issue? Thanks

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *