To shut down or reboot a Linux system, you can use the systemctl command. You can also use the shutdown command, which has two options: --halt stops the operating system, and --poweroff turns off the system. Here are some examples of shutdown commands: shutdown -h Shuts down Linux in under a minute shutdown -r Restarts Linux in under a minute shutdown -h 0 Shuts down Linux immediately shutdown -r 0 Restarts Linux immediately shutdown -h 20 Shuts down Linux 20 minutes after the command is entered shutdown -r 17:30 Shuts down Linux at 5:30 p.m. You can also schedule a reboot or... Show more To shut down or reboot a Linux system, you can use the systemctl command. You can also use the shutdown command, which has two options: --halt stops the operating system, and --poweroff turns off the system. Here are some examples of shutdown commands: shutdown -h Shuts down Linux in under a minute shutdown -r Restarts Linux in under a minute shutdown -h 0 Shuts down Linux immediately shutdown -r 0 Restarts Linux immediately shutdown -h 20 Shuts down Linux 20 minutes after the command is entered shutdown -r 17:30 Shuts down Linux at 5:30 p.m. You can also schedule a reboot or shutdown of a Linux system. For example, to shut down at 02:00 AM, you can type sudo shutdown 02:00. You can check your Linux system's shutdown and restart history using the command line: tuptime -t Displays the history and statistics of all the shutdowns and restarts of a Linux system journalctl --list-boots Queries and views logs collected by systemd You can also use sudo to temporarily get root privileges. For example, to reboot a machine, you can type sudo systemctl reboot Show less
To shut down or reboot a Linux system, you can use the systemctl command. You can also use the shutdown command, which has two options: --halt stops the operating system, and --poweroff turns off the system.
Here are some examples of shutdown commands: shutdown -h Shuts down Linux in under a minute shutdown -r Restarts Linux in under a minute shutdown -h 0 Shuts down Linux immediately shutdown -r 0 Restarts Linux immediately shutdown -h 20 Shuts down Linux 20 minutes after the command is entered shutdown -r 17:30 Shuts down Linux at 5:30 p.m. You can also schedule a reboot or shutdown of a Linux system. For example, to shut down at 02:00 AM, you can type sudo shutdown 02:00.
You can check your Linux system's shutdown and restart history using the command line: tuptime -t Displays the history and statistics of all the shutdowns and restarts of a Linux system journalctl --list-boots Queries and views logs collected by systemd
You can also use sudo to temporarily get root privileges. For example, to reboot a machine, you can type sudo systemctl reboot
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.