command | description |
---|---|
ifconfig | Enable your wireless device |
iwlist | List the available wireless access points |
iwconfig | Configure your wireless connection |
dhclient | Get your IP Address via dhcp |
Configure a wireless network (like ifconfig
for wireless)
iwconfig # by itself, or... iwconfig [interface name] # designate specific wireless interface
Shows:
[1] Bring your wireless network up (assuming interface name is wlan0):
ifconfig wlan0 up
[2] Scan for wireless access points:
iwlist wlan0 scan iwlist wlan0 scan | less # pipe it to less or grep to find what you need
[3] Find the one you want and put its configs in a file under /etc/network/
[4] Down the wireless interface and bring it up with you config file
ifconfig wlan0 down ifup -i /etc/network/config_filename wlan0
Simplied (three commands to get wireless up and running; assuming interface name is wlan0):
ifconfig wlan0 iwconfig wlan0 essid NETWORK_NAME key WIRELESS_KEY dhclient wlan0
[1] Bring your wireless network up:
ifconfig wlan0 up
[2] Scan for wireless access points:
iwlist wlan0 scan iwlist wlan0 scan | less # pipe it to less or grep to find what you need
From the output of the scan you should see a line (or lines) like:
ESSID: "NETWORK_NAME" #name of an available wireless network [3] Connect to the network of your choice: <code> iwconfig wlan0 essid NETWORK_NAME # open network iwconfig wlan0 essid NETWORK_NAME key open # open network if above doesn't work iwconfig wlan0 essid NETWORK_NAME key off # open network if above doesn't work iwconfig wlan0 essid NETWORK_NAME key WIRELESS_KEY # encrypted network
NOTE: The iwconfig command defaults to HEX values for wireless keys. If you need to use ascii you have to prepend the “s” prefix to your key like so:
iwconfig wlan0 essid NETWORK_NAME key s:WIRELESS_KEY
[4] After you connect, if you need dhcp to assign an IP:
dhclient wlan0
[5] Shut it down…
ifconfig wlan0 down
Network Manager Tools (included with install):
Start/Stop/Restart Networking:
systemctl stop networking.service systemctl start networking.service systemctl restart networking.service # same as above two, combo
If that doesn't work:
service network-manager restart
—-