1. set wifi
sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="wifi_name"
psk="password"
}
2. set ssh
create a file in /boot
in SD card
cd /boot
touch ssh
3. allow root login
sudo vi /etc/ssh/sshd_config
Change PermitRootLogin prohibit-password
to PermitRootLogin yes
4. login
ssh pi@ip_address
default password is raspberry
5. change root password
sudo su
passwd root
6. reboot then using ssh
ssh root@ip_address
you can also using ssh-copy-id root@ip_address
to use your key
7. mount external disk (only for EXT4 format)
check info about disks: sudo fdisk -l
check uuid about disks: sudo blkid
mkdir /media/usb
vi /etc/fstab
UUID=05b9686d-cd4f-4da6-98ea-874269621970 /media/usb ext4 defaults 0 2
网友评论