Basic Linux Commands For Beginner | Linux Commands
Note: Linux file system is case sensitive there is difference between letter "a" and "A" so alwasy remember that the command you are using must be accurate. Upper case and lower case of single charachter makes a lot diffence in commands.
Linux Commands
1. cd - This command is very basic. "cd" stands for change directory. simply by using "cd" you can change directory. For example if you are in Home folder and you want to go to the videos folder then you can type "cd videos"
2. ls - "ls" command is used to list the contain from the folder. For example if you are in Downloads folder and you want to display what files are available in Downloads folder then type " cd Downloads ". And if you want to display all file including hidden files then use " ls -a Downloads ".
3. mkdir - " mkdir " is command which is to create the directory / folder for example if you want to create the folder with the name of " Pravin " then type " mkdir Pravin "
4. pwd - "pwd" command shows you the absolute path which starts from the root ( / ). For example if you are in named Pravin and then f you type "pwd" then the results will be like
- " /root/Pravin/ " . pwd will show you the Present Working Directory
5. touch - In linux if you want to create a file with any extention like txt,zip etc. then you have to use " touch " command. For example if you want to create plane txt file with the name of Pravin then type touch " Pravin.txt " . And suppose if you want to create any file at the specific location or in specific directory then use its path to create file on specific directory. For example if you want to create file in Downloads folder then use " touch Downloads/Pravin.txt "
6. cat - " cat " command is used to display the contents of the file. For example you having Pravin.txt file with some plane text line then to display the content of Pravin.txt use the command cat. " cat Pravin.txt "
Linux Commands
1. rmdir - If you want to delete any directory/folder then use " rmdir " Command. For example if you want to remove/delete folder named " Pravin " Then type " rmdir Pravin "
2. rm - This command is used to remove/delete the file. For example if you want to remove file named " Pravin.txt " then type " rm Pravin.txt "
3. head - This command is used to display the content of file. by defaults it display first 10 lines of file. For example if you want to display the first 10 lines of file " Pravin.txt " then type " head Pravin.txt "
4. tail - This command is exactly opposite to " head " command. This command is used to display the last 10 lines of file. For example if you want to display the last 10 lines of file " Pravin.txt " then type " tail Pravin.txt "
5. tac - This command is exactly opposite to " cat " command cat command displays the content of file and " tac " command displays the all content of file but in reverse form ( From the last line ) . For example you want to display all the content of file " Pravin.txt " but in revers form. The type " tac Pravin.txt "
6. id - This command is used to display the user ID (UID) and group ID (GID)
7. useradd - This command is used to add new user. For example if you want to add new user with the name of " LINUX " then type " useradd LINUX "
8. adduser - This command is same as " useradd " if you want to add a new user then you can use one of them. For example if you want to add new user with name " Linux " then type " adduser Linux "
Qna
1. What are the linux commands ?
Ans - Linux is command line based all tasks are run or executed by the commands.
2.What are 10 Linux commands you can use every day?
Ans - 1. ls - ls command is used to list the content of folder.
2. mkdir - mkdir command is used to create folder.
3. cp - cp command is used to copy file or folder.
4. rm - rm command is used to delete files.
5. rmdir - rmdir command is used to delete folders.
6. cat - cat command is used to display content of file
7. adduser - adduser is used to add new user.
8. wget - wget command is used to download file form url
9. cd - cd command is used to change the directory.
10. mv - mv command is used to move file/folder.








No comments:
Post a Comment