I have a widescreen monitor that rotates. I'm trying to use it in 'landscape' mode (vertical). This is easy in the GUI.

How do I rotate my display when I am not running an X Server or when I am viewing a Virtual Console / Terminal.

  • 3
    @Kurtis You might want to change the accepted answer here, I'm not sure that the accepted answer was even true when it was written, but the highest voted answer seems to work well without any changes on my Ubuntu. – pipe Mar 25 '19 at 13:50

You can only rotate your display with some kind of X server. A virtual console as well as framebuffer has no support for rotating.

But maybe you can run some small X window manager like awesome and a terminal in full-screen mode. In this case you would get the rotation feature and it still feels like a console.

  • 1
    Ha! I used to rotate by frame buffer in Linux back when I had CRTs! – Caleb Jun 1 '20 at 22:59

You can rotate your virtual framebuffers using fbcon. 0 through 3 to represent the various rotations:

  • 0 - Normal rotation
  • 1 - Rotate clockwise
  • 2 - Rotate upside down
  • 3 - Rotate counter-clockwise

These can be set from the command line by putting a value into the correct system file. Rotate the current framebuffer:

echo 1 | sudo tee /sys/class/graphics/fbcon/rotate

Rotate all virtual framebuffers:

echo 1 | sudo tee /sys/class/graphics/fbcon/rotate_all

If you want this to happen automatically when you start your system, you need to modify your boot loader configuration to give it the correct options. In /etc/default/grub add fbcon=rotate:1 to the GRUB_CMDLINE_LINUX line:


(Don't forget to run sudo update-grub after changing this file.)

Sources: Rotate Screen, not running X windows, Rotate console on startup (Debian)

  • Relies on CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y – Ciro Santilli新疆棉花TRUMP BAN BAD May 5 '18 at 10:38
  • Confirmed this work in virtualbox linux client too!! – John Siu Jul 18 '19 at 16:34
  • Does not work in NVIDIA Jetson Nano supplied Ubuntu. /sys/class/graphics/fbcon/rotate content will not change. rotate_all makes access denied even as root. – Tõnu Samuel Oct 3 '19 at 4:27
  • It isn't a real file and it doesn't have contents. You can't read that "file". You can only write to it. Have you tried the command exactly with copy and paste? – Stephen Ostermiller Oct 3 '19 at 10:35
  • Works for me in Debian 9 on an Intel IGP. What a joy to have a "portrait mode" full HD console :-) – frr Dec 11 '19 at 8:39

Your Answer

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

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