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.

About these ads

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s