From the course: Linux Foundation Certified System Administrator (LFCS) Cert Prep

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Boot, reboot, and shutdown a system safely

Boot, reboot, and shutdown a system safely

- [Instructor] Let's look at how to boot, reboot, and shut down Linux systems safely. To reboot or shut down a Linux machine, we'll often use the systemctl command, which is short for system control. Now, some commands require system administrator privileges. The root user has such privileges, so we can reboot a machine simply by typing systemctl reboot. Now, regular users cannot use commands that change the system state, but they can temporarily get root privileges if they add sudo in front of their commands. So a regular user needs to type in sudo systemctl reboot instead. And all you need to remember is this. If I'm logged in as root, I don't need sudo. So you can skip writing the sudo word if you're already logged in as root. And this applies to all other examples in the lessons where you see sudo. And to recap, to reboot, we type in sudo systemctl reboot, and to shut down, we type in sudo systemctl poweroff. Rarely you might find yourself in situations where the system refuses to…

Contents