{"id":2390,"date":"2024-01-12T14:38:50","date_gmt":"2024-01-12T09:08:50","guid":{"rendered":"https:\/\/www.veeble.org\/kb\/?p=2390"},"modified":"2025-04-23T14:52:34","modified_gmt":"2025-04-23T09:22:34","slug":"essential-linux-network-commands","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/essential-linux-network-commands\/","title":{"rendered":"15 Basic Linux Network Commands for Newbies"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies-1024x683.jpg\" alt=\"15 Basic Linux Network Commands for Newbies\" class=\"wp-image-8592\" style=\"width:811px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies-1024x683.jpg 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies-300x200.jpg 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies-768x512.jpg 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies.jpg 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Proficiency in Linux network commands is essential for maintaining and troubleshooting network configurations for any <a href=\"https:\/\/www.coursera.org\/in\/articles\/what-is-a-network-administrator-a-career-guide\" target=\"_blank\" rel=\"noopener\">network admin<\/a> on <a href=\"https:\/\/www.careerexplorer.com\/careers\/server-administrator\/\" target=\"_blank\" rel=\"noopener\">server admin<\/a>. These commands empower to manage various aspects of networking, from checking network connectivity to diagnosing and resolving issues. Having all these commands under one point&nbsp; makes the task easier.&nbsp;<\/p>\n\n\n\n<p>This article provides 15 essential linux network commands<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"#ip\">ip<\/a><\/li>\n\n\n\n<li><a href=\"#ifconfig\">ifconfig<\/a><\/li>\n\n\n\n<li><a href=\"#ping\">ping<\/a><\/li>\n\n\n\n<li><a href=\"#dig\">dig<\/a><\/li>\n\n\n\n<li><a href=\"#netstat\">netstat<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/nslookup\" target=\"_blank\">nslookup<\/a><\/li>\n\n\n\n<li><a href=\"#traceroute\">traceroute<\/a><\/li>\n\n\n\n<li><a href=\"#tracepath\">tracepath<\/a><\/li>\n\n\n\n<li><a href=\"#host\">host<\/a><\/li>\n\n\n\n<li><a href=\"#hostnamectl\">hostnamectl<\/a><\/li>\n\n\n\n<li><a href=\"#nmap\">nmap<\/a><\/li>\n\n\n\n<li><a href=\"#tcpdump\">tcpdump<\/a><\/li>\n\n\n\n<li><a href=\"#iftop\">iftop<\/a><\/li>\n\n\n\n<li><a href=\"#arp\">arp<\/a><\/li>\n\n\n\n<li><a href=\"#ss\">ss<\/a><\/li>\n<\/ol>\n\n\n<h2 class=\"wp-block-heading\" id=\"ip\">1. ip<\/h2>\n\n\n<p>The <code>ip<\/code> command is a versatile tool for configuring and managing network interfaces, routes, and addresses on Linux systems. These network commands replaces older networking tools like <code>ifconfig<\/code> and <code>route<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ip &#91;options] object &#91;command]\n<\/code><\/pre>\n\n\n\n<p>When executed without any additional parameters, it provides a detailed overview of all network interfaces on the server, including their IP addresses, MAC addresses, and current operational status. Here is an example of the ip addr command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# ip addr<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/ipaddr.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"238\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/ipaddr-1024x238.png\" alt=\"ip\" class=\"wp-image-2391\" style=\"width:607px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/ipaddr-1024x238.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/ipaddr-300x70.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/ipaddr-768x178.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/ipaddr.png 1340w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>The output typically includes information such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Interface Names and Numbers: Identifies each network interface along with associated numerical identifiers.<\/li>\n\n\n\n<li>IP Addresses: Displays the assigned IP addresses for each interface, including both IPv4 and IPv6 addresses.<\/li>\n\n\n\n<li>MAC Addresses: Shows the hardware (MAC) addresses associated with the network interfaces.<\/li>\n\n\n\n<li>Status: Indicates whether the interface is UP (active) or DOWN (inactive).<\/li>\n\n\n\n<li>Additional Information: May include details such as the broadcast address and subnet mask.<\/li>\n<\/ul>\n\n\n<h2 class=\"wp-block-heading\" id=\"ifconfig\">2. ifconfig<\/h2>\n\n\n<p>The &#8216;ifconfig&#8217; command provides a comprehensive overview of network interfaces, displaying details such as IP addresses, MAC addresses, and network-related statistics.&nbsp;<\/p>\n\n\n\n<p>Additionally, it aids in troubleshooting connectivity issues by revealing essential information about network interfaces, helping you identify any abnormalities or misconfigurations.<\/p>\n\n\n\n<p><strong>Prerequisites:-  install <a href=\"https:\/\/wiki.linuxfoundation.org\/networking\/net-tools\" target=\"_blank\" rel=\"noopener\">net-tools<\/a><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# ifconfig<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/ifconfig.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"418\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/ifconfig.png\" alt=\"ifconfig\" class=\"wp-image-2392\" style=\"width:610px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/ifconfig.png 1023w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/ifconfig-300x123.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/ifconfig-768x314.png 768w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" \/><\/a><\/figure>\n\n\n<h2 class=\"wp-block-heading\" id=\"ping\">3. ping<\/h2>\n\n\n<p>The ping command is fundamental for testing network connectivity. This network command sends <a href=\"https:\/\/www.fortinet.com\/resources\/cyberglossary\/internet-control-message-protocol-icmp#:~:text=The%20Internet%20Control%20Message%20Protocol,and%20at%20the%20right%20time.\" target=\"_blank\" rel=\"noopener\">ICMP <\/a>echo requests to a target host, helping you verify if a server or network device is reachable.<\/p>\n\n\n\n<p>We use ping to diagnose network issues by sending ICMP echo requests and receiving corresponding replies, measuring response times in the process.<\/p>\n\n\n\n<p>Syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ping &#91;hostname or IP]<\/code><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# Ping 66.85.185.123<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-102917.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"393\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-102917.png\" alt=\"ping\" class=\"wp-image-2394\" style=\"width:507px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-102917.png 866w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-102917-300x136.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-102917-768x349.png 768w\" sizes=\"auto, (max-width: 866px) 100vw, 866px\" \/><\/a><\/figure>\n\n\n<h2 class=\"wp-block-heading\" id=\"dig\">4. dig<\/h2>\n\n\n<p>The &#8216;dig&#8217; command, short for <a href=\"https:\/\/www.spacereg.com\/a.rpl?m=dig\" target=\"_blank\" rel=\"noopener\">Domain Information Groper<\/a>, is a powerful and flexible tool for querying <a href=\"https:\/\/www.techopedia.com\/definition\/28503\/dns-server\" target=\"_blank\" rel=\"noopener\">Domain Name System (DNS) servers<\/a>. &#8216;dig&#8217; provides invaluable insights into DNS-related information, allowing you to perform various tasks related to domain name resolution and DNS troubleshooting.<\/p>\n\n\n\n<p><strong>Prerequisites:-  install<a href=\"https:\/\/www.mankier.com\/package\/bind-utils\" target=\"_blank\" rel=\"noopener\"> bind-utils<\/a><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# dig google.com<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-103338.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"471\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-103338-1024x471.png\" alt=\"dig\n\" class=\"wp-image-2395\" style=\"width:527px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-103338-1024x471.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-103338-300x138.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-103338-768x354.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-103338.png 1060w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n<h2 class=\"wp-block-heading\" id=\"netstat\">5. <strong>netstat<\/strong><\/h2>\n\n\n<p>The netstat command provides a versatile wayto inspect network-related information on a Linux system. These network commands can display information about network connections, routing tables, interface statistics, masquerade connections, and more.<\/p>\n\n\n\n<p><strong>Prerequisities:-  install <a href=\"https:\/\/wiki.linuxfoundation.org\/networking\/net-tools\" target=\"_blank\" rel=\"noopener\">net-tools&nbsp;<\/a><\/strong><\/p>\n\n\n\n<p>The syntax for the netstat command is simple:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>netstat &#91;options]<\/code><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n<h5 class=\"wp-block-heading\" id=\"netstat-a\">      netstat -a<\/h5>\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# netstat -a<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104245.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"846\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104245-1024x846.png\" alt=\"netstat -a\" class=\"wp-image-2397\" style=\"width:548px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104245-1024x846.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104245-300x248.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104245-768x634.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104245.png 1183w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>This command shows all listening and non-listening sockets, including their respective addresses and <a href=\"https:\/\/www.veeble.org\/kb\/commonly-used-port-numbers\/\" target=\"_blank\" rel=\"noopener\">port numbers.<\/a><\/p>\n\n\n<h5 class=\"wp-block-heading\" id=\"netstat-i\">netstat -i<\/h5>\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# netstat -i<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104411.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"129\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104411-1024x129.png\" alt=\"netstat -i\" class=\"wp-image-2398\" style=\"width:596px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104411-1024x129.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104411-300x38.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104411-768x97.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-104411.png 1102w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>This command provides a list of all network interfaces along with statistics for each.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-ed75cf15 wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Take Control with cPanel<\/h3><p class=\"uagb-cta__desc\">Manage every aspect of your website with our intuitive cPanel. From email setup to file management, enjoy complete control. Experience reliable hosting with robust features.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/cpanel-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Explore cPanel Plans<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<h5 class=\"wp-block-heading\" id=\"netstat-tulpen\">netstat -tulpen<\/h5>\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# netstat -tulpen<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/netstat-tulpen.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"112\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/netstat-tulpen-1024x112.png\" alt=\"netstat -tulpen\" class=\"wp-image-2399\" style=\"width:641px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-tulpen-1024x112.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-tulpen-300x33.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-tulpen-768x84.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-tulpen-1536x169.png 1536w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-tulpen.png 1540w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>This command shows all listening TCP and UDP sockets along with the associated process names and PIDs.<\/p>\n\n\n<h5 class=\"wp-block-heading\" id=\"netstat-r\">netstat -r<\/h5>\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# netstat -r<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/netstat-r.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"114\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/netstat-r-1024x114.png\" alt=\"netstat -r\" class=\"wp-image-2400\" style=\"width:668px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-r-1024x114.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-r-300x33.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-r-768x85.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-r.png 1097w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>This command prints the kernel routing table, displaying information about the network routes.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"netstat-s\">netstat -s<\/h3>\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# netstat -s<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/netstat-s.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"887\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/netstat-s-1024x887.png\" alt=\"netstat -s\" class=\"wp-image-2401\" style=\"width:513px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-s-1024x887.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-s-300x260.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-s-768x665.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-s.png 1041w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>This command shows a summary of various network-related statistics, including errors, collisions, and more.<\/p>\n\n\n<h5 class=\"wp-block-heading\" id=\"netstat-an\">netstat -an<\/h5>\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# netstat -an | grep ESTABLISHED<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/netstat-an-grep.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"116\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/netstat-an-grep-1024x116.png\" alt=\"netstat -an\" class=\"wp-image-2402\" style=\"width:580px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-an-grep-1024x116.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-an-grep-300x34.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-an-grep-768x87.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/netstat-an-grep.png 1026w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>This command lists all active established connections, which can be useful for monitoring network activity.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"nslookup\">6. nslookup<\/h2>\n\n\n<p>The nslookup command is a valuable tool to query Domain Name System (DNS) servers and obtain information about domain names, IP addresses, mail exchange records, and more. It assists in troubleshooting DNS-related issues and gaining insights into the domain resolution process.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# nslookup google.com<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/nslookup.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"651\" height=\"220\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/nslookup.png\" alt=\"nslookup\" class=\"wp-image-2403\" style=\"width:488px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/nslookup.png 651w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/nslookup-300x101.png 300w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/a><\/figure>\n\n\n\n<p>To perform a reverse DNS lookup (finding a domain by its IP address):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# nslookup 8.8.8.8<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/nslookup-ip.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"144\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/nslookup-ip.png\" alt=\"nslookup ip\" class=\"wp-image-2404\" style=\"width:498px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/nslookup-ip.png 615w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/nslookup-ip-300x70.png 300w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/a><\/figure>\n\n\n<h2 class=\"wp-block-heading\" id=\"traceroute\">7. traceroute <\/h2>\n\n\n<p>The traceroute command is a powerful tool  to trace the route that packets take through the internet from the source to a specified destination. It helps identify network bottlenecks, latency issues, and provides valuable insights into the path data takes across different routers.<\/p>\n\n\n\n<p>The syntax for the traceroute command is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# traceroute &#91;options] &#91;hostname\/IP]<\/code><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&nbsp;&#91;root@ervintest ~]# traceroute google.com<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-110545.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1830\" height=\"422\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-110545.png\" alt=\"traceroute\" class=\"wp-image-2410\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-110545.png 1830w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-110545-300x69.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-110545-1024x236.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-110545-768x177.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-110545-1536x354.png 1536w\" sizes=\"auto, (max-width: 1830px) 100vw, 1830px\" \/><\/a><\/figure>\n\n\n\n<p>This command traces the route that packets take to reach the domain &#8216;google.com,&#8217; displaying the IP addresses of routers along the way and the time it takes for the packets to travel each hop.<\/p>\n\n\n\n<p>You can also use the -n option to display IP addresses instead of resolving hostnames:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# traceroute -n google.com<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/traceroute.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"994\" height=\"232\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/traceroute.png\" alt=\"traceroute -n\" class=\"wp-image-2409\" style=\"width:565px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/traceroute.png 994w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/traceroute-300x70.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/traceroute-768x179.png 768w\" sizes=\"auto, (max-width: 994px) 100vw, 994px\" \/><\/a><\/figure>\n\n\n<h2 class=\"wp-block-heading\" id=\"tracepath\">8. tracepath<\/h2>\n\n\n<p>The tracepath command is another tool that can be used to trace the route that packets take from the source to a destination. It is similar to traceroute but may have some differences in its output and options.<\/p>\n\n\n\n<p>The syntax for the tracepath command is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tracepath &#91;options] &#91;hostname\/IP]<\/code><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# tracepath google.com<\/code><\/pre>\n\n\n\n<p>This command traces the route to &#8216;google.com,&#8217; displaying the IP addresses of routers along the path and the round-trip time for each hop.<\/p>\n\n\n\n<p>If you prefer to see the hop addresses numerically instead of resolving hostnames, you can use the -n option:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# tracepath -n google.com<\/code><\/pre>\n\n\n\n<p>This can be useful for a quicker overview without waiting for hostname resolution.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"host\">9. host<\/h2>\n\n\n<p>The host command is a versatile tool used to perform DNS lookups and obtain information about domain names, IP addresses, and various DNS records. It is typically available on most Linux distributions.<\/p>\n\n\n\n<p>The syntax for the host command is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>host &#91;options] &#91;hostname\/IP]<\/code><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&nbsp; &#91;root@ervintest ~]# host google.com<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/host.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"905\" height=\"128\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/host.png\" alt=\"host\n\" class=\"wp-image-2414\" style=\"width:642px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/host.png 905w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/host-300x42.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/host-768x109.png 768w\" sizes=\"auto, (max-width: 905px) 100vw, 905px\" \/><\/a><\/figure>\n\n\n\n<p>This command queries the DNS to retrieve information about the domain &#8216;google.com,&#8217; including its IP address.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# host 8.8.8.8<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/host-8.8.8.8.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"835\" height=\"117\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/host-8.8.8.8.png\" alt=\"host ip\" class=\"wp-image-2415\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/host-8.8.8.8.png 835w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/host-8.8.8.8-300x42.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/host-8.8.8.8-768x108.png 768w\" sizes=\"auto, (max-width: 835px) 100vw, 835px\" \/><\/a><\/figure>\n\n\n\n<p>This command performs a reverse DNS lookup for the IP address &#8216;8.8.8.8,&#8217; returning the associated domain names.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"hostnamectl\">10.  hostnamectl<\/h2>\n\n\n<p>The hostnamectl command is part of the systemd system and service manager on Linux. It is used for querying and changing the system hostname and related settings. The hostnamectl is useful for managing the system&#8217;s identity.<\/p>\n\n\n\n<p><strong>Prerequisites:- &nbsp; install <a href=\"https:\/\/systemd.io\/\" target=\"_blank\" rel=\"noopener\">systemd<\/a><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# hostnamectl<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-111643.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"699\" height=\"371\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-111643.png\" alt=\"hostnamectl\" class=\"wp-image-2416\" style=\"width:443px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-111643.png 699w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-111643-300x159.png 300w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/a><\/figure>\n\n\n\n<p>This command provides detailed information about the system hostname, including static and transient settings.<\/p>\n\n\n\n<p>Setting the Hostname:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# hostnamectl set-hostname newhostname<\/code><\/pre>\n\n\n\n<p>Replace &#8220;newhostname&#8221; with the desired hostname. This command updates the system&#8217;s static hostname.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# hostnamectl status<\/code><\/pre>\n\n\n\n<p>This command provides a summary of various system-related information, including the hostname, operating system, architecture, and more.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"nmap\">11. nmap<\/h2>\n\n\n<p>The <a href=\"https:\/\/nmap.org\/\" target=\"_blank\" rel=\"noopener\">nmap <\/a>command is a powerful network scanning tool used to discover hosts and services on a network. It is commonly employed for network reconnaissance, security assessments, and troubleshooting. nmap can provide detailed information about open ports, active services, operating system details, and more.<\/p>\n\n\n\n<p><strong>Prerequesties install <a href=\"https:\/\/nmap.org\/\" target=\"_blank\" rel=\"noopener\">nmap<\/a><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# nmap hostname&nbsp;<\/code><\/pre>\n\n\n\n<p>Example&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# nmap google.com<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113014.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"950\" height=\"294\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113014.png\" alt=\"nmap\n\" class=\"wp-image-2417\" style=\"width:489px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113014.png 950w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113014-300x93.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113014-768x238.png 768w\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><\/a><\/figure>\n\n\n\n<p>This command attempts to discover open ports and services on the target domain.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# nmap -p 80,443 target_host.<\/code><\/pre>\n\n\n\n<p>This command scans only the specified <a href=\"https:\/\/www.veeble.org\/kb\/commonly-used-port-numbers\/\" target=\"_blank\" rel=\"noopener\">ports <\/a>(in this case, ports 80 and 443).<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"tcpdump\">12. tcpdump<\/h2>\n\n\n<p>The tcpdump command is a packet analyzer commonly used to capture and analyze network traffic on a Linux system. It allows for real-time packet monitoring, protocol analysis, and troubleshooting network-related issues. <\/p>\n\n\n\n<p><strong>Here are some basic examples of using the tcpdump command:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# tcpdump -i eth0<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113520.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"229\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113520-1024x229.png\" alt=\"tcpdump -i\" class=\"wp-image-2418\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113520-1024x229.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113520-300x67.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113520-768x171.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113520-1536x343.png 1536w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-113520.png 1891w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Replace &#8220;eth0&#8221; with the name of the network interface you want to monitor. This command captures and displays live traffic on the specified interface.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&nbsp;&#91;root@ervintest ~]# tcpdump -i eth0 port 80<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121307.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"433\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121307-1024x433.png\" alt=\"tcpdump port\" class=\"wp-image-2420\" style=\"width:400px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121307-1024x433.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121307-300x127.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121307-768x325.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121307.png 1490w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>This command captures traffic on port 80. You can replace &#8220;80&#8221; with the desired <a href=\"https:\/\/www.veeble.org\/kb\/commonly-used-port-numbers\/\" target=\"_blank\" rel=\"noopener\">port number<\/a>.<\/p>\n\n\n\n<p><strong>Capture Traffic for a Specific IP Address:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]#&nbsp;tcpdump host 66.85.185.123<\/code><\/pre>\n\n\n\n<p>Replace &#8220;66.85.185.123&#8221; with the IP address you want to monitor. This command captures traffic to and from the specified IP address.<\/p>\n\n\n\n<p><strong>Capture Traffic for a Specific Protocol<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# tcpdump -i eth0 icmp<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121440.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"219\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121440.png\" alt=\"tcpdump -i icmp\" class=\"wp-image-2421\" style=\"width:567px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121440.png 960w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121440-300x68.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121440-768x175.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/a><\/figure>\n\n\n\n<p>This command captures ICMP (ping) traffic on the specified interface.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"iftop\">13. iftop<\/h2>\n\n\n<p>The iftop command is a real-time console-based network bandwidth monitoring tool for Linux. It provides a visual representation of network traffic on an interface, displaying a list of connections and their corresponding data rates. iftop is useful to quickly identify bandwidth-intensive processes and monitor network activity.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>iftop &#91;options]<\/code><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p><strong>Monitor Traffic on a Specific Interface:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# iftop -i eth0<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121858.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"545\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121858-1024x545.png\" alt=\"iftop\" class=\"wp-image-2423\" style=\"width:498px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121858-1024x545.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121858-300x160.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121858-768x409.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121858-1536x818.png 1536w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-121858.png 1726w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Replace &#8220;eth0&#8221; with the name of the network interface you want to monitor. This command launches iftop and displays a live, updating list of connections along with their data rates.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"arp\">14. arp<\/h2>\n\n\n<p>The arp command is used to display and manipulate the Address Resolution Protocol (ARP) cache on a system. The ARP cache is a table that stores mappings between IP addresses and their corresponding hardware (MAC) addresses on a local network. We often use the arp command to inspect and manage these mappings.<\/p>\n\n\n\n<p>Syntax: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>arp &#91;options] &#91;hostname\/IP]<\/code><\/pre>\n\n\n\n<p>This command shows the contents of the ARP cache, including the IP addresses and corresponding MAC addresses.<\/p>\n\n\n\n<p><strong>Display the ARP Cache for a Specific Interface:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# arp -i eth0<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-123208.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"107\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-123208-1024x107.png\" alt=\"arp\" class=\"wp-image-2424\" style=\"width:566px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-123208-1024x107.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-123208-300x31.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-123208-768x80.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-123208.png 1119w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Replace &#8220;eth0&#8221; with the name of the network interface. This command displays the ARP cache for the specified interface.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"ss\">15. ss<\/h2>\n\n\n<p>The <code>ss<\/code> command is a powerful utility used in Linux and Unix-like operating systems for displaying detailed information about network sockets, connections, and statistics.<\/p>\n\n\n\n<p>Syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ss &#91;options]\n<\/code><\/pre>\n\n\n\n<p>Some common options for the <code>ss<\/code> command include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-t<\/code>: Display TCP sockets.<\/li>\n\n\n\n<li><code>-u<\/code>: Display UDP sockets.<\/li>\n\n\n\n<li><code>-a<\/code>: Display all sockets (both listening and non-listening).<\/li>\n\n\n\n<li><code>-n<\/code>: Show numerical addresses (don&#8217;t resolve hostnames).<\/li>\n\n\n\n<li><code>-p<\/code>: Show the process using the socket.<\/li>\n\n\n\n<li><code>-l<\/code>: Display listening sockets.<\/li>\n\n\n\n<li><code>-s<\/code>: Display summary statistics.<\/li>\n\n\n\n<li><code>-H<\/code>: Display header information.<\/li>\n\n\n\n<li><code>-r<\/code>: Display routing information.<\/li>\n\n\n\n<li><code>-h<\/code>: Display help information.<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ss -t<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-155718.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"939\" height=\"95\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-155718.png\" alt=\"\" class=\"wp-image-2437\" style=\"width:623px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-155718.png 939w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-155718-300x30.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-12-155718-768x78.png 768w\" sizes=\"auto, (max-width: 939px) 100vw, 939px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Understanding and effectively utilizing these commands will enhance your ability to manage and troubleshoot networking issues on Linux servers. Regular practice and familiarity with these tools are crucial for maintaining a robust and secure network infrastructure.<br>You can find more useful linux commands <a href=\"https:\/\/www.veeble.org\/kb\/linux-commands-gist\/#News.2FNetworks\" target=\"_blank\" rel=\"noopener\">here<\/a>. <\/p>\n<\/blockquote>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-77c6d188 wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Boost Your Online Presence<\/h3><p class=\"uagb-cta__desc\">Elevate your website with our powerful cPanel hosting. Enjoy seamless management, robust security, and reliable performance. Take your online presence to the next level.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/cpanel-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Choose Your Plan<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Proficiency in Linux network commands is essential for maintaining and troubleshooting network configurations for any network admin on server admin. These commands empower to [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":8592,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2390","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies.jpg",1536,1024,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies-300x200.jpg",300,200,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies-768x512.jpg",768,512,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies-1024x683.jpg",1024,683,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies.jpg",1536,1024,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/15-Basic-Linux-Network-Commands-for-Newbies.jpg",1536,1024,false]},"uagb_author_info":{"display_name":"Nayana Nair","author_link":"https:\/\/www.veeble.com\/kb\/author\/nayana\/"},"uagb_comment_info":0,"uagb_excerpt":"Proficiency in Linux network commands is essential for maintaining and troubleshooting network configurations for any network admin on server admin. These commands empower to [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=2390"}],"version-history":[{"count":18,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2390\/revisions"}],"predecessor-version":[{"id":8699,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2390\/revisions\/8699"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/8592"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=2390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=2390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=2390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}