A Linux distribution also abbreviated as a distro and is distributed freely under GNU. Since Linux became a buzzword many organizations have started offering professional support and there are many sites on the Net where Linux questions are answered for free. Of course, if you are good at coding you can tweak the source code directly. Linux distributions are free to download. Lets decryptinfo about the Top 30 Linux Networking commands.
ARP stands for Address Resolution Protocol, which is used to find the media access control address of a network neighbor for a given IPv4 Address. Arp manipulates or displays the kernel’s IPv4 network neighbor cache. It can add entries to the table, delete one or display the current content.
Arpwatch keeps track for ethernet/ip address pairings. It syslogs activity and reports certain changes via email. Arpwatch can be used with various parameters. For example, if you use “-i” parameter, you can use arpwatch for a specific network interface. Or you can use “-d” parameter for debugging
bmon command is used to monitor bandwidth, captures data, and provide human-readable data with this information. bmon is a monitoring and debugging tool to capture networking related statistics and prepare them visually in a human-friendly way. It features various output methods including an interactive curses user interface and a programmable text output for scripting.
curl command is one of the Network Commands in Ubuntu Linux that is used for file transfer. Curl can use various protocols like HTTP, HTTPS, FTP, FTPS, SFTP, SCP etc. curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer resume, Metalink, and more.
The Internet Systems Consortium DHCP Client, dhclient, provides a means for configuring one or more network interfaces using the Dynamic Host Configuration Protocol, BOOTP protocol, or if these protocols fail, by statically assigning an address.
“dig” is the abbreviation of Domain Information Gropher. It is mostly used for simple DNS lookup to DNS Server like CName, MX records etc. dig is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output.
Dstat is a multipurpose replacement for vmstat, iostat and ifstat. Dstat overcomes some of the limits and adds some extra features. Dstat allows you to view all of system resources instantly. This command is also used with Python and extend its functionality.
ethtool is used to query and control network device driver and hardware settings, particularly for wired Ethernet devices. To check the settings of your Network Interface Card (NIC), you can use ethtool command.
FTP is the most used File Transfer Protocol used with ubuntu Linux. With ftp command, you can connect ftp session and you can transfer files. You can also connect straight to the remote host with ftp command.
Host command is used IP-Name matchings. You can get the results both for IPv4 and IPv6. It is normally used to convert names to IP addresses and vice versa.
Ifstat is a tool to report interface activity, just like iostat/vmstat do for other system statistics. These statistics can be bandwidth usage, received frames, discarded frames, errors, collisions etc.
“ip addr” command is the ubuntu Linux cmd that is used for network interfaces and routing activities. The earlier command used instead of this command was “ifconfig”. With this mint Linux network cmd, you can both check the interface information like ip addresses, MAC values etc, and you can modify ip addresses.
iptables cmd is used for ip packet filtering. With iptables command, we can set up iptable rules and prevent unauthorized access to OS, network. iptables cmd can be used with various parameters.
$ iptables [-t <table-name>] <command> <chain-name> <parameter-1> \<option-1> <parameter-n> <option-n>
There is a “chain” that includes several rule.And there are “tables” that includes several chains. To list the rules under chains and tables, we can use “-L” and “-t“ parameters.
iftop ubuntu operating system command is one of the Network Commands in Mint Linux used to display current bandwidth usage on existing network interfaces. You can also use this command for a specific interface with “-i” parameter. iftop listens to network traffic on a named interface, and displays a table of current bandwidth usage by pairs of hosts.
iwconfig is similar to ifconfig used in redhat linux, iwconfig command is used to configure wireless interfaces. You can configure SSID, frequencies etc. any other parameters related to your wireless network interface. All these parameters and statistics are device dependent.
To check network connections, we use “netstat” command on ubuntu Linux. “netstat” cmd is very useful especially for troubleshooting activities. It shows network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
nload command is also a bandwidth monitoring tool. It also shows the total bandwith usage, minimum bandwith usage, maximum bandwith usage etc. It visualizes the in- and outgoing traffic using two graphs and provides additional info like the total amount of transferred data and min/max network usage.
Nmap (“Network Mapper”) is an open source tool in ubuntu linux for network exploration and this mint linux command is used for security audits. Nmap shows, which services are available and their offerings, operating systems, other characteristic etc. The output from Nmap is a list of scanned targets, with information on each depending on the switch used. Key among that information is the “ports table”
“nslookup” is used also for DNS Query(DNS lookup). It gives DNS Server information. Nslookup linux mint command has two modes: interactive and non-interactive. Interactive mode allows to query name servers for information about hosts and domains. Non-interactive mode is used to print just the name and requested information for a host or domain.
“ping” command is the most used command in the networking world. Ping command is used on Linux Mint similar with the other platforms like cisco, juniper etc. “ping” command can be used with various options. ping works with both IPv4 and IPv6. Using only one of them explicitly can be enforced by specifying -4 or -6.
To check the IP Routing Table on Ubuntu Linux machine, “route” command is used. Its primary use is to set up static routes to specific hosts or networks via an interface. Routing Table can be manuplated also with additional parameters like “add”, “delete”, “flush”.
e.g. To add a route:
$ route add -net 192.168.1.11/24 gw 192.168.1.1
To delete a route:
$ route del -net 192.168.7.1/24 gw 192.168.2.1
“scp” is used to secured file transfer between different hosts. You can copy your files to another device in the network. It uses ssh for data transfer, and uses the same authentication and security as ssh client. You can copy both files and directories. For directories, you use “-r” parameter
From local host to remote host:
$ scp $filename user@targetmachine:remotemachine_path
From remote host to local host:
$ scp user@targetmachine:remotemachine_path local_path
sftp is a file transfer program in linux mint OS, similar to ftp service, which performs all operations over an encrypted ssh transport. It is a secure file transfer protocol. With SFTP, FTP is used over SSH.
ss cmd gives detailed information about the sockets.We can use “-l” option to list listening sockets and “-t” option for tcp connections only. It allows showing information similar to netstat command. It can display more TCP and state information than other tools.
“ssh” is a secure connection command used in networking. In Ubuntu Linux, we can use “ssh” to connect any node. We can use “ssh” command with username and IP or Domain name. ssh connects and logs into the definite destination, which may be specified as either [user@]hostname or a URL of the form ssh://[user@]hostname[:port].
tshark command is one of the Network Commands in Mint Linux used for analyze packet and its is stronger command than tcpdump command. It is a Wireshark utility. It will use the pcap library to capture traffic from the available network interface and displays a summary line on the output for each received packet.
To capture the traffic on an interface, we can use it with “-i” parameter.
$ sudo tshark –i enp0s3
hping3 command is also a packet analyzing tool that can analyze and assemble TCP, UDP, ICMP etc. packets. With hping3 command, you can start the session and then you can write its commands. It is used for penetration testing, firewall testing, network testing, advanced port scanning, advanced traceroute, tcp/ip stack auditing etc
Tcpdump command is the most used command for analyzing and capturing packets in RedHat Linux. With this command, you can see TCP transmissions on your network. It can also be run with the -w switch, which causes it to save the packet data to a file for analysis
“telnet” is a connection command used in networking. In Linux mint, we can use “telnet” to connect any service. We can use only ip address and port number with “telnet” command. It is not so secure command as ssh. Telnet service is dependent on xinetd service.
tracepath command is a similar path tracking Linux Mint command like traceroute command. It uses UDP port port or some random port. It is similar to traceroute, only does not require superuser privileges. With tracepath command, you can list the host series on the way to a destination