How to Change the Duration of Notifications on MacOS

John John (304)
1 minute

I enjoy Apple's notification center, but sometimes I get way too many notifications. This can be distracting, not to mention it takes up screen real estate for quite a while. To my knowledge, there is no way to change the duration of notifications in System Preferences, but it can be done using the defaults command.

Posted in these interests:
h/mac111 guides
h/apple144 guides
h/productivity4 guides

You can open Terminal by using Finder and going to Applications > Utilities > Terminal. Or you can hit cmd + space bar and search for Terminal.

Type the following into Terminal:

defaults write bannerTime -int {duration}

Substitute {duration} for your desired duration. Since I wanted to shorten the duration of the notifications dramatically I used:

defaults write bannerTime -int 1

In order for this change to take effect you must log out and back in. Click on the "Apple" in the top left of the screen and click "Log out ...". Or you can type cmd + shift + Q.

If you'd like to test out the notification duration, you can run the following command in Terminal to display notifications from the command line:

osascript -e 'display notification "test notification!"'
See if your battery needs to be replaced.
1 minute

Because your MacBook is so important for all that you do in a day, it is important to take good care of your Mac battery, monitor your Mac's battery health, and check the cycle count of your Mac's battery when to determine if your Mac needs a new battery. This might sound like a lot of maintenance, but checking your Mac's cycle count is an easy way to determine if your Mac needs a new battery, and it's actually incredibly simple. A battery's maximum cycle count is how many charge cycles your Mac can complete before the battery is no longer able to perform and will need replacing. In this guide, I show you how to check your Mac battery's cycle count and determine if your battery needs to be replaced.