====== command line network howto ======
DNS settings
edit /etc/resolv.conf
add a nameserver (8.8.8.8 for google)
get online
* which network interfaces are up?
for ethernet
dmesg | grep "eth"
for wireless
dmesg | grep "wlan"
* which network card(s) do i have? (must have lshw package installed)
lshw -C network
* external wireless card connected
lspci | grep USB
* display and configure network interfaces
ifconfig
* display and configure wireless network interfaces
iwconfig
connect to a network:
iwconfig [iface(wlan0)] essid "[essid]" key s:[password]
need to have wpasupplicant installed, and also allow [iface] in /etc/network/interfaces
#allow-hotplug wlan0
auto wlan0 #bring it on boot, optional
iface wlan0 inet dhcp
#optionally, hardcode the network settings here
wpa-ssid [essid]
wpa-psk [password]
then, start the [iface]
ifup wlan0
or restart it
ifdown wlan0
ifup wlan0
* put the interface in promiscuous mode
ifconfig [interface] down
iwconfig [interface] mode Monitor
ifconfig [interface] up