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
```
```
#### 8. reboot and enjoy!
```
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=fee4308e-1c45-4229-a526-41f43b85928b /media/usb ext4 defaults,auto,users,rw,nofail,x-systemd.device-timeout=30 0 0
```#### 8. reboot and enjoy!
___
https://gist.github.com/yingshaoxo/d02c0a41c52dd1b35ec80de3bcfff31a/raw/84897f0f93da39f941b4910fbf5ca313ead4e052/set_up_raspberry_pi.md