- https://www.raspberrypi.com/software/operating-systems/
- Raspberry Pi OS (64-bit)
- Raspberry Pi OS with desktop
diskutil list
sudo diskutil umount /dev/disk8s1
sudo dd bs=4M if=./2023-05-03-raspios-bullseye-arm64.img of=/dev/disk8 status=progress conv=fsync- Don't forget to extract the file if it's compressed
cd /Volumes/bootfstouch sshnvim wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=JP
network={
ssid="<SSID>"
psk="<Password>"
}nvim userconf.txt
kjuq:<ENCRYPTED_PASSWORD>ENCRYPTED_PASSWORD is from pass {DEVICES_PASSWD} | openssl passwd -6 -stdin | pbcopy
userconf.txt should be like kjuq:$6$4FAIAmyeuggAn71w$BJLctNwvql1tndL3yPkjWp/h0xY21VrBTkQUALw5cE6lbFJ/k7EDpxBXbKw9uU9I7rfQGol2FFfjxhVI0LJHf0
ssh kjuq@raspberrypi.local
localelocalectl list-localessudo localedef -f UTF-8 -i en_US en_US.UTF-8localectl list-localeslocale
sudo apt updatesudo apt upgrade
vcgencmd otp_dump | grep 17:- If the output is
17:1020000a, USB boot is disabled.
- If the output is
echo "program_usb_boot_mode=1" | sudo tee -a /boot/config.txtecho "program_usb_boot_timeout=1" | sudo tee -a /boot/config.txtsudo rebootvcgencmd otp_dump | grep 17:- If the output is
17:3020000a, USB boot is enabled.
- If the output is
sudo vi /etc/hostnamesudo vi /etc/hostssudo reboot
free# Check current swap sizesudo apt autoremove -y dphys-swapfilefree# Swap size is now zero
df -h# Check current file systemsudo vi /etc/fstab- Add 3 rows below to the end of the file
- CAUTION: If /var/log is RAMDISK-nized, nginx may cause errors
sudo rebootdf -h# These directories are now mounted
/etc/fstab
tmpfs /tmp tmpfs defaults,size=256m,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,size=16m,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,size=32m,noatime,mode=0755 0 0
Filesystem Size Used Avail Use% Mounted on
udev 328M 0 328M 0% /dev
tmpfs 93M 944K 92M 1% /run
/dev/mmcblk0p2 29G 1.6G 26G 6% /
tmpfs 461M 0 461M 0% /dev/shm
tmpfs 5.0M 12K 5.0M 1% /run/lock
/dev/mmcblk0p1 510M 94M 417M 19% /boot/firmware
tmpfs 93M 0 93M 0% /run/user/1000
Filesystem Size Used Avail Use% Mounted on
udev 328M 0 328M 0% /dev
tmpfs 93M 2.5M 90M 3% /run
/dev/mmcblk0p2 29G 1.6G 26G 6% /
tmpfs 461M 0 461M 0% /dev/shm
tmpfs 5.0M 12K 5.0M 1% /run/lock
tmpfs 256M 0 256M 0% /tmp
tmpfs 32M 8.0K 32M 1% /var/log
tmpfs 16M 0 16M 0% /var/tmp
/dev/mmcblk0p1 510M 94M 417M 19% /boot/firmware
tmpfs 93M 0 93M 0% /run/user/1000
sudo apt install apt-transport-https
curl -fsSL https://pkgs.tailscale.com/stable/raspbian/bullseye.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg > /dev/null
curl -fsSL https://pkgs.tailscale.com/stable/raspbian/bullseye.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
sudo apt update
sudo apt install tailscalesudo tailscale up --ssh --advertise-exit-nodeCheck your own ip address and subnet mask
ifconfig# Check ip address and device name (such aseth0,enp4s0)ip route show# Check default gatewaycat /etc/resolv.conf# Check DNS server
(When using NetworkManager)
sudo nmcli connection showsudo nmcli connection modify 'Wired connection 1' ipv4.method manual ipv4.addresses 192.168.11.100/24 ipv4.gateway 192.168.11.1 ipv4.dns 100.100.100.100sudo reboot
-
ifconfig# Check device name (such aseth0,enp4s0) -
sudo ethtool enp4s0 | rg Wake-on- if
Wake-on: gwas output, WoL is enabled already - if not, read https://wiki.archlinux.jp/index.php/Wake-on-LAN
- if
-
wakeonlan {MACADDRESS}
sudo apt install bluez-tools
ifconfig
sudo nvim /etc/systemd/network/pan0.netdev
[NetDev]
Name=pan0
Kind=bridge
sudo nvim /etc/systemd/network/pan0.network
[Match]
Name=pan0
[Network]
Address=172.20.1.1/24 # private ip address you like
DHCPServer=yes
sudo nano /etc/systemd/system/bt-agent.service
[Unit]
Description=Bluetooth Auth Agent
[Service]
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput
Type=simple
[Install]
WantedBy=multi-user.target
sudo nano /etc/systemd/system/bt-network.service
[Unit]
Description=Bluetooth NEP PAN
After=pan0.network
[Service]
ExecStart=/usr/bin/bt-network -s nap pan0
Type=simple
[Install]
WantedBy=multi-user.target
sudo systemctl enable systemd-networkdsudo systemctl enable bt-agentsudo systemctl enable bt-networksudo systemctl start systemd-networkdsudo systemctl start bt-agentsudo systemctl start bt-network
ifconfig
pan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.20.1.1 netmask 255.255.255.0 broadcast 172.20.1.255
inet6 fe80::4d9:21ff:fe82:921e prefixlen 64 scopeid 0x20<link>
ether 06:d9:21:82:92:1e txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 32 bytes 4410 (4.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
sudo bluetoothctl[bluetooth]# discoverable on
ssh pi@172.20.1.1
- 上野家のホームページ - 資料室 : PC/RaspberryPi/RAM ディスクの利用 Raspberry Pi で MicroSD カード寿命を延ばすために RAM ディスクを使う
- Setting up Tailscale on Raspberry Pi (Bullseye) · Tailscale Docs
- ラズパイゼロにBluetooth経由でSSH接続 - 芽萌丸
- Raspberry Pi 4 に入れた Manjaro でIPアドレスを固定する #RaspberryPi - Qiita
- Ubuntuで、IPアドレス、デフォルトゲートウェイ、DNSサーバーの設定確認 - Symfoware
- ラズベリーパイで固定IPアドレスを設定する - ムギークのブログ