Install Ubuntu On Raspberry Pi
How to install Ubuntu Server on a Raspberry Pi
This article documents the manual build process I use to commission a new Raspberry Pi running Ubuntu Server
Outline
- Physically prepare device
- Build device and case as necessary
- Prepare Micro SD Card with image
- First boot device
- First login
- Rename default user/group
- Rename hostname
- Apply updates
Prepare Micro SD Card
- Steps are documented in (https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi)
- I typically use an LTS build of Ubuntu Server but choose as required
- Download Raspberry Pi Imager
- Follow steps in tool to build image
- Ensure that the Micro SD is formatted FAT32
- Not exFAT if on Windows and using larger SDs
First Boot
- I typically use PoE
- Ensure you have
- Power
- Network
- See Ubuntu docs on WiFi or Ethernet if necessary
- Connect display if needed
First Login
- Connect using ssh unless you have directly connected console
- May need to check router for IP address of device if no display is attached
- Username: ubuntu
- Password: ubuntu
- Change password when prompted
- If not prompted run
passwd
- If not prompted run
Rename User
-
Create a temp user with
sudo
privileges```bash sudo adduser temp sudo usermod -aG sudo temp ```
- Log out
- Log back in as temp
- see rename a user
Rename Group
- Without logging out from temp having renamed the default user now rename the group
- see rename a group
- Now you can log out and back in with the new username
Rename Host
- Use hostnamectl to rename host without a reboot
- see rename a host
Apply Updates
- see rename a host
A simple command to update repo list and apply all applicable updates while also cleaning up any old packages
sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -y