{"id":238,"date":"2025-01-09T05:15:00","date_gmt":"2025-01-09T05:15:00","guid":{"rendered":"https:\/\/texarxs.com\/blog\/?p=238"},"modified":"2026-07-03T05:35:42","modified_gmt":"2026-07-03T05:35:42","slug":"macos-command-line-basics-part-7-network-commands","status":"publish","type":"post","link":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/","title":{"rendered":"macOS Command Line Basics &#8211; Part 7: Network Commands"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1-1024x576.png\" alt=\"\" class=\"wp-image-239\" style=\"width:576px;height:auto\" srcset=\"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1-1024x576.png 1024w, https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1-300x169.png 300w, https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1-768x432.png 768w, https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1.png 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Managing network settings and configurations on macOS can be a straightforward process with the right commands. Here\u2019s a detailed guide on essential network commands that can help troubleshoot, configure, and optimize your macOS network settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><br><strong>networksetup:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>networksetup<\/em><\/strong> command is a <strong>powerful command-line utility<\/strong> on macOS that allows users to manage and configure network settings. It provides control over network interfaces, locations, and configurations, making it a valuable tool for system administrators and advanced users who need to script or automate network configuration tasks. Visit man <strong>networksetup<\/strong> will page for all the attributes for the command.<br><br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>List Network Services:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Display all available network services on the system (e.g., Wi-Fi, Ethernet, Thunderbolt).<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><br>$ networksetup -listallnetworkservices<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">USB 10\/100\/1000 LAN<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thunderbolt Bridge<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wi-Fi<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Configure Manual IP Address:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Set a static IP address, subnet mask, and router for a specific network service.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ networksetup -setmanual &#8220;Wi-Fi&#8221; 192.168.1.154 255.255.255.0 192.168.1.1<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Configure DHCP:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Set a static IP address, subnet mask, and router for a specific network service.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ networksetup -setdhcp &#8220;Wi-Fi&#8221;<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Set DNS Servers<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Specify DNS servers for a network service.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ networksetup -setdnsservers &#8220;Wi-Fi&#8221; 8.8.8.8 8.8.4.4<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Get MAC Address<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Displays ethernet (or Wi-Fi) address for hardware port or device specified.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ networksetup -getmacaddress &#8220;Wi-Fi&#8221;<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Connect to a Wi-Fi Network:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Join a Wi-Fi network with a specified SSID and password.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ networksetup -setairportnetwork en0 &#8220;NetworkName&#8221; &#8220;Password&#8221;<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Enable or Disable Network Services:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Turn a network service on or off.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ networksetup -setnetworkserviceenabled &#8220;Wi-Fi&#8221; on<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ networksetup -setnetworkserviceenabled &#8220;Wi-Fi&#8221; off<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><br><strong>Notes<\/strong>:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Administrative Privileges:<\/strong> Many networksetup commands require administrative privileges, so you may need to use sudo.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><strong>Scripting<\/strong>: The command is highly useful for scripting network configurations, especially in environments where network settings change frequently or need to be managed across multiple devices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>The <strong><em>networksetup<\/em><\/strong> utility is an essential tool for detailed network management on macOS, offering more granular control than the graphical interface in System Preferences.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><br><strong>Get Active Interface Name<\/strong><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">activeInterface=$(route get default | grep interface | awk &#8216;{print $2}&#8217;)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">echo $activeInterface<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output: (Depends on your active interface)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">en0<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><br><strong>ifconfig:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>ifconfig<\/em><\/strong> (interface configuration) command is a network utility in Unix-like operating systems, including macOS, used for configuring, managing, and querying network interfaces. It provides a range of functionalities that help administrators and users control network connections and troubleshoot network issues.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Get information about the interface<\/strong><\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ ifconfig en0&nbsp; #Use variable to pass Active Interface Name (Ex: ifconfig $activeInterface)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">en0: flags=8863&lt;UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; options=6460&lt;TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ether 01:b1:f4:c1:70:e4<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet6 fe22::ce6:f8b3:e818:1234%en0 prefixlen 64 secured scopeid 0xe<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet 192.168.4.32 netmask 0xfffff800 broadcast 255.255.0.0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nd6 options=201&lt;PERFORMNUD,DAD&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; media: autoselect<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status: active<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Enable or Disable an interface:<\/strong><\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ sudo ifconfig en0 up&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ sudo ifconfig en0 down<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><\/h3>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>ipconfig:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>ipconfig<\/em><\/strong> command in macOS is used to manage and retrieve network configuration details for various network interfaces. It is similar in purpose to <strong>ifconfig<\/strong> but provides different functionality, particularly around dynamic IP addressing and DHCP information.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Get the IP Address of an Interface:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To display the current IP address assigned to a specific interface (e.g., en0):<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ ipconfig getifaddr en0<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Get the Subnet Mask:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To retrieve the subnet mask for an interface:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ ipconfig getoption en0 subnet_mask<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>View DHCP Lease Information:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To get detailed information about the DHCP lease for an interface:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ ipconfig getpacket en0<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><br><strong>ping:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>ping<\/em><\/strong> command in macOS is a network utility used to test the connectivity between your machine and a specified host. It helps in diagnosing network issues by sending a series of ICMP echo requests to the target and waiting for responses.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Continuous ping for a host<\/strong><\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ ping google.com<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Ping a host with a delay. (default is 1 sec)<\/strong><\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ ping -i 5 google.com<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Ping a host a specific number of times:<\/strong><\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">$ ping -c 5 google.com<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Follow <a href=\"https:\/\/www.linkedin.com\/company\/texarxs\/\"><strong>TexArxs<\/strong><\/a> more insights on macOS management, security, and more!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Managing network settings and configurations on macOS can be a straightforward process with the right commands. Here\u2019s a detailed guide on essential network commands that can help troubleshoot,\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[1],"tags":[9,18,155,71,11,4,12,156,154],"class_list":["post-238","post","type-post","status-publish","format-standard","hentry","category-apple","tag-apple-it","tag-apple-security","tag-cli-commands","tag-mac-enpoint-security","tag-macadmins","tag-macos","tag-macos-management","tag-macos-terminal","tag-shell-commands"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>macOS Command Line Basics - Part 7: Network Commands - TexArxs Blog<\/title>\n<meta name=\"description\" content=\"Master macOS terminal network commands \u2014 ping, traceroute, nslookup, ifconfig, curl, and netstat explained with practical examples for admins\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"macOS Command Line Basics - Part 7: Network Commands - TexArxs Blog\" \/>\n<meta property=\"og:description\" content=\"Master macOS terminal network commands \u2014 ping, traceroute, nslookup, ifconfig, curl, and netstat explained with practical examples for admins\" \/>\n<meta property=\"og:url\" content=\"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"TexArxs Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-09T05:15:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-03T05:35:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"TexArxs\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TexArxs\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/\"},\"author\":{\"name\":\"TexArxs\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#\\\/schema\\\/person\\\/b577b4a39267cc9fbc17b1d921a162b0\"},\"headline\":\"macOS Command Line Basics &#8211; Part 7: Network Commands\",\"datePublished\":\"2025-01-09T05:15:00+00:00\",\"dateModified\":\"2026-07-03T05:35:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/\"},\"wordCount\":735,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/1736351444513-1-1024x576.png\",\"keywords\":[\"Apple IT\",\"Apple Security\",\"CLI Commands\",\"Mac Enpoint Security\",\"MacAdmins\",\"macOS\",\"macOS Management\",\"macOS Terminal\",\"shell commands\"],\"articleSection\":[\"Apple\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/\",\"url\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/\",\"name\":\"macOS Command Line Basics - Part 7: Network Commands - TexArxs Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/1736351444513-1-1024x576.png\",\"datePublished\":\"2025-01-09T05:15:00+00:00\",\"dateModified\":\"2026-07-03T05:35:42+00:00\",\"description\":\"Master macOS terminal network commands \u2014 ping, traceroute, nslookup, ifconfig, curl, and netstat explained with practical examples for admins\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/#primaryimage\",\"url\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/1736351444513-1.png\",\"contentUrl\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/1736351444513-1.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-7-network-commands\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"macOS Command Line Basics &#8211; Part 7: Network Commands\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/\",\"name\":\"TexArxs Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#organization\",\"name\":\"TexArxs\",\"url\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/TexArxs-01.png\",\"contentUrl\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/TexArxs-01.png\",\"width\":2084,\"height\":1251,\"caption\":\"TexArxs\"},\"image\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/texarxs\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#\\\/schema\\\/person\\\/b577b4a39267cc9fbc17b1d921a162b0\",\"name\":\"TexArxs\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7250d49763068777a6a9d21e072aedd7e2310eed60ac7048e3cdd4d84c02ca53?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7250d49763068777a6a9d21e072aedd7e2310eed60ac7048e3cdd4d84c02ca53?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7250d49763068777a6a9d21e072aedd7e2310eed60ac7048e3cdd4d84c02ca53?s=96&d=mm&r=g\",\"caption\":\"TexArxs\"},\"url\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/author\\\/priyatexarxs-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"macOS Command Line Basics - Part 7: Network Commands - TexArxs Blog","description":"Master macOS terminal network commands \u2014 ping, traceroute, nslookup, ifconfig, curl, and netstat explained with practical examples for admins","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:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/","og_locale":"en_US","og_type":"article","og_title":"macOS Command Line Basics - Part 7: Network Commands - TexArxs Blog","og_description":"Master macOS terminal network commands \u2014 ping, traceroute, nslookup, ifconfig, curl, and netstat explained with practical examples for admins","og_url":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/","og_site_name":"TexArxs Blog","article_published_time":"2025-01-09T05:15:00+00:00","article_modified_time":"2026-07-03T05:35:42+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1.png","type":"image\/png"}],"author":"TexArxs","twitter_card":"summary_large_image","twitter_misc":{"Written by":"TexArxs","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/#article","isPartOf":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/"},"author":{"name":"TexArxs","@id":"https:\/\/texarxs.com\/blog\/#\/schema\/person\/b577b4a39267cc9fbc17b1d921a162b0"},"headline":"macOS Command Line Basics &#8211; Part 7: Network Commands","datePublished":"2025-01-09T05:15:00+00:00","dateModified":"2026-07-03T05:35:42+00:00","mainEntityOfPage":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/"},"wordCount":735,"commentCount":0,"publisher":{"@id":"https:\/\/texarxs.com\/blog\/#organization"},"image":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1-1024x576.png","keywords":["Apple IT","Apple Security","CLI Commands","Mac Enpoint Security","MacAdmins","macOS","macOS Management","macOS Terminal","shell commands"],"articleSection":["Apple"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/","url":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/","name":"macOS Command Line Basics - Part 7: Network Commands - TexArxs Blog","isPartOf":{"@id":"https:\/\/texarxs.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/#primaryimage"},"image":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1-1024x576.png","datePublished":"2025-01-09T05:15:00+00:00","dateModified":"2026-07-03T05:35:42+00:00","description":"Master macOS terminal network commands \u2014 ping, traceroute, nslookup, ifconfig, curl, and netstat explained with practical examples for admins","breadcrumb":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/#primaryimage","url":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1.png","contentUrl":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/07\/1736351444513-1.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-7-network-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/texarxs.com\/blog\/"},{"@type":"ListItem","position":2,"name":"macOS Command Line Basics &#8211; Part 7: Network Commands"}]},{"@type":"WebSite","@id":"https:\/\/texarxs.com\/blog\/#website","url":"https:\/\/texarxs.com\/blog\/","name":"TexArxs Blog","description":"","publisher":{"@id":"https:\/\/texarxs.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/texarxs.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/texarxs.com\/blog\/#organization","name":"TexArxs","url":"https:\/\/texarxs.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/texarxs.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/TexArxs-01.png","contentUrl":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/TexArxs-01.png","width":2084,"height":1251,"caption":"TexArxs"},"image":{"@id":"https:\/\/texarxs.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/texarxs"]},{"@type":"Person","@id":"https:\/\/texarxs.com\/blog\/#\/schema\/person\/b577b4a39267cc9fbc17b1d921a162b0","name":"TexArxs","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7250d49763068777a6a9d21e072aedd7e2310eed60ac7048e3cdd4d84c02ca53?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7250d49763068777a6a9d21e072aedd7e2310eed60ac7048e3cdd4d84c02ca53?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7250d49763068777a6a9d21e072aedd7e2310eed60ac7048e3cdd4d84c02ca53?s=96&d=mm&r=g","caption":"TexArxs"},"url":"https:\/\/texarxs.com\/blog\/author\/priyatexarxs-com\/"}]}},"_links":{"self":[{"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/posts\/238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/comments?post=238"}],"version-history":[{"count":1,"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/posts\/238\/revisions"}],"predecessor-version":[{"id":240,"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/posts\/238\/revisions\/240"}],"wp:attachment":[{"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/media?parent=238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/categories?post=238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/tags?post=238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}