- Author
- Peter Polidoro
- License
- BSD-3-Clause
- Modification Date: 2023-02-10
- Ubuntu Version
- ubuntu-22.04.1-preinstalled-server-arm64+raspi
On a host computer run:
cd ~/Downloads && wget https://cdimage.ubuntu.com/releases/22.04.1/release/ubuntu-22.04.1-preinstalled-server-arm64+raspi.img.xz
On a host computer run this before plugging SD card into host computer:
lsblk -p
Plug SD card into host computer and run:
lsblk -p
After verifying which device is your SD card (e.g. /dev/sdf1), unmount it using the following command:
umount /dev/sdf[0-9]
Next, we can write the image file to the SD card (be very careful using dd!):
- if= path to your image
- of = where to write output (note: do not include partition number)
Wait for a long time for command to finish.
cd ~/Downloads && xzcat ubuntu-22.04.1-preinstalled-server-arm64+raspi.img.xz | sudo dd of=/dev/sdf bs=4M status=progress conv=fsync
sudo touch $(findmnt -S /dev/sdf1 -o TARGET -n)/ssh
umount /dev/sdf[0-9]
Remove SD card from host computer.
Insert the SD card you’ve set up with Ubuntu Server into the microSD card slot on the underside of your Raspberry Pi.
Use an Ethernet cable to connect the Ethernet port on Raspberry Pi to an Ethernet socket on the wall, or toon your internet router, or to a host computer ethernet port, or to a usb to ethernet adapter.
Plug the USB power supply into a socket and connect it to your Raspberry Pi’s power port.
ssh ubuntu@ubuntu.local
ip addr
# find ip addresses of various ip links on the host computer
# e.g. 192.168.1.117
nmap -p22 --open -sV 192.168.1.0/24
ssh ubuntu@192.168.1.77
# e.g. 10.42.0.1
nmap -p22 --open -sV 10.42.0.0/24
ssh ubuntu@10.42.0.193
Initial password is: ubuntu Change password
# may need to reboot before upgrade if unattended-upgr has cache lock
sudo apt update && sudo apt full-upgrade -y
sudo apt autoremove -y
# reboot after upgrade
sudo apt install -y avahi-daemon avahi-discover avahi-utils libnss-mdns mdns-scan
sudo reboot
sudo adduser tempuser && sudo usermod -aG sudo tempuser
exit
ssh tempuser@<ipaddress>
sudo usermod -l newusername -d /home/newusername -m ubuntu
sudo groupmod -n newusername ubuntu
sudo ln -s /home/newusername /home/ubuntu
exit
ssh newusername@ubuntu.local
sudo userdel -r tempuser
exit
hostnamectl
sudo hostnamectl set-hostname newhostname
sudo reboot
sudo apt install -y cockpit
ssh-keygen -t ed25519 -C "your_email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
https://github.com/janelia-experimental-technology/docker_setup/blob/master/DOCKER_SETUP_LINUX.org
Setup Ethernet connection for USB ethernet adapter device and under IPv4 settings set method to ‘Shared to other computers’.
To make hostname.local work with windows, you must download and install Bonjour for Windows:
https://developer.apple.com/bonjour/
Setup Ethernet connection for USB ethernet adapter device and in Network and Sharing Center select network with internet access and allow internet connection sharing with Ethernet connection of USB ethernet adapter.