Wednesday, November 30, 2011

Useful Linux Network Commands for Ubuntu / Debian

Ubuntu Linux Useful Networking commands

    ifconfig – displays information network
    iwconfig – displays information from wireless
    sudo /etc/init.d/networking restart – reset the network
    /etc/network/interfaces –
(file) manual configuration
    ifup interface – bring online interface
    ifdown interface – disable interface 


iwlist scan - shows wireless networks that are available in the area with basic encryption information
lshw -C network - Shows Details of Interface card and drivers of each networking device

lspci -nn - Shows PCI vendor and device codes as both numbers and names of hardware connected to the pci bus
lsusb - Shows USB connected hardware
lshw -C usb - Additional info on USB related hardware (good for USB dongles)

route -n - Lists kernel IP routing table — Good for troubleshooting problems with the gateway
sudo dhclient - Request IP address from DHCP server for specified interface
sudo dhclient -r - Release IP address associated with specified interface
/etc/udev/rules.d/70-persistent-net.rules - (File) which assigns logical names (eth0, wlan0, etc) to MAC addresses
cat /etc/resolv.conf - Lists DNS servers associated with network connections


3 comments:

Anonymous said...

dhcp, not dns

panayara said...

thank you corrected

compizspec said...

dig,nmap,tracepath