A List of Commonly used Command Line Tools

(Note ifconfig, route, mii-tool, nslookup commands are obsolete)

Many of these tools provide good information about your connection and can help you diagnose issues rather quickly. All of these commands are to be run from from a terminal session and many require root rights and path. Simply open a terminal by right clicking on the Desktop and selecting "Open Terminal" or locate the Terminal icon from the Menu. Then type su -, and press enter key (which is required after every command) to become root with root path.

Networking Command Example(s) Details
Networking Status Tools
ethtool ethtool eth0 Show status of ethernet interface eth0
ethtool -i eth0 Print the driver being used for eth0
ethtool --change eth0 autoneg off speed 100 duplex full Manually set ethernet interface speed
mii-tool mii-tool eth0 Shows connectivity between system and switch and what link speed
ifconfig ifconfig eth0 Show IP address and conectivity info. for eth0
ping ping ping host, will return replies (press ctrl+C to cancel)
iptables iptables -L Print the firewall rules
Wireless Tools
iwconfig iwconfig eth1 Show status of wireless interface eth1
iwconfig eth1 rate 1Mb/s fixed Manually set wireless interface speed
iwconfig eth1 essid linksys Manually set the wireless network SSID to linksys
iwconfig eth1 enc feedfeedfe Manually set the encryption to the 64-bit HEX key feedfeedfe
iwlist iwlist scan List wireless networks in range
IP Address - Setting IP Tools
ifdown ifdown eth0 Brings down a device if running
ifup ifup eth0 Brings up an interface and IP
dhclient dhclient eth1 Assign an IP Address via DHCP to eth1
ip ip link show List network interfaces
ip link set dev eth0 name wan Rename interface eth0 to wan
ip link set dev eth0 up Bring interface eth0 up (or down)
ip addr show List addresses for interfaces
ip addr add brd + dev eth0 Add (or del) ip and mask (
ip route show List routing table
ip route add default via Set default gateway to
text setup setup This starts a text based setup tool (setuptool rpm must be installed)
system-config-network-tui system-config-network-tui Starts text networking config tool
system-config-network-gui system-config-network With or without the -gui starts the graphical net tool
service network restart service network restart Restarts the major networking components
service NetworkManager restart service NetworkManager restart restarts the main networking manager
Hostname and IP Lookup
host host w3.ibm.com Lookup DNS ip address for name or vice versa
hostname -i Lookup local ip address (equivalent to host `hostname`)
whois whois w3.ibm.com Lookup whois info for hostname or ip address
nslookup nslookup w3.ibm.com get ip or host info for a host
netstat netstat -tupl List internet services on a system (UDP and TCP)
netstat -ntlup List internet services listening on system
netstat -tup List active connections to/from system
Windows networking (Samba)
smbtree smbtree Find windows machines. See also findsmb
nmblookup nmblookup -A Find the windows (netbios) name associated with ip address
smbclient smbclient -L windows_box List shares on windows machine or samba server
mount windows mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/share Mount a windows share
send a mssg. echo 'message' | smbclient -M windows_box Send popup to windows machine (off by default in XP sp2)


Post a Comment