Cara sederhana untuk me-restart sistem CentOS/Linux Anda adalah dengan menggunakan reboot perintah.
Untuk opsi lainnya, periksa parameternya:
root@web [~]# reboot --help
reboot [OPTIONS...] [ARG]
Reboot the system.
--help Show this help
--halt Halt the machine
-p --poweroff Switch off the machine
--reboot Reboot the machine
-f --force Force immediate halt/power-off/reboot
-w --wtmp-only Don't halt/power-off/reboot, just write wtmp record
-d --no-wtmp Don't write wtmp record
--no-wall Don't send wall message before halt/power-off/reboot
root@web [~]# Anda harus masuk sebagai root untuk mematikan sistem operasi.
Perintah lainnya adalah shutdown . Ini mirip dengan reboot .
Untuk mem-boot ulang mesin dengan shutdown perintah, gunakan:
shutdown -r now Untuk mem-boot ulang mesin pada waktu tertentu, gunakan:
shutdown -r 02:30 Untuk mem-boot ulang mesin setelah X menit, gunakan:
shutdown -r X Untuk mematikan mesin, gunakan:
shutdown -h now Untuk mematikan mesin pada waktu tertentu, gunakan:
shutdown -h 02:30 Untuk mematikan mesin setelah X menit, gunakan:
shutdown -h X
Untuk opsi lainnya, periksa parameter untuk shutdown perintah:
root@web [~]# shutdown --help
shutdown [OPTIONS...] [TIME] [WALL...]
Shut down the system.
--help Show this help
-H --halt Halt the machine
-P --poweroff Power-off the machine
-r --reboot Reboot the machine
-h Equivalent to --poweroff, overridden by --halt
-k Don't halt/power-off/reboot, just send warnings
--no-wall Don't send wall message before halt/power-off/reboot
-c Cancel a pending shutdown
root@web [~]# Untuk informasi lebih lanjut gunakan perintah:
man reboot man shutdown