Skip to main content

Some Important Linux Terminal Commands

Here are the some important and most frequently used linux Command that every linux user must know, command like clear, sudo, mkdir, rm, touch, ls, cp, cd, cat, pwd, passwd, whereis, whoami, whatis, bc, du, df and other commands

Linux Commands

1. ls - List the content of the folder from which it runs

Syntax - ls

Example - ls -l and ls -a


2. mkdir - mkdir command is used to create new directory

Syntax -mkdir directory_name

Example - mkdir student


3. cat - To create file with content and can concatenate two or more file content

Syntax - cat > filename

Example - cat>student


4. touch - It is used to create file without content

Syntax - touch filename

Example - touch student


5. cp - It copies a file from one location to another location

Syntax - cp source_file destination_file

Example - cp student stud1


6. cd - It is used to change the directory

Syntax - cd directory_name

Example - cd Desktop


7. mv - It used to move a file from one location to another location

Syntax - mv source_file destination_file

Example - mv student1 student2


8. pwd - It print the present working directory with full path name from terminal

Syntax - pwd

Example - pwd


9. whereis - It is used to locate the sources and manual page of the command

Syntax - whereis command_name

Example - whereis cat


10. whatis - It is helpful to get brief information about linux commands

Syntax - whatis command_name

Example - whatis cp


11. which - It is used to locate executable file in the system

Syntax - which command_name

Example - which cpp python java


12. man - It provides online documentation for all the possible options with a command and its usages

Syntax - man command_name

Example - man cat


13. info - It provides online documentation for all the commands but in a better structured way

Syntax - info command_name

Example - info cp


14. whoami - It is used to find out the current user of the terminal

Syntax - whoami

Example - whoami


15. bc - It means basic calculator, It used for the basic calculation

Syntax - bc

Example - echo '2+2' | bc


16. grep - It searches the given file for lines containing a match to the given string or words

Syntax - grep word filename

Example - grep mv student


17. head - It prints the first 10 lines of the given file

Syntax - head filename

Example - head student.txt


18. tail - It print the last 10 lines of the given file

Syntax - tail filename

Example - tail student.txt


19. tac - It print the content of the given file in reverse order

Syntax - tac filename

Example - tac student.txt


20. echo - It print text on the standard output, However in an interactive script echo passes the message to the user through terminal

Syntax - echo Hello world

Example - echo Hello world


21. df - Report disk usages of file system useful for user as well as system administrator to keep track of their disk usages.

Syntax - df

Example - df


22. du - It estimate file space usages. df only report usages statistics on file system while du on the other hand measures directory content.

Syntax - du

Example - du


23. ps - It stands for process, It gives the status of running process with a unique ID called PID

Syntax - ps

Example - ps


24. alias - It is built in shell command that lets you assign name for a long command or frequently used command

Syntax - alias alias_name command

Example - alias q=ls


25. uname - It stands for unix name, It print detailed infromation about the machine name, operating system and kernel

Syntax - uname

Example - uname


26. sudo - It allows a permitted user to execute a command as the super user

Syntax - sudo command

Example - sudo passwd


27. su - It is used to run shell with substitute user and group IDs, It help to change login session's owner without the owner having to first logout of that session

Syntax - su username

Example - su username


28. history - It print the history of long list executed command in the terminal

Syntax - history

Example - history


29. passwd - It is used for changing the password, you must know the current password for the security reason

Syntax - passwd

Example - passwd


30. date - It print the current date and time on the standard output and can further be set

Syntax - date

Example - date


31. cal - It is used to display calendar of the present month or any other month

Syntax - cal [month] [year]

Example - cal 08 2001


32. clear - It is used to clear the terminal screen

Syntax - clear

Example - clear

Popular posts from this blog

BHU Holiday List 2024 [PDF] and BHU Hospital Holiday Lis

BHU Holiday List 2024 and BHU Hospital OPD Holiday List All the Holiday List of BHU 2024 You can find in this post and I also attached the original PDF link of BHU Holiday list S No. Name of Holiday No. of Days Day of the Week Date 1. Makar Sankranti 1 Monday 15-01-2024 2. Republic Day 1 Friday 26-01-2024 3. University's Foundation Day and Basant Panhami 1 Wednesday 14-02-2024 4. Guru Ravidas's Birthday 1 Saturday 24-02-2024 5. Maha Shivaratri 1 Friday 08-03-2024

गोल हूँ पर बॉल नहीं लाल हूँ पर सेब नहीं जो मुझे परेशान करें उसकी फिर खैर नहीं! - Hindi Paheli With Answer

गोल हूँ पर बॉल नहीं लाल हूँ पर सेब नहीं जो मुझे परेशान करें उसकी फिर खैर नहीं! Hindi Paheliyan With Answer, Dimagi Hindi Paheli with Answer, New Hindi Paheliyan, Tough Hindi Paheli with Answer, New Collection of Hindi Paheliyan. पहेली  - गोल हूँ पर बॉल नहीं लाल हूँ पर सेब नहीं जो मुझे परेशान करें उसकी फिर खैर नहीं! जवाब   - प्याज ।

Draw a character sketch of the old General in the lesson, ‘The Enemy’

Question:  Draw a character sketch of the old General in the lesson, ‘The Enemy’.  [CBSE (AI) 2011] Answer:  General Takima, being the head of the Japanese army, was more concerned  about himself than the general people of his country. Dr Sadao was a surgeon. He  could be a boon for the wounded soldiers during the world war. But the General asked  him to stay back for himself only because he may require an operation any time. Thus,  he was a selfish man. It was said that he used to hit his wife. But he was a kind man  also. Though the General promised to get the POW killed he desisted from his plan.  It is also hoped that he forgot to send the assassins to wipe out the American soldier or  he was concerned with the security of the doctor and his family as the public knowledge  of POW could harm them. For the General, it was very important that no harm comes to  his surgeon. More Question According to Zitkala-Sa what does ‘eating by the formula’ mean? How did Zitkala-Sa’s first da