Linux restart, logout, shutdown commands

The meaning of some file colors of files under linux:

Green      ----> stands for executable file (green stands for passport)
Red      ----> stands for compressed file
dark blue   ----> stands for directory
light blue   ----> stands for link file
grey      --- -> represents some other files

reboot

reboot is generally not used with parameters, enter the command to restart
shutdown generally requires parameters, for example:
shutdown -r how many minutes to delay restart, generally use now
shutdown -r now restart immediately
shutdown -f force restart
init 1

log out

Like windows, linux also has a logout function
exit

shutdown

method one:
halt can not take parameters
halt -f force shutdown
Method two:
poweroff
poweroff can be used without parameters
poweroff -f force shutdown
Method three:
init 0
Method four:
shutdown cannot be used alone
shutdown -h minutes how long to delay shutdown
shutdown -h now shutdown immediately

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325392288&siteId=291194637