Linux Basics Practice Test: Startup & Shutdown — Flashcards | Linux | FatSkills

Linux Basics Practice Test: Startup & Shutdown — Flashcards

Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.

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

1 of 12 Ready
Which of the following is not a valid run-level
8
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password