Ubuntu comes with a powerful set of keyboard shortcuts that you can utilize in order to increase your productivity through minimum effort. When you have a good grip over the shortcuts, you can avoid using the mouse; which saves a lot of time. You can also focus more on your work rather than following the mouse pointer. Keyboard shortcuts are especially useful if you do a lot of text editing; your hand muscles will actually thank you for avoiding the mouse.
If you have shifted to Ubuntu from Windows like me, you must be used to the very frequently used shortcut Ctrl+Alt+Del for shutting down and restarting your system. Even in the older versions of Ubuntu, the same shortcut was assigned by default for shutting down/powering off the system. In the newer versions, however, the Ctrl+Alt+Del shortcut is assigned for logging out of the system. Logging out simply ends the current user’s session so that another user can use it.
In this article, we will explain how you can use the Ctrl+Alt+Del shortcut for the same old purpose; shutting down your Ubuntu Desktop. The process includes:
- Disabling the Ctrl+Alt+Del shortcut for logging out.
- Creating a custom shortcut for shutting down.
We have run the commands and procedures mentioned in this article on a Ubuntu 18.04 LTS system.
Step 1: Disabling Ctrl+Alt+Del as the shortcut for logging out
Since the said key combination is already being used by Ubuntu for the purpose of logging out, let us first specify some other shortcut for logging out.
Open the Settings utility from Ubuntu application launcher search or the down arrow button located at the top right corner of your screen. Click the Devices tab from the left menu of the Settings window. Then, click on the KeyBoard tab from the Devices menu. The following Keyboard view will be displayed in the right panel:
Alternatively, you can directly open the Settings utility in the Keyboard view as follows:
Scroll down to the System category in Keyboard Shortcuts and click on Log Out; a Set Shortcut dialog will appear. Enter an unused key combination, such as Ctrl+Alt+K.
Now click the Set button. You can now log out of your system using the Ctrl+Alt+K shortcut and the Ctrl+Alt+Delete shortcut is free to be used as a custom shortcut.
Step 2: Create Ctrl+Alt+Del as a custom shortcut for shutting down
Scroll down the Keyboard view in the Settings UI and click the + button. The Add Custom Shortcut dialog will appear.
Enter the following information in the Add Custom Shortcut dialog:
Command: gnome-session-quit –power-off
Shortcut: Set a shortcut by pressing the “Set Shortcut” button and then setting a shortcut by pressing Ctrl+Alt+Del keys simultaneously. The following dialog will then appear:
Your new shortcut is now set. Press the X button to return to the Settings utility.
You will be able to see the newly set shortcut in the Custom Shortcuts list as shown above.
Try this shortcut by pressing Ctrl+Alt+Del. The following Power Off dialog will appear every time you do so:
Through this dialog, you can do the following things:
- Cancel the power off process
- Restart your system
- Power Off the system
If you do not press any of the buttons, the system will automatically shut down after 60 seconds. The dialog even shows a countdown, by the delay of 10 seconds, after which your system will be powered off.
Through the power of custom shortcuts on Ubuntu, you were able to get the good old Ctrl+Alt+Del shortcut back for powering off your system. You can utilize the same procedure for creating shortcuts for your frequently used commands/processes on Ubuntu.