Shut Down Linux from the Command Line


To shut down your Linux machine using the command line or terminal, type:

shutdown -h now

You will probably need to be the root user or use the sudo command:

sudo shutdown -h now

You might be wondering what the "-h" is for here. It is a flag for the shutdown command telling it to halt or power off after shutdown. This will ensure that your machine turns completely off.

You can also reboot your machine from the command line.