How to Rotate the Raspberry Pi Display Output

If you are building a Raspberry Project with screen there may be times you need to rotate the screen. This fairly easy to do in Raspbian.

Start by editing the config.txt file :

sudo nano /boot/config.txt

Add one of the following lines to the bottom of the file :


0 is the normal configuration. 1 is 90 degrees. 2 is 180 degress. 3 is 270 degrees.

If you are using the Official Raspberry Pi touch screen you can use “lcd_rotate” rather than “display_rotate”.

Save the file by using CTRL-X, Y then ENTER.

Then reboot using :

sudo reboot

When the Pi restarts the display should be rotated.