{"id":109,"date":"2025-02-11T01:40:36","date_gmt":"2025-02-10T19:40:36","guid":{"rendered":"https:\/\/jettcode.com\/blog\/?p=109"},"modified":"2025-02-11T01:40:36","modified_gmt":"2025-02-10T19:40:36","slug":"basic-linux-commands-a-beginners-guide","status":"publish","type":"post","link":"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/","title":{"rendered":"Basic Linux Commands: A Beginner\u2019s Guide"},"content":{"rendered":"<p>Hey there! If you\u2019re new to Linux, you might feel a little overwhelmed by the command line. But don\u2019t worry\u2014Linux commands are like superpowers once you get the hang of them! In this article, we\u2019ll walk you through some of the most basic and essential Linux commands to help you get started. Let\u2019s dive in!<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_71 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#Why_Learn_Linux_Commands\" title=\"Why Learn Linux Commands?\">Why Learn Linux Commands?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#pwd_%E2%80%93_Print_Working_Directory\" title=\"pwd \u2013 Print Working Directory\">pwd \u2013 Print Working Directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#ls_%E2%80%93_List_Files_and_Directories\" title=\"ls \u2013 List Files and Directories\">ls \u2013 List Files and Directories<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#cd_%E2%80%93_Change_Directory\" title=\"cd \u2013 Change Directory\">cd \u2013 Change Directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#mkdir_%E2%80%93_Make_a_Directory\" title=\"mkdir \u2013 Make a Directory\">mkdir \u2013 Make a Directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#touch_%E2%80%93_Create_a_File\" title=\"touch \u2013 Create a File\">touch \u2013 Create a File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#cp_%E2%80%93_Copy_Files_or_Directories\" title=\"cp \u2013 Copy Files or Directories\">cp \u2013 Copy Files or Directories<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#mv_%E2%80%93_Move_or_Rename_Files\" title=\"mv \u2013 Move or Rename Files\">mv \u2013 Move or Rename Files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#rm_%E2%80%93_Remove_Files_or_Directories\" title=\"rm \u2013 Remove Files or Directories\">rm \u2013 Remove Files or Directories<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#cat_%E2%80%93_View_File_Contents\" title=\"cat \u2013 View File Contents\">cat \u2013 View File Contents<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#grep_%E2%80%93_Search_Text\" title=\"grep \u2013 Search Text\">grep \u2013 Search Text<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#chmod_%E2%80%93_Change_File_Permissions\" title=\"chmod \u2013 Change File Permissions\">chmod \u2013 Change File Permissions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#man_%E2%80%93_Manual_Pages\" title=\"man \u2013 Manual Pages\">man \u2013 Manual Pages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/jettcode.com\/blog\/basic-linux-commands-a-beginners-guide\/#The_Bottom_Line\" title=\"The Bottom Line\">The Bottom Line<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Why_Learn_Linux_Commands\"><\/span>Why Learn Linux Commands?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Linux is everywhere\u2014it powers servers, smartphones, and even your smart TV! Knowing how to use the command line can help you:<\/p>\n<ul>\n<li>Navigate your system like a pro.<\/li>\n<li>Automate tasks and save time.<\/li>\n<li>Gain more control over your computer.<\/li>\n<\/ul>\n<p>Ready to unlock your Linux superpowers? Let\u2019s go!<\/p>\n<h2><span class=\"ez-toc-section\" id=\"pwd_%E2%80%93_Print_Working_Directory\"><\/span>pwd \u2013 Print Working Directory<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Ever feel lost in your file system? The <code>pwd<\/code> command tells you exactly where you are.<\/p>\n<pre><code>$ pwd\r\n\/home\/yourusername<\/code><\/pre>\n<p>This shows the full path of your current directory. Handy, right?<\/p>\n<h2><span class=\"ez-toc-section\" id=\"ls_%E2%80%93_List_Files_and_Directories\"><\/span>ls \u2013 List Files and Directories<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Want to see what\u2019s in a folder? Use <code>ls<\/code> to list all the files and directories.<\/p>\n<pre><code>$ ls\r\nDocuments Downloads Pictures<\/code><\/pre>\n<p>Add <code>-l<\/code> for more details, or <code>-a<\/code> to show hidden files.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"cd_%E2%80%93_Change_Directory\"><\/span>cd \u2013 Change Directory<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Need to move around? Use <code>cd<\/code> to change directories.<\/p>\n<pre><code>$ cd Documents<\/code><\/pre>\n<p>Want to go back to the previous directory? Use <code>cd ...<\/code><\/p>\n<h2><span class=\"ez-toc-section\" id=\"mkdir_%E2%80%93_Make_a_Directory\"><\/span>mkdir \u2013 Make a Directory<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Need to create a new folder? <code>mkdir<\/code> has got you covered.<\/p>\n<pre><code>$ mkdir MyNewFolder<\/code><\/pre>\n<p>Now you\u2019ve got a brand-new folder to organize your files!<\/p>\n<h2><span class=\"ez-toc-section\" id=\"touch_%E2%80%93_Create_a_File\"><\/span>touch \u2013 Create a File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Want to create an empty file? Use <code>touch<\/code>.<\/p>\n<pre><code>$ touch myfile.txt<\/code><\/pre>\n<p>This creates a new file called <code>myfile.txt<\/code>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"cp_%E2%80%93_Copy_Files_or_Directories\"><\/span>cp \u2013 Copy Files or Directories<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Need to make a copy of a file? Use <code>cp<\/code>.<\/p>\n<pre><code>$ cp myfile.txt myfile_copy.txt<\/code><\/pre>\n<p>You can also copy entire directories by adding the <code>-r<\/code> flag.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"mv_%E2%80%93_Move_or_Rename_Files\"><\/span>mv \u2013 Move or Rename Files<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Want to move a file or rename it? Use <code>mv<\/code>.<\/p>\n<pre><code>$ mv myfile.txt Documents\/<\/code><\/pre>\n<p>To rename a file, just \u201cmove\u201d it to a new name:<\/p>\n<pre><code>$ mv oldname.txt newname.txt<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"rm_%E2%80%93_Remove_Files_or_Directories\"><\/span>rm \u2013 Remove Files or Directories<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Need to delete something? Use <code>rm<\/code>.<\/p>\n<pre><code>$ rm myfile.txt<\/code><\/pre>\n<p>To delete a directory and its contents, use <code>rm -r<\/code>. Be careful\u2014this can\u2019t be undone!<\/p>\n<h2><span class=\"ez-toc-section\" id=\"cat_%E2%80%93_View_File_Contents\"><\/span>cat \u2013 View File Contents<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Want to quickly see what\u2019s inside a file? Use <code>cat<\/code>.<\/p>\n<pre><code>$ cat myfile.txt\r\nHello, Linux!<\/code><\/pre>\n<p>It\u2019s a simple way to peek at your files.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"grep_%E2%80%93_Search_Text\"><\/span>grep \u2013 Search Text<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Need to find something in a file? <code>grep<\/code> is your friend.<\/p>\n<pre><code>$ grep \"Linux\" myfile.txt\r\nHello, Linux!<\/code><\/pre>\n<p>This searches for the word \u201cLinux\u201d in <code>myfile.txt<\/code>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"chmod_%E2%80%93_Change_File_Permissions\"><\/span>chmod \u2013 Change File Permissions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Need to control who can read, write, or execute a file? Use <code>chmod<\/code>.<\/p>\n<pre><code>$ chmod 755 myfile.txt<\/code><\/pre>\n<p>This sets specific permissions for the file. (Don\u2019t worry\u2014you\u2019ll learn what those numbers mean later!)<\/p>\n<h2><span class=\"ez-toc-section\" id=\"man_%E2%80%93_Manual_Pages\"><\/span>man \u2013 Manual Pages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Stuck or need more info? Use <code>man<\/code> to read the manual for any command.<\/p>\n<pre><code>$ man ls<\/code><\/pre>\n<p>This shows detailed instructions for the <code>ls<\/code> command.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"The_Bottom_Line\"><\/span>The Bottom Line<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Learning Linux commands might seem tricky at first, but with a little practice, you\u2019ll be navigating the command line like a pro. Start with these basics, and soon you\u2019ll unlock the full potential of Linux!<\/p>\n<p>Got questions or need help? Drop a comment below\u2014I\u2019d love to hear from you!<\/p>\n<p>Happy coding, and may your Linux journey be smooth and fun! \ud83d\ude80<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey there! If you\u2019re new to Linux, you might feel a little overwhelmed by the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":114,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":4,"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":113,"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/posts\/109\/revisions\/113"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/media\/114"}],"wp:attachment":[{"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jettcode.com\/blog\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}