{"id":5,"date":"2019-10-17T02:57:59","date_gmt":"2019-10-17T02:57:59","guid":{"rendered":"http:\/\/webhostingpune.co.in\/blog\/?p=5"},"modified":"2019-10-18T02:03:41","modified_gmt":"2019-10-18T02:03:41","slug":"basic-commands-in-linux","status":"publish","type":"post","link":"https:\/\/webhostingpune.co.in\/blog\/basic-commands-in-linux\/","title":{"rendered":"BASIC COMMANDS IN LINUX"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\" style=\"text-align:left\"><em><strong>This is introduction to some common Linux commands is for you. These  commands are the ones that Linux system administrators use frequently<\/strong><\/em><strong> <\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"># ls  &#8211;&nbsp;lists directory contents <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"> The ls command &#8211; the list command &#8211; functions in the&nbsp;Linux&nbsp;Terminal to show all of the major directories filed under a given file system. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> For example, the command: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> $ ls   \/etc <br> The ls command is used for viewing files, folders and directories. in the path.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"> #cd &#8211;&nbsp;changes directory <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"> The cd command &#8211; change directory &#8211; will allow the user to change between file directories. As the name command name suggest, you would use the cd command to circulate between two different directories. <br><br>  For example, the command:  <br><br> $ cd \/usr\/bin <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">#mv &#8211; move files<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"> The mv command &#8211; move &#8211; allows a user to move a file to another folder or directory. Just like dragging a file located on a PC desktop to a folder stored within the &#8220;Documents&#8221; folder, the mv command functions in the same manner. <br><br>  For example, the command:   <br><br>mv\/arora\/applications\/majorapps    \/arora\/applications\/minorapps<br> <br> The first part of the command&nbsp;<strong>mv\/arora\/applications\/majorapps<\/strong>&nbsp;lists the application to be moved. In this case, arora. The second part of the command&nbsp;<strong>\/arora\/applications\/minorapps<\/strong>&nbsp;lists where arora will be moved to &#8211; from majorapps to minorapps. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">#man &#8211;  displays manual pages <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"> The man command &#8211; the manual command &#8211; is used to show the manual of the inputted command.&nbsp; <br><br>  For example, the command:    <br>   man cd<br><br> The inputting command will show the manual or all relevant information for the change directory command. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"> <code>#<\/code>mkdir makes directories <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"> The mkdir &#8211; make directory &#8211; command allows the user to make a new directory. Just like making a new directory within a PC or Mac desktop environment, the mkdir command makes new directories in a Linux environment. <br><br>For Example:<br><strong>mkdir testdirectory<\/strong><br> The example command made the directory &#8220;testdirectory&#8221;. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">#rmdir &#8211; removes directories<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"> The rmdir &#8211; remove directory &#8211; command allows the user to remove an existing command using the Linux&nbsp; <br> For Example: <br><strong>rmdir testdirectory<\/strong><br> The example command removed the directory &#8220;testdirectory&#8221;. changes file timestamps <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"># rm &#8211; removes files and directories  <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"> The rm command &#8211; remove &#8211; like the rmdir command is meant to remove files from your Linux OS. Whereas the rmdir command will remove directories and files held within, the rm command will delete created files. <br><br> An example of the rm command: <br><br><strong>rm testfile.txt<\/strong><br><br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"># pwd &#8211;  prints the working directory <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"> The&nbsp;<code>pwd<\/code>&nbsp;command is your Linux system&#8217;s compass, in that it tells you where you are. It has no other function than supplying that bit of information to you. Try the following, and you will see that you&#8217;re in your home directory <br><br>  An example of the pwd command:  <br>$pwd<br>\/home\/user<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is introduction to some common Linux commands is for you. These commands are the ones that Linux system administrators use frequently # ls &#8211;&nbsp;lists directory contents The ls command &#8211; the list command &#8211; functions in the&nbsp;Linux&nbsp;Terminal to show all of the major directories filed under a given file system. For example, the command: $ ls \/etc The ls command is used for viewing files, folders and directories. in the path. #cd &#8211;&nbsp;changes directory The cd command &#8211; change directory &#8211; will allow the user to change between file directories. As the name command name suggest, you would use the cd command to circulate between two different directories. For example, the command: $ cd \/usr\/bin #mv &#8211; move files The mv command &#8211; move &#8211; allows a user to move a file to another folder or directory. Just like dragging a file located on a PC desktop to a folder stored within the &#8220;Documents&#8221; folder, the mv command functions in the same manner. For example, the command: mv\/arora\/applications\/majorapps \/arora\/applications\/minorapps The first part of the command&nbsp;mv\/arora\/applications\/majorapps&nbsp;lists the application to be moved. In this case, arora. The second part of the command&nbsp;\/arora\/applications\/minorapps&nbsp;lists where arora will be moved to &#8211; from majorapps to minorapps. #man &#8211; displays manual pages The man command &#8211; the manual command &#8211; is used to show the manual of the inputted command.&nbsp; For example, the command: man cd The inputting command will show the manual or all relevant information for the change directory command. #mkdir makes directories The mkdir &#8211; make directory &#8211; command allows the user to make a new directory. Just like making a new directory within a PC or Mac desktop environment, the mkdir command makes new directories in a Linux environment. For Example:mkdir testdirectory The example command made the directory &#8220;testdirectory&#8221;. #rmdir &#8211; removes directories The rmdir &#8211; remove directory &#8211; command allows the user to remove an existing command using the Linux&nbsp; For Example: rmdir testdirectory The example command removed the directory &#8220;testdirectory&#8221;. changes file timestamps # rm &#8211; removes files and directories The rm command &#8211; remove &#8211; like the rmdir command is meant to remove files from your Linux OS. Whereas the rmdir command will remove directories and files held within, the rm command will delete created files. An example of the rm command: rm testfile.txt # pwd &#8211; prints the working directory The&nbsp;pwd&nbsp;command is your Linux system&#8217;s compass, in that it tells you where you are. It has no other function than supplying that bit of information to you. Try the following, and you will see that you&#8217;re in your home directory An example of the pwd command: $pwd\/home\/user<\/p>\n","protected":false},"author":1,"featured_media":10,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":13,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":34,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions\/34"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/media\/10"}],"wp:attachment":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}