Ubuntu/Raspberry Pi
Network Config: ls -lah /Volumes/system-boot/|grep network-config
cat <<EOF > /Volumes/system-boot/network-config
version: 2
ethernets:
eth0:
dhcp4: true
optional: true
wifis:
wlan0:
dhcp4: true
optional: true
access-points:
"ChorkeOrg_2.4GHz":
password: "sadaqah!"
"ChorkeOrg":
password: "sadaqah!"
EOF
|
User Data: ls -lah /Volumes/system-boot/|grep user-data
cat <<EOF > /Volumes/system-boot/user-data
#cloud-config
system_info:
default_user:
name: pi
chpasswd:
expire: true
list:
- pi:ubuntu
ssh_pwauth: true
runcmd:
- [ df, -h, / ]
- [ sh, -xc, "echo $(date) ': hello academian!'" ]
power_state:
mode: reboot
EOF
|
| |
ls -lah /Volumes/system-boot/{.fseventsd,.Spotlight-V100}
rm -rf /Volumes/system-boot/{.fseventsd,.Spotlight-V100}
| |
| |
ssh [email protected]
:<<EOF
The authenticity of host '10.19.83.111 (10.19.83.111)' can't be established.
ECDSA key fingerprint is SHA256:9Lgs5Xxsypm4s/3F87TU2EMh6vUz6pjAMaNHXUDImVs.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.19.83.111' (ECDSA) to the list of known hosts.
[email protected]'s password:
You are required to change your password immediately (administrator enforced)
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-1042-raspi aarch64)
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for pi.
Current password:
New password:
Retype new password:
passwd: password updated successfully
Connection to 10.19.83.111 closed.
EOF
| |
| |
ssh [email protected]
:<<EOF
[email protected]'s password:
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-1042-raspi aarch64)
EOF
|
Network Config
dpkg --list|grep network-manager dpkg --list|grep wpasupplicant dpkg --list|grep iw |
apt -qq list network-manager apt -qq list wpasupplicant apt -qq list iwd |
sudo apt install network-manager sudo apt install wpasupplicant sudo apt install iwd |
| ||
sudo nmcli dev help sudo nmcli con help sudo nmcli help |
sudo nmcli device wifi list sudo nmcli device sudo nmcli con |
sudo nmcli dev wifi con 'ChorkeOrg_2.4GHz' password 'sadaqah!' sudo nmcli dev wifi con 'ChorkeInc' password 'sadaqah!' sudo nmcli dev wifi con 'ChorkeOrg' password 'sadaqah!' |
| ||
sudo iw dev wlan0 scan|grep SSID sudo nmcli dev wifi rescan sudo nmcli dev wifi |
nmcli radio all |
sudo systemctl status NetworkManager.service sudo systemctl status wpa_supplicant.service sudo systemctl status iwd.service |