How to reboot/restart Linux Machine

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

[root@localhost ~]# init 6

OR

[root@localhost ~]# reboot

Above both commands work.