Skip to content
Follow
Ubuntu Linux

Change Power Button Behavior in Ubuntu Linux

Richard
Written by
Richard
Oct 16, 2022 Updated Sep 15, 2026 2 min read
How to Use Sticky Notes in Windows 11
How to Use Sticky Notes in Windows 11

Ubuntu Linux power button behavior controls what happens when you press the physical power button on your computer, such as shutting down, going to sleep, hibernating, or doing nothing. Adjusting this setting stops accidental shutdowns on Ubuntu 22.04 LTS and newer versions where a stray press turns off your work.

Advertisement

You can update this option quickly through the main Settings app on your desktop.

⚡ Quick Answer

You can change your Ubuntu Linux power button’s function by opening Settings, navigating to Power, and then selecting Power Button Behavior. Choose from options like Suspend, Power Off, Nothing, Interactive, or Hibernate to customize its action. Your selection applies immediately.

Advertisement

How to change power button behavior in Ubuntu Linux

Ubuntu power button settings can be changed directly from the main Settings app to control what happens when you press the physical button on your computer. You can pick options like shutting down, going to sleep, or showing a menu. Open the Activities overview, type Settings, and click the Power tab to find these options.

Open the Activities overview and type Settings to begin %📂%LNK0%%.

Ubuntu Linux activities overview screen for settings
ubuntu linux activities overview

Alternatively, click the System menu at the top-right corner of your screen and select Settings %📂%LNK1%%.

Ubuntu Linux system menu showing settings option
ubuntu linux system menu top bar settings

Once the Settings app is open, follow this path: Power Power Button Behavior.

Advertisement
Ubuntu Linux power tile in system settings
ubuntu linux power tile

Power Button Behavior options

Ubuntu power button options include Suspend to put your computer into sleep mode, Power Off to shut it down completely, Nothing so the button does not react, and Interactive to show a prompt first. Choosing the right setting helps you avoid accidental shutdowns or quickly put your screen to sleep.

  • Suspend: Puts your computer into sleep mode.
  • Power Off: Shuts down the computer. This is the default setting.
  • Nothing: The button will not trigger any action.
  • Interactive: This option triggers a pop-up menu asking you what you would like to do.
  • Hibernate: This may appear as an option if you have swap space correctly configured on your system.
Ubuntu Linux power button behavior selection options
ubuntu linux power button behavior selection
📝Good to KnowYour choice is applied immediately.

You do not need to restart your computer for these changes to take effect.

Conclusion

Customizing your power button is a simple way to make your PC work the way you want. Whether you want to prevent accidental shutdowns or add a shortcut to sleep mode, these settings give you total control.

How do I change the power settings on Ubuntu?

Open the Activities overview and start typing Power. Click Power to open the panel. In the Power Mode section, choose one of the profiles.

Was this guide helpful?

0% of readers found this helpful (1 votes)

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

Advertisement

📚 Related Tutorials

How to Change What the Power Button Does in Windows 11
Windows How to Change What the Power Button Does in Windows 11
How to Change Power Button Actions on Windows 11
Windows How to Change Power Button Actions on Windows 11
Enable Mobile Hotspot on Ubuntu Linux
Ubuntu Linux Enable Mobile Hotspot on Ubuntu Linux
How to Find and Manage Your Advertising ID Settings in Windows 11
Windows How to Find and Manage Your Advertising ID Settings in Windows 11

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *