Hey, Guys Now we are going to learn shutdown commands of Linux
Syntax
Shutdown [option] [time] "Message"
|
Here, we change the option 24 hours and 60 minutes.
If you type "Now" system will shutdown immediately.
If you type 5 after h system will shutdown after 5 minutes.
and It shows message like"system will be shutdown after 5 minutes & Save your work"
If you mention 20:00 system will shutdown after 20 hours and It
We can cancel schedule shutdown any time by pressing shutdown -c
Poweroff is used to shutdown machine immediately. poweroff command it will works on all Linux flavor systems
We can also shutdown Linux machines with Linux Run levelsthere are init 0 to 6.(Some Linux run levels are different)
init 0 is used to shutdown machine immediately.
init 6 is used to reboot machine immediately.
init 1 is used to shutdown interfaces it will works non-root user only and single user.
init 2 is used to shutdown interfaces it will works in multiple users
init 3 is used to restart system with network mode
init 4 is mostly we will not use.