Index Keywords Recent

↶ Return Home

Remove the Default Pi User

Last Updated May 3rd 2022, 12:41:16 am


This is a basic setup guide for removing the default Pi user on the Raspberry Pi OS.


You can obtain the latest copy of Raspberry Pi OS here:


Create New User

sudo adduser <username>

Add Permissions and Groups for the New User

To add all the same settings and groups as the default pi user, enter the following command,

sudo usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi <username>

Logout and login as the <new user>

Remove the defualt Pi user

Close any pi user processes,

sudo pkill -u pi

Remove the pi user and pi home folder

sudo deluser -remove-home pi

Remove Sudo file

sudo rm /etc/sudoers.d/010_pi-nopasswd