{"id":38,"date":"2022-07-09T20:01:00","date_gmt":"2022-07-09T14:31:00","guid":{"rendered":"https:\/\/vpswebhostingindia.com\/blog\/?p=38"},"modified":"2022-07-20T10:06:10","modified_gmt":"2022-07-20T04:36:10","slug":"linux-commands-for-beginners","status":"publish","type":"post","link":"https:\/\/vpswebhostingindia.com\/blog\/linux-commands-for-beginners\/","title":{"rendered":"Linux commands for Beginners"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>We can see Linux commands for beginners in below <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>ls<\/strong><\/li><\/ol>\n\n\n\n<p>This command lists directory contents. It is used to list the contents in a directory.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><em><strong>$ ls<\/strong><\/em><\/p>\n\n\n\n<p>use -l to list the command line by line<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>$ ls -l<\/em><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li><strong>grep<\/strong><\/li><\/ol>\n\n\n\n<p>This finds text in a file. The grep command searches through many files at a time to find a piece of text you are looking for.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>$ grep PATTERN [FILE]<\/em><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li><strong>passwd<\/strong><\/li><\/ol>\n\n\n\n<p>This command is used to change the user account password.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>$ passwd<\/em><\/strong><\/p>\n\n\n\n<p>If you have root access, you may modify the password for any account using below command.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>$ passwd [username]<\/em><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li><strong>mv<\/strong><\/li><\/ol>\n\n\n\n<p>The mv command moves a file or renames it. Here the file name gets changed from first.txt to second.txt.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>$ mv first.txt second.txt<\/em><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li><strong>cp<\/strong><\/li><\/ol>\n\n\n\n<p>This command copies a file. The cp command is used for copy the content onr file to another file in the same directory.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>$ cp first.txt second.txt<\/em><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\"><li><strong>rm<\/strong><\/li><\/ol>\n\n\n\n<p>This command is used to remove files in a directory or the directory itself. A directory cannot be removed if it is not empty.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>$ rm file1<\/em><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"7\"><li><strong>mkdir<\/strong><\/li><\/ol>\n\n\n\n<p>The mkdir command makes\/creates a directory.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>$ mkdir<\/em><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"8\"><li><strong>chmod<\/strong><\/li><\/ol>\n\n\n\n<p>This command changes the mode of a file system object. Files can have read, write, and execute permissions.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><em><strong>$ chmod<\/strong><\/em><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"9\"><li><strong>chown<\/strong><\/li><\/ol>\n\n\n\n<p>This command is used to change the ownership of a file\/folder or even multiple files\/folders for a specified user\/group.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>$ chown owner_name file_name<\/em><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"10\"><li><strong>history<\/strong><\/li><\/ol>\n\n\n\n<p>This command is used to show previously used commands or obtain information about the commands executed by a user.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>$ history<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We can see Linux commands for beginners in below ls This command lists directory contents. It is used to list the contents in a directory. $ ls use -l to list the command line by line $ ls -l grep This finds text in a file. The grep command searches through many files at a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":58,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-commands"],"_links":{"self":[{"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":2,"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":42,"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/posts\/38\/revisions\/42"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/media\/58"}],"wp:attachment":[{"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpswebhostingindia.com\/blog\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}