10 Basic Linux Commands for Beginners


Linux Commands

Linux is the open source Operating System, but it is highly secure. Basically, Linux OS used for professional working in the IT Department. Every Linux user needs to use Terminal, but you can't operate Terminal if you don't know about the Basic Commands of Linux. In this post, I have given the Basic information of commands and Basic Commands. So read it carefully and use it.

                    Turbo C++ all Shortcuts Keys

                    A solution of Turbo C++ Common Iusses

Linux command


1. pwd

When you first open the terminal, you are in the home directory of your user. To know which directory you are in, you can use the "pwd" command. It gives the Absolute Path, which means the path that starts from the root. The root is the base of Linux filesystem. It is denoted by the forward slash (/). The user directly is usually something like /home/rahul/...



pwd" command. It gives the Absolute Path


2. ls or l

The "ls" command is used to know what files there in the directory you are in. You can see all the hidden files by using command "ls -a".

                   Turbo C++ Program Compiler Download

                   C Programming Tutorials for Beginners 

"ls -a" command


3. rm

The rm command is used to delete files and directories. rm cannot delete a simple directory. "rm -r" is used to delete a directory. In this case, deletes both the folders and files in it.  

delete a directory

4. touch

The touch command is used to create a file. It can be anything, from an empty text file to an empty zip file. EX -: "AAP62.txt"


                              Download Wireless Hacking [pdf] - eBook

                          Download All E-Books Click Here

to create a file

5. cp

The cp commands are used to copy files through the command line. It takes two arguments, the first one is the location of the file to be copied, the second is where to copy. 



cp commands

6. mv

The mv command is used to move any files through the command line. We can also use the mv command to rename a file. For example, if we want to rename the file "rahul" to "AAP62", we can use "mv rahul AAP62". It takes two arguments just like the cp command. 

move any file


7. cd

"cd" is the command to use go to the directory. For example, if you are in the home folder, and you want to go to the Documents folder, then you can type in "cd Documents". Remember, the command is case sensitive and you have to type the name of the folder exactly as it is. But there is a problem with these commands. Imagine you have a folder named "AAP62". In this case, when you type in "cd AAP62", the shell will take the second argument of the command as a different one so you will get an error saying that the directory does not exist. Here, you can use a backward slash (\). That is you can use "cd AAP62\RD" in this case. Spaces are denoted like this: If you just type "cd" and press Enter, it takes you to the home directory. To go back from a folder to the folder before that, you can type "cd.." . The two dots represent back.

command to use go to the directory

8. mkdir / rmdir 

The mkdir command is used when you need to create a folder or directory. For example, if you want to make a directory called "New Folder", then you can type "mkdir New Folder". Remember, as told before, if you want to create a directory named "New Folder AAB62", then you can type "mkdir New Folder\AAB62".

                 Software Installation Guide for Windows 

rmdir is the command used for deleting the directory. But, rmdir can only be used to delete an empty directory. To delete a directory contaning files, rm is used. 

The mkdir command is used when you need to create a directory

9. man & -help

To know more about command and on how to use it, the man command is used. It shows the manual pages of command. For example, "man cd" show the manual pages of the cd command. Typing in the name command name and the argument helps it show which ways the command can be used (Example -cd -help).



 -help



10. locate 

The locate command is used to locate a file in a Linux System, just like the search command in Windows. This command is useful when you don't know where a file saved or the actual name of the file. Using the -i argument with the command, helps ignore the case (it doesn't matter if it is Capital or Small). So, if you want a file that has the word "Hello", it gives the list of all the files in your Linux System containing the word "Hello"  when you type in "locate -i Hello". If you remember two words, you can separate it using an asterisk (*). For example, to locate a file containing the words "Hello" and "this", you can use the command "locate *Hello *this". #allaboutprogramming62

Post a Comment

0 Comments