In this quick guide, we will be showing you how to disable the auto-login functionality on your Raspberry Pi.
If you have ever used the desktop flavour of Raspberry Pi OS, you will find that, by default, it automatically logs you straight into the desktop.
While this behaviour is super convenient if you are the only one using the device, it allows anyone to gain access to your device if they have physical access.
Luckily, the Raspberry Pi team has made disabling this auto-login functionality a very straightforward and simple process.
Disabling this functionality will prompt you to log in to your Raspberry Pi to access its desktop. This helps make your device just a little bit more secure. Of course, you should also ensure you use a strong password containing letters, numbers and symbols.
Disabling the Auto-Login Function on Raspberry Pi OS
Over the following two sections, we will show you how to disable the auto-login functionality on the Raspberry Pi.
You can disable this functionality using the terminal or the desktop interface. We will be covering how to use both of these methods.
How to Disable Auto-Login from the Raspberry Pi OS Desktop
This section will show you how to disable the auto-login functionality while using the desktop interface of Raspberry Pi OS.
1. To get to the “
Raspberry Configuration” application, you must first open the start menu.
You can open the start menu by clicking the top-left side of the screen, as shown below.
2. With the start menu open, you need to hover over the “
Preferences” option (1.).
Next, click the “
Raspberry Pi Configuration” option (2.) to open the settings application.
3. We can now easily disable the auto login function on Raspberry Pi OS by toggling the “
Auto Login” option (1.).
Once you have toggled this option to off, you need to click the “
OK” button (2.).
Disabling the Auto-Login Function from the Terminal
To quickly disable the auto-login functionality of Raspberry Pi OS using the terminal, we are going to use the Raspi-Config tool.
This tool allows you to easily enable and disable certain functionalities of the Raspberry Pi and its official operating system.
Before proceeding, you must open the terminal on your Raspberry Pi. You can easily open the terminal by pressing CTRL + ALT + T on your keyboard.
1. With the terminal open on your Pi, you will want to launch the Raspi-config tool.
To launch this tool all you need to do is use the following command.
2. With the Raspi-config tool open, you will want to navigate to the “
System Options” menu, as shown below.
To navigate this menu, you can use the ARROW keys to move around and the ENTER key to open an option.
3. Next, you will want to navigate to the “
Boot / Auto Login” option and press the ENTER key to open that particular option.
This option will allow us to disable the auto-login functionality on the Raspberry Pi.
4. To disable the auto-login functionality on the Raspberry Pi, there are two different options that you can pick.
B1 Console– Select this option when you want your Raspberry Pi to boot into the console and require login.
B3 Desktop– If you wish for your Raspberry Pi to boot directly into the desktop, select this option.
Upon pressing the ENTER key, the Raspi-config tool will automatically re-adjust your device’s settings.
5. Now that we are done with the raspi-config tool, you can quit by selecting the “
<Finish>” option or pressing your keyboard’s ESC key.
5. Upon quitting the tool, you will be asked if you want to reboot the Raspberry Pi now.
To test whether the auto-login functionality has been disabled, select the “
<Yes>” option, then press the ENTER key.
Hopefully, this quick guide has taught you how you can quickly and easily disable the auto login function on your Raspberry Pi.
Having your Raspberry Pi auto-login can be convenient but also a substantial security risk. Anyone who picks up your device can easily access everything stored within it.
Please comment below if you have run into any issues with disabling the auto-login functionality on your Raspberry Pi.