LINUX COMMANDs FOR BEGINNERS

 

 



 

10 LINUX COMMAND FOR BEGINNERS

 


1. PWD COMMAND 

The pwd command stands for "print working directory." or "present working directory".

When you type pwd and press Enter in a terminal or command prompt, it will print the directory you are currently working on.

This command is particularly useful when navigating through the file system, especially when working with complex directory structures or when needing to reference the current directory's path in scripts or other commands.




2. LS COMMAND

The ls command is commonly used to identify the files and directories in the working directory. This command is one of the many often-used Linux commands that you should know.

The ls command is commonly used to identify the files and directories in the working directory. This command is one of the many often-used Linux commands that you should know.






3. CD COMMAND

The cd command is used to navigate between directories. It requires either the full path or the directory name, depending on your current working directory. If you run this command without any options, it will take you to your home directory. If you want to go to just previous id use command "cd .." Keep in mind that it can only be executed by users with sudo privileges.





4. MKDIR COMMAND

This mkdir command creates fresh directories in the terminal itself.

The syntax is mkdir: <directory name> and the new directory will be created.

If you want to make directory in a particular directory. you have to be inside that directory (by cd command) and then make it.






5. RMDIR COMMAND

The rmdir command is used to delete permanently an empty directory. To perform this command the user running this command must be having sudo privileges in the parent directory.

The format will be: rmdir <directory name>





6. TOUCH COMMAND

The touch command creates an empty file when put in the terminal

The format is: touch <file name> 




7. CP COMMAND

The cp command will copy some file from one directory to another or content from one file to another. the cp command of Linux is equivalent to copy-paste and cut-paste in Windows. It 

the format to copy a file in different directory: cp <file name> <folder name>   

the syntax to copy content from one file to another: cp <filename - copy from> <filename - paste to>



8. ECHO COMMAND

echo command in Linux is specially used to print something in the terminal. It is also be used to write some content in the file.

The syntax is: echo "text you want to print" -------> to print in terminal

The syntax is: echo "text you want to write in the file" >> <filename>. -------> to write in a file




9. CAT COMMAND

The cat command is used when you want to see the contents of a particular file or to read the content of the file.

The syntax will be: cat <file name>



10. MAN COMMAND

The man command displays a user manual for any commands or utilities available in the Terminal, including their name, description, and options.

The syntax for this is: man <command name>





To come out of it type :q
the moment you type q after : it will take you out to terminal





THAT'S ALL FOR THIS BLOG, THANK YOU😊



Comments