Turn Off the Shutdown/Restart Dialog Box in Ubuntu
Turn Off the Shutdown/Restart Dialog Box in Ubuntu? By default, Ubuntu is configured to always prompt you with a confirmation dialog box with two choices when you want to shut down or restart your computer. The same thing happens when you log out of your account or lock your session.
The dialog box for restart/shutdown is a safeguard meant to prevent you from accidentally shutting down or restarting your computer. If you’re in a hurry, however, you may tell Ubuntu to shut down and walk away, forgetting about the confirmation dialog box and leaving the computer on. If you would rather not be bothered with the confirmation dialog box when shutting down or restarting your computer, you can turn this dialog box off.
NOTE: Turning off the Shut Down/Restart confirmation dialog box also turns off the Log Out/Lock confirmation dialog box.
Notice that when the confirmation dialog box is enabled, there is no Restart option on the system menu. When you choose Shut Down, the Restart option is on the same confirmation dialog box.
To disable the Shut Down/Restart confirmation dialog box, press Ctrl + Alt + T to open a Terminal window. Type the following command at the prompt and press Enter.
$ gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown true
Oh ya, you do not need to log out or restart for this change to take effect. Notice that the Restart option is not available on the System menu. When you select Shut Down, Restart, Log Out, or Lock, the action now happens immediately without confirmation.
To enable it back. Type the following command at the prompt and press Enter.
$ gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown false
Article source from howtogeek.com