Assigning Static IP address:
- Open “dhcpcd.conf” file in Nano editor
sudo nano /etc/dhcpcd.conf
- Scroll all the way to the bottom of the file and add one, or both of the following snippets. Depending on whether you want to set a static IP address for a wired connection (eth0) or a wireless connection (wlan0)
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
interface wlan0
static ip_address=192.168.0.200/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
- Save the configuration file by pressing “Ctrl” and “X” key followed by “Y” and “Return” key
Modify WiFi Credentials:
- open “wpa_supplicant.conf” in nano editor
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
- Add or change SSID and Password as desired
network={
ssid="YOUR_WIFI_NETWORK_NAME"
psk="YOUR_WIFI_NETWORK_PASSWORD"
}
- Save the configuration file by pressing “Ctrl” and “X” key followed by “Y” and “Return” key