shutdown
power off or restartshutdown brings the system down in order: services are stopped, data is written to disk, filesystems are unmounted. It can be scheduled for later and cancelled, with a warning sent to everyone logged in.
shutdown -r now restarts; shutdown -h now powers off. Both do it cleanly.
At the terminal
Read the session first, then the notes: each numbered line in the output is answered by the note with the same number.
What the numbered lines are telling you
Everyone logged in sees the message, and new logins are refused shortly before the time.
-c cancels a scheduled shutdown. Users are told it was called off.
-h halts and powers off; "now" means no delay.
The machine is going down. If it is remote and you chose -h, someone must now press its power button.
Switches
A switch changes how the command behaves. These are the ones used day to day; man shutdown lists the rest. Single-letter switches can usually be joined, so -l -a may be written -la.
-h- Halt and power off.
-r- Reboot.
-c- Cancel a scheduled shutdown.
now- Do it immediately. +10 means in ten minutes; 23:00 means at that time.
-k- Send the warning message only; do not shut down.
Variations worth knowing
The same tool, pointed at a narrower question. These four cover most of what it is reached for day to day.
sudo rebootRestarts now. The same as shutdown -r now.
sudo poweroffPowers off now.
sudo shutdown -r 23:30Restarts at half past eleven tonight.
systemctl suspendSuspends to memory instead of shutting down.
In cybersecurity
Powering off a remote machine is an outage you may not be able to undo from where you sit.
With several SSH sessions open, it is easy to reboot the wrong one. Look at the host name in the prompt before pressing Enter.
A halted machine does not come back by itself. Unless you have remote power control, use -r.
A kernel update does nothing until the machine restarts. Planned, announced reboots are part of keeping a server secure.