Correct shutdown Method:
Shutdown
Function Description: System shutdown instructions.
Syntax: Shutdown [-effhknr][-t seconds] [TIME] [warning message]
Additional note: The shutdown directive can close all programs and perform a reboot or shutdown action as required by the user.
Parameters
-C when the "shutdown-h 11:50" command is executed, the shutdown instruction can be interrupted by pressing the + key.
-F does not execute fsck when restarting.
-F to perform fsck upon restart.
-H shuts down the system.
-K simply sends out information to all users, but does not actually shut down.
-N does not invoke the INIT program to shut down, but by shutdown itself.
-R shutdown after reboot.
Number of seconds between-t< seconds > send out warning message and delete information.
[TIME] Set how long after the shutdown instruction is executed.
[Warning message] information to be transmitted to all logged-in users.
[Email protected] ~]# shutdown-h now
Shut down now.
[Email protected] ~]# shutdown-h 12:00
Indicates that the machine is closed 12 o'clock
[Email protected] ~]# shutdown-h +10
The system shuts down in 10 minutes.
[Email protected] ~]# Shutdown-r now
Restart now
[[email protected] ~]# shutdown-r +30 ' The system would reboot '
The system restarts after 30 minutes and displays the following information
[Email protected] ~]# shutdown-k now ' the system would reboot '
Send only warning messages, no system reboots
Poweroff: Direct shutdown
Reboot
Function Description: Restart the boot.
Syntax: Dreboot [-DFINW]
Additional note: Executing the REBOOT command allows the system to stop functioning and reboot.
Parameters
-D do not write data to the record file/var/tmp/wtmp when rebooting. This parameter has the effect of the "-n" parameter.
-F Force reboot, do not invoke the function of shutdown instruction.
-I close all network interfaces before rebooting.
-N does not check for programs that are not closed before it is re-powered.
-W tests only, does not really turn the system on again, only writes the data of the reboot to the Wtmp record file in the/var/log directory.
Halt
Feature Description: Turn off the system.
Syntax: Halt [-DFINPW]
Additional note: Halt will detect the runlevel of the system first. If the RunLevel is 0 or 6, shut down the system or call shutdown to shut down the system.
Parameters
-D do not record in the wtmp.
-F Regardless of the current runlevel, the system is forced to shut down without calling shutdown.
-I close the entire network interface before halt.
-N Halt, do not perform sync first.
After-P halt, execute poweroff.
-W is only recorded in the wtmp and does not actually end the system.
Sync
Function Description: Writes the data in the memory buffer to disk.
Syntax: Sync [--help][--version]
Note: In a Linux system, when the data needs to be stored in the disk, it is usually placed in the buffer, until the appropriate time to write to the disk, so as to improve the efficiency of the system execution.
Parameters
--help display Help.
--version Displays version information.
[[Email protected] ~]# sync; Sync Sync Reboot
Restart the system after the synchronization disk is complete
Show Calendar command: Cal
[[email protected] ~]# cal
September on 2015
Day 123456
1 2 3) 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
[[email protected] ~]# Cal 2015
[[email protected] ~]# Cal 9 2015
Easy to use calculator: BC
+: Add
-: Minus
*: Multiply
/: Except
^: Index
%: Remainder
Quit: Quit Calculator command
Scale=3: Keep Several decimals (3 is reserved 3 decimal places)
Important hotkeys
[Tab]: Command completion
[Ctrl]-c: Stop it.
[ctrl]-d: End, input end (equivalent exit exit meaning)
Online Help
Mans
Info
Garbled FIX:
lang=en
languange=en
lc_all=en
lc_ctype=en
lc_time=en
Linux (3) Shutdown commands and some simple commands