RPI Installation
- Download rpi imager
- Install and Run rpi imager.
- Select RASPBIAN LITE and SD card. Click Write
Setup
- Start rpi
- Login with default username - pi and password - raspberry
- First thing first - by default rpi comes with English-UK keyboard layout. Change it to US using below commands
sudo raspi-config
Localisation -> Change Keyboard Layout -> Generic 105-Key PC (Intl.) -> English (US) - Change Display resolution to highest possible
- Setup Wifi network
sudo raspi-config
Network Options -> WiFi -> Enter WiFi SSID > Enter Passphrase
Test: ping google.com - Optional change hostname. By default hostname is raspberrypi
sudo raspi-config
Network Options -> Hostname -> Enter desired hostname - [Optional] Change pi user password. Default password is raspberry
sudo raspi-config
Select Change User password - [Optional] Enable SSH
sudo raspi-config
Interfacing Options -> SSH -> Select Yes
Test: Use putty on windows and connect to pi using hostname, username and password. - Update packages
sudo apt-get updateInstall openvpn - [optional] Setup smb client. To read or backup files to flash drive mounted on router or additional pen drive.
Install smbclient - sudo apt install smbclient
smbclient \\\\192.168.1.1\\share -U rpi-c "cd /backup/pi; put welcome.txt"
smbclient \\\\192.168.1.1\\share -U rpi-c "cd /backup/pi; get welcome.txt"
Quick Putty connection
Create a shortcut on desktop to run ssh using putty
putty.exe pi@raspberrypi
With password
putty.exe pi@raspberrypi -pw ********
Useful linux commands
ps examples
ps auxNetworking
To find IP address of each interface run ifconfigTo find open TCP connections run - sudo netstat -tulpn
To turn off network interface. sudo ifconfig wlan0 down
add/remove wifi network
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="
psk="
}
Jobs
Run command in background (job) using ampersand (&) at the end of commandTo list background running jobs
jobs
list jobs with PID
jobs -l
Bring a job to foreground
fg or using fg %# where is # is job id.
Kill process using run, kill PID command
To send current command to backgrount press Ctrl-Z which will also stop process. Use bg run in background.
1 comment:
This was greatt to read
Post a Comment