VNC is one of the primary ways used to remotely control a Raspberry Pi. Since most users do not use the Raspberry Pi like an everyday PC, and therefore may not even have a monitor and other peripherals connected to it, being able to control the Raspberry Pi from another device comes in handy. Another common way to remotely administer a Raspberry Pi is by setting up SSH.
Fortunately for us, the Raspberry Pi OS already comes with VNC installed by default, since the developers know that many users will run it as a headless device (meaning without a monitor), and only access the Raspberry Pi remotely. In this tutorial, you will see how to enable VNC on a Raspberry Pi in order to facilitate screen sharing.
In this tutorial you will learn:
- How to enable VNC screen sharing for a Raspberry Pi
|Category||Requirements, Conventions or Software Version Used|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Enable VNC screen sharing for a Raspberry Pi step by step instructions
Follow the steps below to enable VNC on the Raspberry Pi, allowing you to remotely connect and use it like you would an ordinary desktop PC. We will cover two methods below, both command line and GUI. If you are currently connected to the Raspberry Pi via SSH or just prefer the command line, then we will use the
raspi-configutility. Otherwise, desktop users can enable VNC from the preferences menu. Follow along below to see how.
Enable VNC Screen Sharing via Command Line
- Start by opening a terminal and opening the
raspi-configutility with root permissions by executing this command:
$ sudo raspi-config
- Use the arrow keys on your keyboard to highlight ‘Interface Options’ and press
- On the next menu, we have several different options for technologies we can enable or disable. Move down to the ‘VNC’ option and select it.
- The utility will ask you to confirm that you want to enable VNC. Select ‘Yes’ to proceed with enabling it.
- If successful, the utility will let you know that the VNC server is now enabled. The changes will take effect right away and you can now use VNC to remotely control the Raspberry Pi.
Enable VNC Screen Sharing via Desktop GUI
- To enable VNC from the desktop GUI, click on the application launcher, navigate to Preferences, and select Raspberry Pi Configuration.
- Click on the Interfaces tab, and then toggle VNC to enable it.
- Afterwards, VNC will be running in the task bar. You can right click on it for further configuration options.
Connecting to Raspberry Pi VNC Server
Once the VNC server has been enabled, there are many VNC clients which can be used to connect to it. A free, open source one that we recommand is Tiger VNC. It can be installed with these commands:
$ sudo apt update $ sudo apt install tigervnc-viewer
More information can be found on our tutorial: Share your desktop screen with VNC on Linux.
In this tutorial, we saw how to enable VNC on a Raspberry Pi system, which facilitates remote desktop connections. This allows users to administer their Pi device from another computer or even mobile phone.