Linux is an open source operating system, which is used in laptops or computers. To run Linux, we should know about the commands of Linux operating system.
What is Linux command?
Linux command is related to Linux operating system. All basic and advanced level tasks are done on Linux operating system through Linux command.
For your information, we would like to tell you that a command line interface is required to interact with the terminal system, which is similar to the command prompt in Windows operating system. Whatever commands are there in Linux, they are case sensitive.
Linux Commands
Below we have given you information about total 50 Linux commands.
1. mail CommandMail command is used to send email from command line.
2. ping CommandPing command is used to check the connection between two nodes.
3. host CommandHost command is used to display the IP address of the given domain name. It performs DNS lookup for DNS query.
4. ls CommandThe above command is used to display the list of contents of a directory.
5. cd CommandThe cd command is used to change the directory that is currently on the screen.
6. touch CommandThe touch command is used to create an empty file. If we want, after creating one empty file, we can create multiple empty files by executing it.
7. cat CommandThe cat command is a multipurpose utility in Linux system. It can be used to create a file or to show the contents of the file.
8. rm CommandIf there is a need to remove a file, then the rm command is used.
9. cp CommandThe cp command is used to copy a file or a directory.
10. mv CommandThe above command can be used to move a file from one location to another or to move a directory.
11. rename CommandIf you want to change the name of a file, then you use the rename command. The rename command proves to be very helpful in renaming a large group of files.
12. head CommandThe head command is used to show the contents of a file. This command shows you the first 10 lines of the file.
13. tail CommandThis command is similar to the head command. The difference between these two commands is that the above command shows the last 10 lines of the file content and the head command shows the first 10 lines of the file content. The tail command proves to be very helpful in reading error messages.
14. tac CommandIf you want to see a file content in reverse order, then you need to use the above command. This command works to show the file content from bottom to top.
15. more commandThis command is similar to the CAT command because it is used to show the file content in the same way as the CAT command shows.
16. less CommandThis command is similar to the more command. It includes some extra features such as adjustment in width and height of the terminal.
17. su CommandThe above command provides administrative access to another user. In other words, it gives permission to the Linux cell to access another user.
18. id CommandThe id command is used to show user ID and group ID.
19. useradd CommandThe useradd command is used to remove a user from the Linux server or to add a user.
20. passwd CommandThe passwd command is used to change the user's password or to create a user's password.
21. groupadd CommandThe above command is used to create a new user group.
22. cat CommandThe cat command can also be used as a filter. Pipe is available in it for filtering.
23. cut CommandThe cut command is used to select the column of a specific file.
24. grep CommandThe above command is used the most in Linux system, which is a filter. The full name of the above command is Global Regular Expression Print. It proves to be very helpful in searching the content of the file.
25. comm CommandThe above command is used to compare two files. By default, the above command displays 3 columns. In this, the first column contains non-matching items, the second column contains non-matching items of the second file and the third column contains the items of both the files.
26. sed commandThe sed command is also known as a stream editor. It is used to edit files with the help of regular expressions. However, it does not edit permanent files. The file that is edited through this is only visible on the display and does not have any effect on the actual file.
27. tee commandThe tee command puts standard output in the file and also writes it to the file.
28. tr CommandThe above command is used to translate the file content. Such as lowercase to uppercase.
29. uniq CommandThis command is used to form a shortlist, where every word appears only once.
30. wc CommandThe wc command is used to count how many lines are present in a file, how many words are present.
31. od CommandThe od command is used to display the contents of the file in characters like hexadecimal, octal.
32. sort CommandThe short command is used to sort the file in alphabetical order.
33. gzip CommandThe above command is used to truncate the file size. It is a compressing tool.
34. gunzip CommandThe gunzip command is used to decompress the file. You can also consider it as the reverse operation of the gzip command.
35. find CommandThe find command is used to search for a specific file in a directory. This command supports different options. Such as searching for a file by name or searching for a file by size or by date.
36. locate CommandThe locate command is used to search for a file by its name. It is somewhat similar to the find command. The locate command searches for a file in the database, while the find command searches for a file in the file system.
37. date CommandThe date command is used to display date, time, time zone and other things.
38. cal CommandThe above command is used to display the calendar of the current month. On using this command, you see the current month with the highlighted date.
39. sleep CommandThe above command is used to hold the terminal for a specified amount of time.
40. time CommandThe time command is used to display the time so that the command can be executed.
41. zcat CommandThe above command is used to show the file which has been compressed.
42. df CommandThe df command is used to show the disk space used in the file system. It shows the output under the number of blocks used. Apart from this, it also shows the available blocks and mounted directories.
43. mount CommandThe mount command is used to connect the external device file system to the system's file system.
44. exit CommandThe exit command is used to exit the cell that is currently present.
45. clear CommandThe Linux clear command is used to clear the terminal screen.
46. ip CommandThe Linux ip command is an updated version of the ipconfig command. The Linux ip command is used to assign IP addresses. Apart from this, the ip command can also be used to intialize the interface and disable the interface.
47. ssh CommandThe Linux SSH command is used to create a remote connection via the SSL protocol.
48. pwd CommandThis Linux command is used to show the location of the directory that is currently being worked on.
49. mkdir CommandIf you want to create a new directory in any directory, then you should use the above command.
50. rmdir CommandIf we need to delete a directory in Linux, then we have to use the above command.
Features of Linux
Being portable, the Linux operating system has the capacity to work on different hardware simultaneously.
The Linux operating system is a multi-user operating system.
It is capable of accessing different users, memory, random access memory and applications at one time.
You can run different programs simultaneously in it, because it is also multiprogramming and it is free.