Phần này nói về cách : tắt máy như thế nào ? khởi động như thế nào ?
* Lệnh : shutdown
Sử dụng lệnh : man shutdown để xem thông tin về lệnh này
SYNTAX
shutdown [options] when [message]
OPTIONS
-c Cancel a shutdown that is in progress.
-f Reboot fast, by suppressing the normal call to fsck
when rebooting.
-h Halt the system when shutdown is complete.
-k Print the warning message, but suppress actual shutdown.
-n Perform shutdown without a call to init.
-r Reboot the system when shutdown is complete.
-t sec
Ví dụ :
Tắt ngay lập tức :
shutdown -h now
Khởi động lại ngay lập tức:
shutdown -r now
Tắt máy vào lúc 8 tối (pm):
shutdown -h 20:00
Sau 10 phút thì tắt máy:
shutdown -h +10
* Lệnh : halt, reboot, poweroff
Từ kernel 2.74 trờ về sau này, lệnh halt, reboot không được gọi trực tiếp mà nó đã được tích hợp vào trong lệnh shutdown như bạn thấy ở trên. Nếu bạn dùng các kernel cũ thì vẫn dùng được các lệnh này.