How to shutdown Linux Machine/Server

Log in Linux machine as a root user and run the below command.

[root@localhost ~]# init 0