{"id":783,"date":"2024-11-28T13:34:25","date_gmt":"2024-11-28T13:34:25","guid":{"rendered":"https:\/\/www.xopsschool.com\/tutorials\/?p=783"},"modified":"2024-11-28T13:34:25","modified_gmt":"2024-11-28T13:34:25","slug":"linux-commands-to-troubleshoot-network-issues","status":"publish","type":"post","link":"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/","title":{"rendered":"Linux Commands to Troubleshoot Network Issues"},"content":{"rendered":"\n<p><strong>1.\u00a0Ping :<\/strong> Check connectivity to another host.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ping google.com\r\n<\/code><\/pre>\n\n\n\n<p><strong>2. ifconfig : <\/strong>View and configure network interface parameters.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ifconfig\r\n<\/code><\/pre>\n\n\n\n<p><strong>3. ip : <\/strong>Modern replacement for <code>ifconfig<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ip a<\/code><\/pre>\n\n\n\n<p><strong>4. Traceroute : <\/strong>Trace the route packets take to a host.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>traceroute google.com\r\n<\/code><\/pre>\n\n\n\n<p><strong>5. Tracepath : <\/strong>Similar to traceroute but does not require superuser privileges. It identifies the path to a network host.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tracepath google.com<\/code><\/pre>\n\n\n\n<p><strong>6. netstat : <\/strong>Display network connections, routing tables, and more<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>netstat -a\r\n<\/code><\/pre>\n\n\n\n<p><strong>7. ss :<\/strong> Similar to <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-color\"><code>netstat<\/code> <\/mark>but faster.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ss -t\r\n<\/code><\/pre>\n\n\n\n<p><strong>8. dig :<\/strong> Advanced DNS query tool<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dig google.com\r\n<\/code><\/pre>\n\n\n\n<p><strong>9. nslookup : <\/strong>Query DNS servers for DNS information<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nslookup google.com\r\n<\/code><\/pre>\n\n\n\n<p><strong>10. Route :<\/strong> View and manipulate the IP routing table.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>route -n<\/code><\/pre>\n\n\n\n<p><strong>11. ARP :<\/strong> Display and modify the ARP cache, which maps IP addresses to MAC addresses.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>arp -a<\/code><\/pre>\n\n\n\n<p><strong>12. curl \/ wget : <\/strong>Fetch data from web servers; both can be used to check connectivity to web services.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -I http:\/\/example.com<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget http:\/\/example.com<\/code><\/pre>\n\n\n\n<p><strong>13. journalctl : <\/strong>View system logs for networking-related messages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>journalctl -u NetworkManager\r\n<\/code><\/pre>\n\n\n\n<p><strong>14. systemctl : <\/strong>Manage and check the status of network services.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status NetworkManager\r\n<\/code><\/pre>\n\n\n\n<p><strong>15. ethtool :<\/strong> Display and modify Ethernet device settings.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ethtool eth0\r\n<\/code><\/pre>\n\n\n\n<p><strong>16. ufw :<\/strong> Check and manage firewall rules.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw status\r\n<\/code><\/pre>\n\n\n\n<p><strong>17. iftop :<\/strong> Monitor real-time network traffic usage.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>iftop<\/code><\/pre>\n\n\n\n<p><strong>18. lsof <\/strong>: List open files, including network sockets.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsof -i :80\r\n<\/code><\/pre>\n\n\n\n<p><strong>19. tcpdump : <\/strong>Capture and analyze network packets.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tcpdump -i eth0 port 80\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1.\u00a0Ping : Check connectivity to another host. 2. ifconfig : View and configure network interface parameters. 3. ip : Modern replacement for ifconfig. 4. Traceroute : Trace the route packets take to a host. 5. Tracepath : Similar to traceroute but does not require superuser privileges. It identifies the path to a network host. 6. &#8230; <a title=\"Linux Commands to Troubleshoot Network Issues\" class=\"read-more\" href=\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/\" aria-label=\"Read more about Linux Commands to Troubleshoot Network Issues\">Read more<\/a><\/p>\n","protected":false},"author":200020,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-783","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Linux Commands to Troubleshoot Network Issues - XOps Tutorials!!!<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux Commands to Troubleshoot Network Issues - XOps Tutorials!!!\" \/>\n<meta property=\"og:description\" content=\"1.\u00a0Ping : Check connectivity to another host. 2. ifconfig : View and configure network interface parameters. 3. ip : Modern replacement for ifconfig. 4. Traceroute : Trace the route packets take to a host. 5. Tracepath : Similar to traceroute but does not require superuser privileges. It identifies the path to a network host. 6. ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/\" \/>\n<meta property=\"og:site_name\" content=\"XOps Tutorials!!!\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-28T13:34:25+00:00\" \/>\n<meta name=\"author\" content=\"Pritesh Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pritesh Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/\"},\"author\":{\"name\":\"Pritesh Kumar\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1\"},\"headline\":\"Linux Commands to Troubleshoot Network Issues\",\"datePublished\":\"2024-11-28T13:34:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/\"},\"wordCount\":162,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/\",\"name\":\"Linux Commands to Troubleshoot Network Issues - XOps Tutorials!!!\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\"},\"datePublished\":\"2024-11-28T13:34:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.xopsschool.com\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux Commands to Troubleshoot Network Issues\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/\",\"name\":\"XOps Tutorials!!!\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1\",\"name\":\"Pritesh Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g\",\"caption\":\"Pritesh Kumar\"},\"description\":\"Devops Engineer at Cotocus pvt.ltd\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/author\/priteshcotocus\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux Commands to Troubleshoot Network Issues - XOps Tutorials!!!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/","og_locale":"en_US","og_type":"article","og_title":"Linux Commands to Troubleshoot Network Issues - XOps Tutorials!!!","og_description":"1.\u00a0Ping : Check connectivity to another host. 2. ifconfig : View and configure network interface parameters. 3. ip : Modern replacement for ifconfig. 4. Traceroute : Trace the route packets take to a host. 5. Tracepath : Similar to traceroute but does not require superuser privileges. It identifies the path to a network host. 6. ... Read more","og_url":"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/","og_site_name":"XOps Tutorials!!!","article_published_time":"2024-11-28T13:34:25+00:00","author":"Pritesh Kumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pritesh Kumar","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/#article","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/"},"author":{"name":"Pritesh Kumar","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1"},"headline":"Linux Commands to Troubleshoot Network Issues","datePublished":"2024-11-28T13:34:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/"},"wordCount":162,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/","url":"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/","name":"Linux Commands to Troubleshoot Network Issues - XOps Tutorials!!!","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#website"},"datePublished":"2024-11-28T13:34:25+00:00","author":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1"},"breadcrumb":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.xopsschool.com\/tutorials\/linux-commands-to-troubleshoot-network-issues\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.xopsschool.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Linux Commands to Troubleshoot Network Issues"}]},{"@type":"WebSite","@id":"https:\/\/www.xopsschool.com\/tutorials\/#website","url":"https:\/\/www.xopsschool.com\/tutorials\/","name":"XOps Tutorials!!!","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1","name":"Pritesh Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g","caption":"Pritesh Kumar"},"description":"Devops Engineer at Cotocus pvt.ltd","url":"https:\/\/www.xopsschool.com\/tutorials\/author\/priteshcotocus\/"}]}},"_links":{"self":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/users\/200020"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/comments?post=783"}],"version-history":[{"count":1,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/783\/revisions"}],"predecessor-version":[{"id":787,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/783\/revisions\/787"}],"wp:attachment":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/media?parent=783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/categories?post=783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/tags?post=783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}