Loading

Friday, January 1, 2010

Disable Unnecessary Services on Mac OS X

How to disable unnecessary services on Mac OS X based desktop / server / laptop.

Mac OS X uses the following directories to start various services:
  1. /System/Library/LaunchDaemons/ - System-wide daemons provided by Mac OS X
  2. /System/Library/LaunchAgents/ - Per-user agents provided by Mac OS X
  3. ~/Library/LaunchAgents/ - Per-user agents provided by the user
  4. /Library/LaunchAgents/ - Per-user agents provided by the administrator
  5. /Library/LaunchDaemons/ - System-wide daemons provided by the administrator.
launchd manages processes, both for the system as a whole and for individual users using .plist files. Open the terminal and type the following commands to view directory files:
cd /System/Library/LaunchDaemons/
ls -l
ls -l | less

OR
cd /System/Library/LaunchAgents/
ls -l
ls -l | less

Disable Unnecessary Services
Use the launchctl command as follows:
sudo launchctl unload -w /path/to/.plist/file
sudo launchctl unload -w /System/Library/LaunchDaemons/file.plist

In this example, use the following to disable the Bonjour service:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist

No comments:

Post a Comment