Basic Commands in Linux 10:39 pm Unknown 1 <div dir="ltr" style="text-align: left;" trbidi="on"> <h4 style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><span style="font-weight: normal;"><br /></span></span></h4> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKL3Vl2DvdkLq70FdiU3NUq8aF6yFuhThR8xL7KEOZAWWlJCUckPuR0xhTNJwD1plJ2t3eOxrKZ9VZ7m2X0MxardBgj07pNOH0X2kiLfzyvk7WJuR2x0xvcjP54Vl1jhbVzehVXBZpyWmc/s1600/linux-basics.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Getting started with Linux Environment" border="0" height="135" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKL3Vl2DvdkLq70FdiU3NUq8aF6yFuhThR8xL7KEOZAWWlJCUckPuR0xhTNJwD1plJ2t3eOxrKZ9VZ7m2X0MxardBgj07pNOH0X2kiLfzyvk7WJuR2x0xvcjP54Vl1jhbVzehVXBZpyWmc/s1600/linux-basics.jpg" title="Linux-basics-start" width="320" /></a></div> <h4 style="text-align: left;"> <span style="font-family: Verdana, sans-serif; font-weight: normal;">If you are new to Linux , then do not worry about it , it will be a fun experience with Linux . Linux is way better in functionality then any other operating system , it is also much secure then any other operating system . New users may face difficulties working on Linux as it is different to work on Linux as compared to Windows , which is a user friendly operating system. Below are Explained some </span><span style="font-family: Verdana, sans-serif;">Basic Commands in Linux. </span></h4> <h2 style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Some Useful Basic Commands in Linux </span></h2> <div style="text-align: left;"> <h2 style="text-align: left;"> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;">1. Display your current directory.<o:p></o:p></span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;"> pwd</span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;">2. Change to the /etc directory.<o:p></o:p></span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;"> cd /etc</span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;">3. Change to your home directory using only three key presses.<o:p></o:p></span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;"> cd ~</span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;">4. Change to the /boot/grub directory using only eleven key presses.<o:p></o:p></span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;"> cd /boot/grub</span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;">5. Go to the parent directory of the current directory.<o:p></o:p></span></span></div> <div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;"> <span style="font-family: Verdana, sans-serif; font-size: medium;"><span style="font-weight: normal; line-height: 27.77777862548828px;"> cd..</span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;">6. Go to the root directory.<o:p></o:p></span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;"> cd /</span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;">7. List the contents of the root directory.<o:p></o:p></span></span></div> <div class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"> <span style="font-size: 14pt; font-weight: normal; line-height: 150%;"><span style="font-family: Verdana, sans-serif;"> ls</span></span></div> <div class="MsoNormal"> <span style="font-size: 14pt; line-height: 115%;"><span style="font-family: Verdana, sans-serif;"><span style="font-weight: normal;">8. List a long listing of the root directory</span><o:p></o:p></span></span></div> <div class="MsoNormal"> <span style="font-size: 14pt; line-height: 115%;"><span style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"> ls -al</span></span></span></div> <div class="MsoNormal"> <span style="font-family: "Times New Roman","serif"; font-size: 14.0pt; line-height: 115%;"><span style="font-weight: normal;"><br /></span></span></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQwCgohOHoSF-26UjunhaYMvjg54dm896ziFHjduRkmxO4MOQizUA-nkfdN8yOZDpiqQZIwV9OgVK9ocDhNiv1_yVb7FIbB78KpEdAN-DFz3PPn7YVcuZ84AjUNlID6eXxNbiZ-S8QfBio/s1600/Linux-commands.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="useful and basic linux commands works on all distributions of linux" border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQwCgohOHoSF-26UjunhaYMvjg54dm896ziFHjduRkmxO4MOQizUA-nkfdN8yOZDpiqQZIwV9OgVK9ocDhNiv1_yVb7FIbB78KpEdAN-DFz3PPn7YVcuZ84AjUNlID6eXxNbiZ-S8QfBio/s1600/Linux-commands.jpg" title="Linux basic commands" width="320" /></a></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> </h2> <h2 style="text-align: left;"> <span style="font-size: 14pt; font-weight: normal; line-height: 115%;">9<span style="font-family: Verdana, sans-serif;">. list the contents of /etc</span></span></h2> <div> <span style="font-family: Verdana, sans-serif; font-size: medium;"><span style="font-weight: normal; line-height: 21.111112594604492px;"> ls /etc</span></span></div> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_deSmjZ_3p9kdxeZzilae4_SfxJfCQPq4C6eRYPtlTMWX94eCJFH7ppXKHBAs8c6p3zIXJ66bsY2zvm5sNoM0l1gd5vZKS5rcUmTSDihkI9_k4Z89-5FB9A-kVg0_Zwvv0PgT2c6PGQBs/s1600/linux+basic+commands1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="learn more about linux file system" border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_deSmjZ_3p9kdxeZzilae4_SfxJfCQPq4C6eRYPtlTMWX94eCJFH7ppXKHBAs8c6p3zIXJ66bsY2zvm5sNoM0l1gd5vZKS5rcUmTSDihkI9_k4Z89-5FB9A-kVg0_Zwvv0PgT2c6PGQBs/s1600/linux+basic+commands1.jpg" title="Linux-basic-command" width="320" /></a></div> <div> <span style="font-family: Verdana, sans-serif; font-size: medium;"><span style="font-weight: normal; line-height: 21.111112594604492px;"><br /></span></span></div> <div class="MsoNormal" style="text-align: left;"> <o:p></o:p></div> <div class="separator" style="clear: both; text-align: center;"> <span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-no-proof: yes;"><br /><!--[endif]--></span></div> <div class="MsoNormal"> <span style="font-size: 14pt; font-weight: normal; line-height: 115%;"><span style="font-family: Verdana, sans-serif;">12. List all the files (including hidden files) in your home directory.<o:p></o:p></span></span></div> <div class="MsoNormal"> <span style="font-size: 14pt; font-weight: normal; line-height: 115%;"><span style="font-family: Verdana, sans-serif;"> </span></span></div> <div class="MsoNormal"> </div> <ul style="text-align: left;"> <li><span style="font-family: Verdana, sans-serif; font-size: 14pt; font-weight: normal; line-height: 115%;"> cd /home </span></li> <li><span style="font-family: Verdana, sans-serif; font-size: medium;"><span style="font-weight: normal; line-height: 21.111112594604492px;"> ls -al</span></span></li> </ul> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlBDYNz0V3lpwGxn5c-MeX8qmuBJep3uA7_ieUv1jAPWWtI5PuWQtK2G_eg1dPS6Bzysdqz_XBq3A1KJ1casdjlXITFw7Pph90NY8Hrxkf4-_iXcbvlnLVBRBLod1w2vufJPYU4IZIVnm7/s1600/hidden+files.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Command to show hidden files on home directory" border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlBDYNz0V3lpwGxn5c-MeX8qmuBJep3uA7_ieUv1jAPWWtI5PuWQtK2G_eg1dPS6Bzysdqz_XBq3A1KJ1casdjlXITFw7Pph90NY8Hrxkf4-_iXcbvlnLVBRBLod1w2vufJPYU4IZIVnm7/s1600/hidden+files.jpg" title="Hidden files on linux" width="320" /></a></div> <div> <span style="font-family: Verdana, sans-serif; font-size: medium;"><span style="font-weight: normal; line-height: 21.111112594604492px;"><br /></span></span></div> <br /> <div class="MsoNormal"> <span style="font-size: 14pt; font-weight: normal; line-height: 115%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div> <div class="MsoNormal"> <span style="font-size: 14pt; font-weight: normal; line-height: 115%;"><span style="font-family: Verdana, sans-serif;"> </span></span></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> <div style="text-align: left;"> <span style="font-family: Verdana, sans-serif; font-weight: normal;">13. <span style="font-size: 14pt; line-height: 115%;">Create in one command the directories ~/dir1/dir2/dir3 (dir3 is a subdirectory from dir2, and dir2 is a subdirectory from dir1 .<o:p></o:p></span></span></div> <div class="MsoNormal"> <span style="font-family: Verdana, sans-serif; font-weight: normal;"><span style="font-size: 14pt; line-height: 115%;"><br /></span></span></div> <div class="MsoNormal"> <span style="font-family: Verdana, sans-serif; font-weight: normal;"><span style="font-size: 14pt; line-height: 115%;"> mkdir -p dir1/dir2/dir3</span></span></div> <div class="MsoNormal"> <span style="font-family: Verdana, sans-serif; font-weight: normal;"><span style="font-size: 14pt; line-height: 115%;"><br /></span></span></div> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiba8BS5iSJKrIXYQs5MTe6XvDrLVOSY-JNoCAH-F7zdRYr316KMy-4af_k3IrF8Biy2BkfpDByVmOhF55O7ttEdmVRhCDWuHeADSu0zMW3U-JwT5KwyhNCTtBz-cLb84XROhm58Jqga80Y/s1600/create+directories.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Making three directories on linux" border="0" height="83" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiba8BS5iSJKrIXYQs5MTe6XvDrLVOSY-JNoCAH-F7zdRYr316KMy-4af_k3IrF8Biy2BkfpDByVmOhF55O7ttEdmVRhCDWuHeADSu0zMW3U-JwT5KwyhNCTtBz-cLb84XROhm58Jqga80Y/s1600/create+directories.jpg" title="Create Directories on Linux" width="320" /></a></div> <div class="MsoNormal"> <span style="font-family: Verdana, sans-serif; font-weight: normal;"><span style="font-size: 14pt; line-height: 115%;"><br /></span></span></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> <span style="font-size: 14pt; font-weight: normal; line-height: 115%;"><span style="font-family: Verdana, sans-serif;">14. Remove the directory testdir.</span></span><div> <span style="font-size: 14pt; font-weight: normal; line-height: 115%;"><span style="font-family: Verdana, sans-serif;"> rmdir testdir</span></span></div> <div> <span style="font-size: 14pt; font-weight: normal; line-height: 115%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilJxRfTnbKD8a65-NQqfbsLToEJm0vR-R_w7W2zXR3au0-sOxsSwjIQm6EyloU194BRhfMJ1R2v2S510fu2xCttmVobMejAG35EcAiEKn0IHC6lbvx8wICkjTgCqfSC9NbUCu5PvZETXZo/s1600/rm.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="remove a particular directory on linux" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilJxRfTnbKD8a65-NQqfbsLToEJm0vR-R_w7W2zXR3au0-sOxsSwjIQm6EyloU194BRhfMJ1R2v2S510fu2xCttmVobMejAG35EcAiEKn0IHC6lbvx8wICkjTgCqfSC9NbUCu5PvZETXZo/s1600/rm.jpg" title="Remove directories on linux" /></a></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> <h2 style="text-align: left;"> Final Words by the author</h2> <div> <span style="font-family: Verdana, sans-serif;"><i>This was simple basic commands to start and get familiar with working on linux , more tutorials will be posted in coming hours . If you have any question , queries regarding Linux commands , command line interface use the comment box below , your feedback matters . Share is caring so do share it with your friends on social networking sites so that everyone could a get a chance to work on linux environment.</i></span></div> <div> <span style="font-size: 14pt; font-weight: normal; line-height: 115%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div> </div> </div> Backtrack CentOS Fedora Linux Red hat Ubuntu Basic Commands in Linux If you are new to Linux , then do not worry about it , it will be a fun experience with Linux . Linux is way better in functionality then any other operating system , it is also much secure then any other operating system . New users may face diffi… Read more »