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.

, Rotating screen in Ubuntu and Linux Mint

Rotating screen in Ubuntu and Linux Mint
Tagged on:                         

21 thoughts on “Rotating screen in Ubuntu and Linux Mint

  • March 8, 2013 at 5:31 pm

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

  • June 25, 2013 at 3:59 am

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

  • January 25, 2014 at 6:36 pm

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

  • January 22, 2015 at 8:52 pm

    Simple and easy!

    Thank you 🙂

  • April 18, 2015 at 10:04 pm

    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

    • July 20, 2018 at 5:45 pm

      Just write it into your ~/.bashrc file so it does it at start up

  • September 2, 2015 at 4:00 am

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

  • September 5, 2015 at 6:27 pm

    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)

  • October 7, 2015 at 7:19 pm

    Thanks! Exactly what I needed.

  • January 1, 2016 at 4:28 pm

    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?

    • January 27, 2016 at 4:29 pm

      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

  • October 4, 2016 at 6:06 pm

    Perfect, thanks! 🙂

  • November 24, 2016 at 7:42 pm

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

  • December 16, 2016 at 5:11 pm

    Why not just click on [System Settings], then [Displays], then [Rotation] and pick from the pull down menu the orientation you want the display to display as?

    Simple, Right?

    • May 1, 2017 at 2:04 pm

      All do have different problems…… man! Its not that always easy.

  • March 21, 2017 at 2:11 pm

    Hello, my hp pavilion x360 suddenly have vertical rotation just from login. In grafic mode I change orientation as normal, but just next start system orientation again vertical. How I can fix it?

  • April 21, 2018 at 7:18 pm

    This is SO funny at work. It took me 30 secs to mirror (-x) the screen when my co-worker went to the bathroom.

  • May 27, 2018 at 4:19 am

    Really baffled about how to do this for an ASUS T100 Transformer 2-in-1 with Linux Mint 17.x, and now 18.3. It seems to have a “native” portrait orientation of 800×1280.

    Once I got it set to always rotate to landscape at start-up with Mate menu, Preferences/Displays, that was good .

    However, that left the touchscreen mouse pointer in an uncorrected orientation. I finally tracked down xinput-calibrator (sudo apt-get install xinput-calibrator). Then just running it in a terminal session (no parameters/arguments) overlaid the screen with a blank screen and progressively showing a cross-hair in each corner to be tapped (with finger worked fine). After the 4th cross-hair/tap, it cleared that overlay, and dropped back to the terminal session with these directions:


    Setting calibration data: 0, 4095, 0, 4095
    Calibrating EVDEV driver for “SIS0457:00 0457:1133” id=14
    current calibration values (from XInput): min_x=0, max_x=4095 and min_y=0, max_y=4095

    Doing dynamic recalibration:
    Inverting X and/or Y axis…
    Setting calibration data: 4121, -15, 38, 4157
    –> Making the calibration permanent <–
    copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
    Section "InputClass"
    Identifier "calibration"
    MatchProduct "SIS0457:00 0457:1133"
    Option "Calibration" "4121 -15 38 4157"
    Option "SwapAxes" "1"

    For my setup it needed the 2nd directory to be used:


    Copy pasted the "Section" settings as shown into that (new) file, and it was good to go from there on (through 3 reboots so far…).


  • August 24, 2018 at 6:05 pm

    Thanks for all your experience, does anyone found a way to get this automated, I have a acer aspire r which can flip over, back in the days… with windows this screen output would adapt to the screen physical position
    any chance you guys found a way to replicate th

  • October 16, 2019 at 8:49 am

    I can confirm that “xrandr -o left” and “xrandr -o normal” works for Linux Mint 19.2 and a single Dell U2412M monitor.
    I’ve also set up two custom keyboard shortcuts for the two commands to be able to change the rotation instantly: Shift+[Mod4 aka the useless Windows key]+[arrow left] to rotate vertically and Shift+[Windows key]+[arrow up] to restore to normal. Works like a charm and now I can read full page comics 🙂


Leave a Reply

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