Skip to content

Instantly share code, notes, and snippets.

@yingshaoxo
Created March 2, 2019 20:01
Show Gist options
  • Save yingshaoxo/d02c0a41c52dd1b35ec80de3bcfff31a to your computer and use it in GitHub Desktop.
Save yingshaoxo/d02c0a41c52dd1b35ec80de3bcfff31a to your computer and use it in GitHub Desktop.
Let's rock the Raspberry Pi

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 

8. reboot and enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment