User Tools

Site Tools


If you want to send us your comments, please do so. Thanks
More on comments

Network commands

General considerations

We find these commands hard to work with, if they even work
This needs more study and trial and error testing

Show your IP

If you have access to a webserver you can run your own “show IP” service

General commands

adnshostA general-purpose DNS lookup utilityFrom the adns-tools package. Limited security support
adnslogresA logresolv programFrom the adns-tools package. Limited security support
adnsresfilterA filter which copies its input to its outputFrom the adns-tools package. Limited security support
ipshow / manipulate routing, devices, policy routing and tunnels
ip2hostResolve IP's to hostnames in webserver logs
iptstateIPTables State Top. A top-like display of IP Tables state table entriesInteractive commands
iptraf-ngncurses interactive colorful IP LAN monitor
lsmLink connectivity monitor tool
ncatConcatenate and redirect socketsPart of nmap. Successor of netcat
net-toolsPackage containing arp, ifconfig, netstat, rarp, nameif and route
netcatConcatenate and redirect socketsSucceded by ncat
netdiagPackage containing tcpblast, netload, trafshow, netwatch, statnet, tcpspray
netstatIs replaced by ss
netstat-natShow the natted connections on a linux iptable firewall
NetworkManagerNetwork management daemon
nm-connection-editorThis starts the GTK window that can also be started from the system tray
nm-onlineAsk NetworkManager whether the network is connectedFind the answer with echo $? 0: Online; 1: Offline; 2: Error
nm-toolUtility to report NetworkManager state and devicesObsolete?
nmcliCommand-line tool for controlling NetworkManagerObsolete?
nmtuincurses tool to manage network connections
pingsend ICMP ECHO_REQUEST to network hostsping -4 -c 1 -q -w 3 &> /dev/null Only IPv$, only one ping, almost no output, quit after 3 seconds when no reply and discard all output. Useful in a script
sntoptop-like console network status toolShows if a website is up. In alarm or log mode a file is executed on the occurence of change in status of a given host
ssAnother utility to investigate socketsReplaces netstat which is deprecated. ss is part of the iproute2 package
systemctl restart networking
systemctl status network

Programs in the iproute2 package

iputils-arpingARP ping


dhclientDynamic Host Configuration Protocol ClientGeneral
ifconfigconfigure a network interfaceGeneral

Wireless LAN

iwshow / manipulate wireless devices and their configurationWiFi
iwconfigDeprecated and replaced by iw
iwlistGet more detailed wireless information from a wireless interfaceWiFi


dhclient wlan0
nmcli dev wifi
iwlist wlan0 scan | grep -i ssid
iw dev wlan0 scan | grep SSID
ifconfig wlan0 up
ifdown eth0; ifup eth0
ip addrShow information for all addresses. Shows IP numbers of the host
ip link show wlan0
ip link show enp7s0
ip routeShow the routingtable and thereby the IP address of the router the host is connected to
ip set link eth0 downBring link eth0 down
ip set link eth0 upBring link eth0 up
iw wlan0 link
iw dev wlan0 station dumpiw dev wlan0 station dump Does the same
iw wlan0 disconnectDisconnects and reconnects automatically again
nmcli dev wifi connect SSID password SSID_pawsswordDoes not work at this moment
nmcli generalOutput: STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN connected full enabled enabled enabled enabled
ifconfig wlan0 down
ifconfig wlan0 up
ifconfig -v eth0 IP address to network interface eth0 and bring it up

File locations

/etc/networksHolds the local network addresses
/etc/network/interfacesavailable network interfaces
/etc/dhcp/dhclient.confConfiguration file for /sbin/dhclient
/etc/hostnameHolds the hostname of the computer
/etc/hostsHolds the hostlist. See also hosts.allow hosts.deny
/etc/resolv.confDNS servers

iw documentation
Network Configuration
Debian static IP address
How to connect to a WPA/WPA2 WiFi network using Linux command line

Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

Privacy statement
Bugs statement
Copyright © : 2014 - 2023 and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
network_commands.txt · Last modified: 24-09-2023 09:19 by wim