Shell commands for Shutdown/Restart/Logout


I would like to share with you, the linux shell commmands for shutdown, restart and logout. You may find these commands handy if your GUI is inaccesible, due to some particular reason, or if you’re a die-hard terminal/TUI fan.
So, the commands are-

  • Shutdown
  •           saji@saji-laptop:~$ sudo shutdown -h now
             
  • Restart
  •           saji@saji-laptop:~$ sudo shutdown -r now
            
  • Logout
  •          saji@saji-laptop:~$ gnome-session-save --gui --logout
            

N.B: The logout command is for Gnome only.

2 thoughts on “Shell commands for Shutdown/Restart/Logout

Leave a reply to srikanth ganta Cancel reply