{"id":1795,"date":"2020-07-31T13:30:00","date_gmt":"2020-07-31T10:30:00","guid":{"rendered":"https:\/\/www.virtono.com\/community\/?p=1795"},"modified":"2020-07-26T19:14:45","modified_gmt":"2020-07-26T16:14:45","slug":"10-linux-basic-commands-every-user-should-know","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/","title":{"rendered":"10 Linux Basic Commands Every User Should Know"},"content":{"rendered":"\n<p>Linux can be daunting to some, especially if you have seen people working only through the terminal. Trust me, its not as complicated as it seems neither is it that hard to learn. The only issue is manufacturers do not Linux with their systems.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-light-blue 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:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/#What_is_Linux\" title=\"What is Linux?\">What is Linux?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/#Linux_Basic_Commands\" title=\"Linux Basic Commands\">Linux Basic Commands<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/#To_Sum_Up\" title=\"To Sum Up\">To Sum Up<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_Linux\"><\/span>What is Linux?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The entire family of Unix like open-source operating systems that are based on Linux Kernel is Linux. Linux distros include : CentOS, Ubuntu, Fedora, Mint, Debian and a lot many.<\/p>\n\n\n\n<p>First released in 1991, Linux has been the back bone of just about every infrastructure. Since it is open-source, it can be modified and redistributed as your liking.<\/p>\n\n\n\n<p>Linux uses a shell, basically an interface that gives you access to the operating system\u2019s services. Don\u2019t its not always this daunting, there are a great many Linux with fabulous GUIs.<\/p>\n\n\n\n<p>Be that as it may, it is recommended to use the command-line interface (CLI) because it\u2019s more powerful and effective. One line commands that are powerful enough to complete something that will take minutes on GUIs in seconds.<\/p>\n\n\n\n<p>Thus if you are interested in learning here are 10 most basic commands that you should definitely know.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Linux_Basic_Commands\"><\/span><strong>Linux Basic Commands<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here is a list of basic Linux commands:<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>1. pwd command<\/strong><\/p>\n\n\n\n<p>While on a command line interface you might find yourself getting lost, where are you? Which directory did have you been working in?<\/p>\n\n\n\n<p>Just write \u2018pwd\u2019 on your terminal and press enter, it will give you the absolute(full) path.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>pwd<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"270\" height=\"40\" data-attachment-id=\"1796\" data-permalink=\"https:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/attachment\/image-18\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-18.png?fit=270%2C40&amp;ssl=1\" data-orig-size=\"270,40\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-18\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-18.png?fit=270%2C40&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-18.png?resize=270%2C40&#038;ssl=1\" alt=\"\" class=\"wp-image-1796\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><strong>2. cd command<\/strong><\/p>\n\n\n\n<p>Basic navigation command to move in and out of linux directories.<\/p>\n\n\n\n<p><strong>Absolute path<\/strong><\/p>\n\n\n\n<p>Lets say we have to go inside \/root\/Downloads<\/p>\n\n\n\n<p>No matter where you are currently, just type<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>cd \/root\/Downloads\/<\/p><\/blockquote>\n\n\n\n<p><strong>Relative Path<\/strong><\/p>\n\n\n\n<p>Now lets say there is another folder inside Download, \u201cmovies\u201d.<\/p>\n\n\n\n<p>If you are already in \/root\/Downloads<\/p>\n\n\n\n<p>Just type<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>cd movies<\/p><\/blockquote>\n\n\n\n<p>Then you will find yourself inside, \/root\/Downloads\/movies<\/p>\n\n\n\n<p>Do a quick pwd to confirm \ud83d\ude0a<\/p>\n\n\n\n<p><strong>Back trace<\/strong><\/p>\n\n\n\n<p>In order to move up a directory, type in<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>cd ..<\/p><\/blockquote>\n\n\n\n<p>This will move you up one directory<\/p>\n\n\n\n<p>Going by previous example you should be in \/root\/Downloads now<\/p>\n\n\n\n<p>There are some shortcuts to help you navigate quickly:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>cd ..<\/strong>&nbsp;(with two dots) to move one directory up<\/li><li><strong>cd&nbsp;<\/strong>to go straight to the home folder<\/li><li><strong>cd-<\/strong>&nbsp;(with a hyphen) to move to your previous directory<\/li><\/ul>\n\n\n\n<p>On a side note, Linux\u2019s shell is case sensitive. So, you have to type the name\u2019s directory exactly as it is.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>3. ls command<\/strong><\/p>\n\n\n\n<p>On a GUI windows you can see what is inside a folder, but on a command line tool, you will need to list all the contents.<\/p>\n\n\n\n<p>Do it by typing in<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>ls<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"28\" data-attachment-id=\"1797\" data-permalink=\"https:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/attachment\/image-19\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-19.png?fit=602%2C28&amp;ssl=1\" data-orig-size=\"602,28\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-19\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-19.png?fit=602%2C28&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-19.png?resize=602%2C28&#038;ssl=1\" alt=\"\" class=\"wp-image-1797\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-19.png?w=602&amp;ssl=1 602w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-19.png?resize=300%2C14&amp;ssl=1 300w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/figure>\n\n\n\n<p>There are variations you can use with the&nbsp;<strong>ls<\/strong>&nbsp;command:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>ls -R<\/strong>&nbsp;will list all the files in the sub-directories as well<\/li><li><strong>ls -a<\/strong>&nbsp;will show the hidden files<\/li><li><strong>ls -al<\/strong>&nbsp;will list the files and directories with detailed information like the permissions, size, owner, etc.<\/li><\/ul>\n\n\n\n<p class=\"has-text-align-center\"><strong>4. cat command<\/strong><\/p>\n\n\n\n<p>If you want to quickly read what is inside a file on the command line itself, use cat.<\/p>\n\n\n\n<p><strong>cat<\/strong>\u00a0(short for concatenate) is used to list the contents of a file on the standard output (sdout). To run this command, type\u00a0<strong>cat<\/strong>\u00a0followed by the file\u2019s name and its extension. For instance:\u00a0<strong>cat file.txt<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"309\" height=\"35\" data-attachment-id=\"1798\" data-permalink=\"https:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/attachment\/image-20\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-20.png?fit=309%2C35&amp;ssl=1\" data-orig-size=\"309,35\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-20\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-20.png?fit=309%2C35&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-20.png?resize=309%2C35&#038;ssl=1\" alt=\"\" class=\"wp-image-1798\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-20.png?w=309&amp;ssl=1 309w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-20.png?resize=300%2C34&amp;ssl=1 300w\" sizes=\"auto, (max-width: 309px) 100vw, 309px\" \/><\/figure>\n\n\n\n<p>Here are other ways to use the&nbsp;<strong>cat<\/strong>&nbsp;command:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>cat &gt; filename&nbsp;<\/strong>creates a new file<\/li><li><strong>cat filename1 filename2&gt;filename3&nbsp;<\/strong>joins two files (1 and 2) and stores the output of them in a new file (3)<\/li><li>to convert a file to upper or lower case use,&nbsp;<strong>cat filename | tr a-z A-Z &gt;output.txt<\/strong><\/li><\/ul>\n\n\n\n<p class=\"has-text-align-center\"><strong>5. cp command<\/strong><\/p>\n\n\n\n<p>This I will agree with you, copying is not as easy as it would be on a GUI, but once you get a hang of it, its better I guess.<\/p>\n\n\n\n<p>Use the&nbsp;<strong>cp<\/strong>&nbsp;command to copy files from the current directory to a different directory.<\/p>\n\n\n\n<p>For instance, the command\u00a0<strong>cp &lt;filename><\/strong>\u00a0<strong>\/&lt;directory to copy><\/strong>\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"490\" height=\"36\" data-attachment-id=\"1799\" data-permalink=\"https:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/attachment\/image-21\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-21.png?fit=490%2C36&amp;ssl=1\" data-orig-size=\"490,36\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-21\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-21.png?fit=490%2C36&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-21.png?resize=490%2C36&#038;ssl=1\" alt=\"\" class=\"wp-image-1799\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-21.png?w=490&amp;ssl=1 490w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-21.png?resize=300%2C22&amp;ssl=1 300w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/figure>\n\n\n\n<p>This would copy the grafana-7.1.1-1.x86_64.rpm to the tmp folder.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>6. mv command<\/strong><\/p>\n\n\n\n<p>Now move has two purposes in everyday usage. First is to move files,duh!<\/p>\n\n\n\n<p>Second is to rename files.<\/p>\n\n\n\n<p>The arguments are similar to the copy command, as you can look at it as copying the file and removing the original file from its place.<\/p>\n\n\n\n<p>The primary use of the&nbsp;<strong>mv<\/strong>&nbsp;command is to move files, although it can also be used to rename files.<\/p>\n\n\n\n<p>The arguments in mv are similar to the cp command. You need to type&nbsp;<strong>mv<\/strong>, the file\u2019s name, and the destination\u2019s directory.<\/p>\n\n\n\n<p>For example:\u00a0<strong>mv &lt;filename><\/strong>\u00a0<strong>\/&lt;directory to move><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"508\" height=\"37\" data-attachment-id=\"1800\" data-permalink=\"https:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/attachment\/image-22\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-22.png?fit=508%2C37&amp;ssl=1\" data-orig-size=\"508,37\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-22\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-22.png?fit=508%2C37&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-22.png?resize=508%2C37&#038;ssl=1\" alt=\"\" class=\"wp-image-1800\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-22.png?w=508&amp;ssl=1 508w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-22.png?resize=300%2C22&amp;ssl=1 300w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/figure>\n\n\n\n<p>This will move the file grafana-7.1.1-1.x86_64.rpm to the etc folder.<\/p>\n\n\n\n<p><strong>Renaming<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"374\" height=\"67\" data-attachment-id=\"1801\" data-permalink=\"https:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/attachment\/image-23\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-23.png?fit=374%2C67&amp;ssl=1\" data-orig-size=\"374,67\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-23\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-23.png?fit=374%2C67&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-23.png?resize=374%2C67&#038;ssl=1\" alt=\"\" class=\"wp-image-1801\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-23.png?w=374&amp;ssl=1 374w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-23.png?resize=300%2C54&amp;ssl=1 300w\" sizes=\"auto, (max-width: 374px) 100vw, 374px\" \/><\/figure>\n\n\n\n<p>To rename files, the Linux command is&nbsp;<strong>mv oldname.ext newname.ext<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>7. mkdir command<\/strong><\/p>\n\n\n\n<p>Use\u00a0<strong>mkdir<\/strong>\u00a0command to make a new directory \u2014 if you type\u00a0<strong>mkdir Download<\/strong>\u00a0it will create a directory called\u00a0<strong>Music<\/strong>.<\/p>\n\n\n\n<p>There are extra&nbsp;<strong>mkdir<\/strong>&nbsp;commands as well:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>To generate a new directory inside another directory, use this Linux basic command\u00a0<strong>mkdir Download\/Newfile<\/strong><\/li><li>use the\u00a0<strong>p\u00a0<\/strong>(parents) option to create a directory in between two existing directories. For example,\u00a0<strong>mkdir -p Download\/mid\/Newfile<\/strong>\u00a0will create the new \u201cmid\u201d file.<\/li><\/ul>\n\n\n\n<p><strong>8. rmdir command<\/strong><\/p>\n\n\n\n<p>If you need to delete a directory, use the&nbsp;<strong>rmdir<\/strong>&nbsp;command. However, rmdir only allows you to delete empty directories.<\/p>\n\n\n\n<p><strong>9. rm command<\/strong><\/p>\n\n\n\n<p>The&nbsp;<strong>rm<\/strong>&nbsp;command is used to delete directories and the contents within them. If you only want to delete the directory \u2014 as an alternative to rmdir \u2014 use&nbsp;<strong>rm -r<\/strong>.<\/p>\n\n\n\n<p><strong>Note<\/strong>: Be very careful with this command and double-check which directory you are in. This will delete everything and there is no undo.<\/p>\n\n\n\n<p><strong>10. sudo command<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"592\" data-attachment-id=\"1802\" data-permalink=\"https:\/\/www.virtono.com\/community\/knowledgebase\/10-linux-basic-commands-every-user-should-know\/attachment\/image-24\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-24.png?fit=602%2C592&amp;ssl=1\" data-orig-size=\"602,592\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-24\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-24.png?fit=602%2C592&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-24.png?resize=602%2C592&#038;ssl=1\" alt=\"\" class=\"wp-image-1802\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-24.png?w=602&amp;ssl=1 602w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-24.png?resize=300%2C295&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/image-24.png?resize=50%2C50&amp;ssl=1 50w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/figure>\n\n\n\n<p>sudo means \u201csuperuser do\u201d, this means that you are the chosen one foe the system. You can install remove softwares, change permissions, create other users and just about do everything on the system that a normal user might not.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"To_Sum_Up\"><\/span><strong>To Sum Up<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This was only a short collection of Linux commands for newbies to get started with the terminal. I will publish more commands and help you get acquinted with the terminal better.<\/p>\n\n\n\n<p>Until then, Cheers! See you in the next one.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux can be daunting to some, especially if you have seen people working only through the terminal. Trust me, its not as complicated as it seems neither is it that hard to learn. The only issue is manufacturers do not Linux with their systems. What is Linux? The entire family<\/p>\n","protected":false},"author":4,"featured_media":1804,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[5],"tags":[],"class_list":["post-1795","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledgebase"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/07\/7rQQixjPnrQv.png?fit=640%2C363&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-sX","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":670,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/comparing-oss-centos-ubuntu-or-debian\/","url_meta":{"origin":1795,"position":0},"title":"Comparing OSs &#8212; CentOS, Ubuntu or Debian?","author":"Daniel Draga","date":"September 28, 2016","format":false,"excerpt":"CentOS \u009ewhich stands for Community Enterprise Operating System, is the result of a group of open source contributors and users working together to develop Linux solutions that are freely available to users who do not require a great deal of commercial support to achieve their goal. \u009eCentOS dedicated servers were\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/09\/centos-debian-ubuntu-06.png?fit=400%2C300&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":866,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/viruses-and-linux-and-linux-antiviruses\/","url_meta":{"origin":1795,"position":1},"title":"Viruses and Linux and Linux Antiviruses","author":"Daniel Draga","date":"January 19, 2017","format":false,"excerpt":"Viruses and Linux Computer viruses are pieces of software that replicate themselves on a computer. The replication means a virus is distributing itself all over your computer, making it tough to get rid of. Viruses seem to understand that there\u2019s safety in numbers. Viruses can destroy data or send it\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/01\/1364034317531-690x336.jpg?fit=690%2C336&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/01\/1364034317531-690x336.jpg?fit=690%2C336&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/01\/1364034317531-690x336.jpg?fit=690%2C336&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3477,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-htop-on-linux\/","url_meta":{"origin":1795,"position":2},"title":"How To Install htop on Linux","author":"George B.","date":"June 9, 2023","format":false,"excerpt":"When it comes to monitoring system resources, htop on Linux stands out as a powerful tool that provides a real-time, interactive view of your system's performance. Unlike traditional command-line utilities, htop offers a user-friendly interface with intuitive visualizations. In this article, we'll delve into the process of installing htop on\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-To-Install-htop-on-Linux.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-To-Install-htop-on-Linux.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-To-Install-htop-on-Linux.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1195,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/remove-old-kernels-in-ubuntu\/","url_meta":{"origin":1795,"position":3},"title":"Remove Old Kernels in Ubuntu","author":"Shreyash Sharma","date":"October 27, 2017","format":false,"excerpt":"For\u00a0Ubuntu\u00a0installations (prior to Ubuntu version 15.10) with\u00a0separate \/ boot partition\u00a0, it may fill up\u00a0after installing several updates\u00a0.\u00a0The issue occurs because older kernel versions are not automatically removed.\u00a0In this article, we'll show you how to manually uninstall older kernel versions, freeing up space in the \/ boot partition. Problem Installing new\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Aug30-Kernel-Team-Summary.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Aug30-Kernel-Team-Summary.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Aug30-Kernel-Team-Summary.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Aug30-Kernel-Team-Summary.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Aug30-Kernel-Team-Summary.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3392,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/locations-of-common-log-files-on-linux\/","url_meta":{"origin":1795,"position":4},"title":"Locations of Common Log Files on Linux","author":"George B.","date":"May 25, 2023","format":false,"excerpt":"In this tutorial, we will take you on a journey through the labyrinth of directories and unveil the secret locations of common log files on Linux. Whether you're a beginner or an experienced user, this guide will equip you with the knowledge to easily access and analyze these crucial logs.\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/Locations-of-Common-Log-Files-on-Linux.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/Locations-of-Common-Log-Files-on-Linux.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/Locations-of-Common-Log-Files-on-Linux.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1243,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/compiling-linux-kernels-under-ubuntu-or-debian\/","url_meta":{"origin":1795,"position":5},"title":"Compiling Linux kernels under Ubuntu or Debian","author":"Daniel Draga","date":"November 6, 2017","format":false,"excerpt":"Compiling a Linux kernel is not an everyday occurrence for most administrators.\u00a0It is all the more important\u00a0to know\u00a0the right\u00a0tools\u00a0when the time comes.\u00a0The following article shows examples of how Mainline \/ Vanilla Kernel and the distribution-specific\u00a0kernel are compiled. Install required software The following packages are needed to compile: $ sudo apt-get\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/517444-636210253990788094_270x480_thumb.jpg?fit=480%2C270&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=1795"}],"version-history":[{"count":1,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1795\/revisions"}],"predecessor-version":[{"id":1803,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1795\/revisions\/1803"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/1804"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=1795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=1795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=1795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}