Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to create a script to disable/enable the Notification Center, even if it's temporary. It should do the same as manually sliding the Notification Center, scrolling up, and toggling the "Show Alerts and Banner" badge.

Anyone knows if it's posible and how to do it? :)


share|improve this question

To disable Notification Center from the command line, write a KeepAlive key that is false into the /System/Library/LaunchAgents/ like so:

sudo defaults write /System/Library/LaunchAgents/ KeepAlive -bool false  

If you want to re-enable Notification Center, you’d just run the same with a true:

sudo defaults write /System/Library/LaunchAgents/ KeepAlive -bool true  

Method to DISABLE without sudo:

launchctl unload -w /System/Library/LaunchAgents/  
killall NotificationCenter

Method to ENABLE without sudo:

launchctl load -w /System/Library/LaunchAgents/  

Then just hit Command+Shift+G and go to /System/Library/CoreServices/ then find “Notification Center” and double-click it to launch it again

Tutorial with useful info here and here

share|improve this answer
it doesn't seem to work. I tried setting it to false and then triggering a notification through terminal-notifier, and it pops right in, with keelalive false and true. Do I need to do anything else? On the other hand, any chance on not doing it with sudo? Thanks! – Ramiro Araujo Apr 6 '13 at 3:36
Added method without sudo. If it's still not working for you please give me code-error return in terminal. – MnO Apr 6 '13 at 11:40

I just simply alt-click on the menubar icon, which actually greys it out and disables it until clicked on again.

share|improve this answer
Didn't know that, thanks. The question asks for a commandline solution though. – patrix May 30 '13 at 5:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.