安裝 ubuntu on Raspberry Pi

Last updated on April 14, 2024 am

This is cheatsheet on installing ubuntu on Raspberry Pi.

1. download and flash to SD card

Visit ubuntu and download.

2. boot up and update

1
sudo apt update && sudo apt upgrade

3. configure wifi

3-1 which name?

usually wlan0. To find out:

1
ls /sys/class/net

3-2 netplan config

1
sudo vi /etc/netplan/50-cloud-init.yaml

Add the wifi section:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
eth0:
dhcp4: true
optional: true
version: 2
wifis:
wlan0:
optional: true
access-points:
"SSID-NAME-HERE":
password: "PASSWORD-HERE"
dhcp4: true

3-3 Apply the update

1
sudo netplan apply

3-4 Check it out

1
ip a

SSH access / lock down

1
sudo apt install openssh-server

or you just need to connect with ip or correct host name

Be sure to lock it down with key or some sort.

change hostname

1
sudo hostnamectl set-hostname newhostname

Update/append:

1
192.168.x.x	newhostname

apply change

1
hostnamectl

mount usb

1
sudo lsblk -o model,name,fstype,size,label,mountpoint

安裝 ubuntu on Raspberry Pi
https://mingster.com/2020/08/01/ubuntu_on_pi/
Author
mingster
Posted on
August 1, 2020
Licensed under