1. The command to display the date: date
2. The command to display the calendar: cal
3. Simple and easy to use calculator: bc
How can 10/100 become 0? This is because bc is preset to output only integers. If you want to output the lower digits of the decimal point, you must execute scale=number, and that number is the number of decimal points, for example:
4. Several important hotkeys [Tab], [ctrl]-c, [ctrl]-d
[Tab] button---with the function of "command completion" but not "file completion"
[Ctrl]-c key---make the current program "stop"
[Ctrl]-d key---usually means: "Keyboard input end (End Of File, EOF or End OfInput)"; in addition, it can also be used to replace exit
5、man
quit with q,
man -f man
6. Data is written to disk synchronously: sync
Enter sync, the data that has not been updated in the memory will be written to the hard disk; therefore, this command is very important before the system is shut down or restarted! Better to do it several times!
7. The usual shutdown command: shutdown
In addition, it should be noted that the time parameter must be added to the command, otherwise the shutdown will automatically jump to run-level 1 (that is, the login situation of single-person maintenance), which will be troublesome! Here are some examples of time parameters:
Reboot, shutdown: reboot, halt, poweroff
8. Switch execution level: init
There are seven execution levels in Linux:
--run level 0 : shutdown
--run level 3 : plain text mode
--run level 5 : include graphics interface mode
--run level 6 : restart
Use the init command to switch between modes:
If you want to shutdown, in addition to the above shutdown -h now and poweroff, you can also use the following command to shutdown:
9. Change the group the file belongs to: chgrp
10. Change the file owner: chown
He can also directly modify the name of the group
11. Change the permissions of the file: chmod
There are two ways to set permissions. You can use numbers or symbols to change permissions. |
--Number type to change file permissions:
--symbol type change file permissions:
12. View version information, etc.
13. Change directory: cd
14. Display the current directory: pwd
15. Create a new directory: mkdir
It is not recommended to use the -p option, because if you make a typo, the directory name will become messy