{"id":216,"date":"2024-11-19T09:29:00","date_gmt":"2024-11-19T09:29:00","guid":{"rendered":"https:\/\/texarxs.com\/blog\/?p=216"},"modified":"2026-07-03T05:09:01","modified_gmt":"2026-07-03T05:09:01","slug":"macos-command-line-basics-part-2-hands-on-with-terminal","status":"publish","type":"post","link":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/","title":{"rendered":"macOS Command Line Basics &#8211; Part 2: Hands-On with Terminal"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"609\" height=\"342\" src=\"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/image-18.png\" alt=\"\" class=\"wp-image-217\" style=\"width:551px;height:auto\" srcset=\"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/image-18.png 609w, https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/image-18-300x168.png 300w\" sizes=\"(max-width: 609px) 100vw, 609px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The Terminal app on macOS is a powerful interface for controlling your Mac using the command-line environment. Whether you&#8217;re a developer, IT admin, or just curious about the command line, Terminal offers robust features for executing commands, managing files, and automating tasks. Here&#8217;s a comprehensive guide to using Terminal effectively.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Using the Command-Line Environment<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The command line can be used in two ways:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Interactively<\/strong>: Type a command, wait for the result, and continue.<\/li>\n\n\n\n<li><strong>Through Scripts<\/strong>: Write scripts that execute multiple commands without direct interaction.<br><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Execute Commands in the Shell<\/strong><\/h3>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Open Terminal<\/strong>: Launch the Terminal app on your Mac.<\/li>\n\n\n\n<li><strong>Enter a Command<\/strong>: Type the full path to the executable, followed by required arguments, and press <strong>Return<\/strong>.<\/li>\n\n\n\n<li><strong>Omitting Paths<\/strong>: If the command is in a folder listed in the&nbsp;PATH&nbsp;environment variable, you can omit the full path.<\/li>\n\n\n\n<li><strong>Troubleshooting<\/strong>: If you encounter&nbsp;command not found, double-check the command spelling.<br><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Terminate Commands<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To stop a running command:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Click the Terminal window where the command is running.<\/li>\n\n\n\n<li>Press <strong>Control-C<\/strong> to terminate it.<br><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Repeating Commands<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Terminal remembers commands entered in a session. To reuse a previous command:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Press the <strong>Up Arrow<\/strong> key to navigate through your command history.<\/li>\n\n\n\n<li>Press <strong>Return<\/strong> to execute the selected command.<br><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Specify Files and Folders<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most commands operate on files and folders identified by their <strong>paths<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use\/&nbsp;to separate folder names.<\/li>\n\n\n\n<li>Shortcuts:<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<strong>&nbsp;. <\/strong>&nbsp;: Current folder.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;<strong>&nbsp;..<\/strong> : Parent folder.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&nbsp;~ (<\/strong>Tilde) : Home folder of the logged-in user.<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example<\/strong>:<br><\/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\">~\/Documents\/Home.txt<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Special Cases<\/strong>:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For paths with spaces, use quotes or escape characters:<br><\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">&#8220;Home Folder&#8221;&nbsp;or Home\\ Folder<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Redirect Input and Output<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Redirect data to and from commands for advanced control:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use&nbsp;&gt;&nbsp;to write output to a file:<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">% ls &gt; redirectedoutput.txt<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use&nbsp;&gt;&gt;&nbsp;to append the output to a file:<\/li>\n<\/ul>\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; ls &gt;&gt; appendoutput.txt<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use&nbsp;&lt;&nbsp;(<strong>Input Redirection<\/strong>)to read input from a file:<\/li>\n<\/ul>\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;sort&nbsp;&lt; sendinputtocommand.txt<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use&nbsp;|&nbsp;(Pipe) to connect commands:<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">% man zsh | grep commands<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use&nbsp;!<strong>!<\/strong> to re-run the previous commands. You can use with other commands like <strong><em>sudo !!<\/em><\/strong> to run the previous command with sudo privileges:<\/li>\n<\/ul>\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 !!<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><br>Command Execution Operators<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <strong>&amp; (Background Execution)<\/strong> to execute command <strong>in the background<\/strong>, allowing the shell to continue executing other commands without waiting for the first command to finish. The shell runs the command in the background and returns control to the user or continues executing subsequent commands without waiting for the background process to complete.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">% command &amp;<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <strong>&amp;&amp;<\/strong> (<strong>Logical AND<\/strong>) to execute two or more commands sequentially, ensuring that the subsequent commands run only if the preceding one succeeds (i.e., exits with a status code of 0). The shell runs command1 first. If\u00a0command1\u00a0succeeds (exit status\u00a00),\u00a0the shell runs command2 \/ the shell skips command2. If any command fails (non-zero exit status), the subsequent commands will not be executed.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">% command1 &amp;&amp; command2<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use ||<strong> (Logical OR<\/strong>) to execute a second command only if the first command <strong>fails<\/strong> (exits with a non-zero status). command1\u00a0is executed first. command1\u00a0fails (non-zero exit status), then\u00a0the shell runs command2 \/ the shell skips command2. If\u00a0command1\u00a0succeeds (exit status 0),\u00a0command2\u00a0is skipped.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">% command1 ||&nbsp; command2<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use ;<strong> (Sequential Execution<\/strong>) to execute multiple commands sequentially, <strong>regardless of whether the previous command succeeds or fails<\/strong>. command1\u00a0is executed first. Once\u00a0command1\u00a0finishes (regardless of its success or failure),\u00a0the shell runs command2 \/ the shell skips command2. This process continues with the remaining commands.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">% command1 ; command2 ; command3<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li>$?\u00a0is a special variable that holds the <strong>exit status<\/strong> of the last executed command. An exit status of 0 means success. A non-zero exit status means failure (usually 1, but commands vary). Use $? for debugging, conditional logic, and error handling in scripts.<br><\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">% echo $?<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\"><br><strong>Tips:<\/strong> Use these commands to execute multiple actions in a single line. For example, With <strong>File and Processes<\/strong> payload of a Jamf policy.<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Single-line comment<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use&nbsp;#&nbsp;at the beginning of the line.<\/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\"># This is a single-line comment<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">echo &#8220;Hello, World!&#8221;<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Multi-line comment:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use&nbsp;: &#8216; &#8216;. Everything inside the quotes will be ignored.<\/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\">: &#8216;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is a multi-line comment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It spans multiple lines.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8216;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">echo &#8220;Hello, World!&#8221;<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>Drag Items into Terminal<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Save time by dragging files or text snippets into Terminal:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Drag a file or folder to insert its absolute path.<\/li>\n\n\n\n<li>Drag an executable file and press <strong>Return<\/strong> to run it.<\/li>\n\n\n\n<li>Drag text clippings to include their contents.<br><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Explore More<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For additional commands and usage tips, check out the <a href=\"https:\/\/developer.apple.com\/library\/archive\/documentation\/OpenSource\/Conceptual\/ShellScripting\/CommandLInePrimer\/CommandLine.html\"><strong>Command&nbsp;Line&nbsp;Primer<\/strong><\/a> or refer to the&nbsp;zsh&nbsp;man page for details on advanced features.<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Follow <\/strong><a href=\"https:\/\/www.linkedin.com\/company\/texarxs\/\"><strong>TexArxs<\/strong><\/a> <strong>more tips on mastering macOS Command Lines.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Terminal app on macOS is a powerful interface for controlling your Mac using the command-line environment. Whether you&#8217;re a developer, IT admin, or just curious about the\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,147,11,4,149,146,151],"class_list":["post-216","post","type-post","status-publish","format-standard","hentry","category-apple","tag-apple-it","tag-apple-security","tag-mac-terminal","tag-macadmins","tag-macos","tag-macos-cli","tag-macos-command-line","tag-macos-terminal-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 2: Hands-On with Terminal - TexArxs Blog<\/title>\n<meta name=\"description\" content=\"Practice essential macOS terminal commands with hands-on examples \u2014 file navigation, directory management, and real workflows for developers.\" \/>\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-2-hands-on-with-terminal\/\" \/>\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 2: Hands-On with Terminal - TexArxs Blog\" \/>\n<meta property=\"og:description\" content=\"Practice essential macOS terminal commands with hands-on examples \u2014 file navigation, directory management, and real workflows for developers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/\" \/>\n<meta property=\"og:site_name\" content=\"TexArxs Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-19T09:29:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-03T05:09:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/image-18.png\" \/>\n\t<meta property=\"og:image:width\" content=\"609\" \/>\n\t<meta property=\"og:image:height\" content=\"342\" \/>\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=\"4 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-2-hands-on-with-terminal\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/\"},\"author\":{\"name\":\"TexArxs\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#\\\/schema\\\/person\\\/b577b4a39267cc9fbc17b1d921a162b0\"},\"headline\":\"macOS Command Line Basics &#8211; Part 2: Hands-On with Terminal\",\"datePublished\":\"2024-11-19T09:29:00+00:00\",\"dateModified\":\"2026-07-03T05:09:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/\"},\"wordCount\":780,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/image-18.png\",\"keywords\":[\"Apple IT\",\"Apple Security\",\"Mac Terminal\",\"MacAdmins\",\"macOS\",\"macOS CLI\",\"macOS Command Line\",\"macOS Terminal commands\"],\"articleSection\":[\"Apple\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/\",\"url\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/\",\"name\":\"macOS Command Line Basics - Part 2: Hands-On with Terminal - TexArxs Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/image-18.png\",\"datePublished\":\"2024-11-19T09:29:00+00:00\",\"dateModified\":\"2026-07-03T05:09:01+00:00\",\"description\":\"Practice essential macOS terminal commands with hands-on examples \u2014 file navigation, directory management, and real workflows for developers.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/#primaryimage\",\"url\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/image-18.png\",\"contentUrl\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/image-18.png\",\"width\":609,\"height\":342},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/macos-command-line-basics-part-2-hands-on-with-terminal\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/texarxs.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"macOS Command Line Basics &#8211; Part 2: Hands-On with Terminal\"}]},{\"@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 2: Hands-On with Terminal - TexArxs Blog","description":"Practice essential macOS terminal commands with hands-on examples \u2014 file navigation, directory management, and real workflows for developers.","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-2-hands-on-with-terminal\/","og_locale":"en_US","og_type":"article","og_title":"macOS Command Line Basics - Part 2: Hands-On with Terminal - TexArxs Blog","og_description":"Practice essential macOS terminal commands with hands-on examples \u2014 file navigation, directory management, and real workflows for developers.","og_url":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/","og_site_name":"TexArxs Blog","article_published_time":"2024-11-19T09:29:00+00:00","article_modified_time":"2026-07-03T05:09:01+00:00","og_image":[{"width":609,"height":342,"url":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/image-18.png","type":"image\/png"}],"author":"TexArxs","twitter_card":"summary_large_image","twitter_misc":{"Written by":"TexArxs","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/#article","isPartOf":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/"},"author":{"name":"TexArxs","@id":"https:\/\/texarxs.com\/blog\/#\/schema\/person\/b577b4a39267cc9fbc17b1d921a162b0"},"headline":"macOS Command Line Basics &#8211; Part 2: Hands-On with Terminal","datePublished":"2024-11-19T09:29:00+00:00","dateModified":"2026-07-03T05:09:01+00:00","mainEntityOfPage":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/"},"wordCount":780,"commentCount":0,"publisher":{"@id":"https:\/\/texarxs.com\/blog\/#organization"},"image":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/#primaryimage"},"thumbnailUrl":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/image-18.png","keywords":["Apple IT","Apple Security","Mac Terminal","MacAdmins","macOS","macOS CLI","macOS Command Line","macOS Terminal commands"],"articleSection":["Apple"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/","url":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/","name":"macOS Command Line Basics - Part 2: Hands-On with Terminal - TexArxs Blog","isPartOf":{"@id":"https:\/\/texarxs.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/#primaryimage"},"image":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/#primaryimage"},"thumbnailUrl":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/image-18.png","datePublished":"2024-11-19T09:29:00+00:00","dateModified":"2026-07-03T05:09:01+00:00","description":"Practice essential macOS terminal commands with hands-on examples \u2014 file navigation, directory management, and real workflows for developers.","breadcrumb":{"@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/#primaryimage","url":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/image-18.png","contentUrl":"https:\/\/texarxs.com\/blog\/wp-content\/uploads\/2026\/06\/image-18.png","width":609,"height":342},{"@type":"BreadcrumbList","@id":"https:\/\/texarxs.com\/blog\/macos-command-line-basics-part-2-hands-on-with-terminal\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/texarxs.com\/blog\/"},{"@type":"ListItem","position":2,"name":"macOS Command Line Basics &#8211; Part 2: Hands-On with Terminal"}]},{"@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\/216","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=216"}],"version-history":[{"count":1,"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/posts\/216\/revisions"}],"predecessor-version":[{"id":218,"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/posts\/216\/revisions\/218"}],"wp:attachment":[{"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/media?parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/categories?post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/texarxs.com\/blog\/wp-json\/wp\/v2\/tags?post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}