Techniques
Common
ifconfig - show network interfaces
iwlist <interface> s - scan the interface
Add IP to interface
ifconfig wlan0 192.168.1.200 netmask 255.255.255.0
Where:
wlan0is the interface192.168.1is the network and200is the IP. We have 254 IPs available255.255.255.0is the netmask
Connect to a network
If we want to connect to a network, we can use wpa_supplicant:
wpa_passphrase WLAN_NAME PASSWORD > wpa_supplicant.conf
wpa_supplicant -B -i wlan0 -c wpa_supplicant.conf
Where:
WLAN_NAMEis the name of the networkPASSWORDis the password-Bruns in the background
Links
- https://www.baeldung.com/linux/connect-network-cli