Basic Linux Networking Commands
- ifconfig: Used to find network details, initialize an interface, assign IP address, enable or disable an interface.
- ip: Latest and more powerful version of ifconfig. The utility is used for displaying and manipulating routing, network, devices, interfaces
- traceroute: Network troubleshooting utility for tracing the full path/route of packet from your local system to another network system.
- ping: It is used to check the connectivity between two hosts/nodes on a local Area Network or Wide Area Network. It makes use of the ICMPs to make communicate with end nodes.
- netstat: Netstat command stands for network statics. It display information about open sockets, routing tables and connection information
- ss: The ss command is replacement for netstat command. This command gives more information in comparison to the netstat. It is also faster than netstat as it gets all info from kernal userspace.
- dig: Dig stands for domain internet gropper is a simple DNS lookup utility, that is used to query DNS related info such as A Record, CNAME, MX Record etc. It mainly deals with debug DNS related problems.
- route: Used to displays and manipulate IP routing table for your systems.
- nslookup: This is also command-line utility to query DNS servers both interactively and non-interactively. It is used to query DNS resource records (RR).
- host: The host command displays domain name for given IP address or vice-versa. It also performs DNS lookups related to the DNS query.
- arp: The command arp is stands for Address Resolution Protocol. It allows us to view or add content into kernal's ARP table.
- iwconfig: Similar to ifconfig, but is dedicated to the wireless interfaces. The command iwconfig configures a wireless network interface. You can view and set basic wi-fi details like SSID and encryption.
- hostname: The hostname command allows us to set and view /show system's hostname. A hostname is the name of any computer that is connected to a network that is uniquely identified over a network.
- whois: The whois command displays information about a website's record. You may get all the information about a website regarding its registration and owner's information.
- tracepath: It is similar to traceroute command, but it doesn't require root previleges, By default, it is installed in Ubuntu. If it's not found in your system you have to install it using your system package manager.
- curl: The curl (Client URL) command is mostly used to transfer data over the network and supports various protocols including HTTP, FTP, IMAP, and many others.
- wget: It is used to download files using HTTP, HTTPS, FTP Protocols. It provides the ability to download multiple files, resume downloads, download in the background etc.
- mtr: It is combination of ping and traceroute utilities and is mainly used for network diagnostics and gives live look at network response and connectivity.
- iftop: The iftop (Interface TOP) is often used by System admins to monitor stats related to bandwidth and can also be used as a diagnostic tool when you'r having issues with the network.
- tcpdump: The tcpdump is a packet sniffing and analyzing utility used to capture , analyze and filter network traffic.
- iperf: The iperf is an open-source utility written in C allowing users to perform network performance missurement and tuning.
- ethtool: ethtool is a command-line utility for querying and modifying network interface controller parameters and device drivers.
- scp and sftp: SCP and SFTP are both file transfer protocols, but they have different functionalities. SCP only allows file transfer, while SFTP allows file access transfer, and management.
- rsync: rsync is a fast and versatile command-line utility for synchronizing files and directries between two host over an ssh tunnel.
- ifplugstatus: ifplugstatus command is used to check if the network cable is connected to the network interface. To use the command you first need to install it.
- nload: nload command is used to monitor your network bandwidth. It can show the total amount of data usage and min/max bandwidth usage. To also use it you need to install it first.
- nmcli: An easy-to-use, scriptable command-line tool to report network status, manaage network connections, and control the Network Manager.
- bmon: The bmon is an open-source utility to monitor real-time bandwidth and debug issues by presenting states in a more human-friendly way
- nc (netcat): Referred to as the "Network Swiss Army Knife", is a powerfull utility used for almost any task related to TCP, UDP, or UNIX-domain sockets. It is used to open TCP connections, listen on arbitary TCP and UDP ports, perform port scanning plus more.
- nmap: The nmap is a tool to explore and audit network security. It is often used by hackers and security enthusiasts as it allows you to get real-time info on the network, IPs connected to your network in a detailed manner, post scanning, and much more.
- tshark: TShark is a network protocal analyzer. It lets you capture packet data from live network, or read packets from a previously saved capture file, either printing a decoded for of those packets to the standard output or writing the packets to a file.
- vnstat: The vnstat utility is mostly used by system admins to monitor network traffic and bandwidth cunsumption (for the most part) as this tool monitors traffic on network interfaces of your system.