Various Ways Something Can Load On Startup in Mac OS-X
Many of us, Mac users, have probably found ourselves in this situation: something annoying or unnecessary starts at system load on a Mac and we want it to just stop. Unfortunately, there’re a whole bunch of ways this can happen so hunting the culprit down can be a challenge.
Below you can find listed various ways something can launch on startup, in OS-X. If you know any other way: please post in the comments.
So, here we go:
Unix Startup Scripts
/etc/profile- for all users
/Users/$USER/.bash_profile- only for current user
/Library/LaunchDaemons- for all users, runs as root.
/System/Library/LaunchDaemons- for all users, runs as root.
/Library/LaunchAgents- for all users
/System/Library/LaunchAgents- for all users
/Users/$USER/Library/LaunchAgents- for current users only
CAUTION: OS-X stashes essential utilities in
/System/Library/LaunchAgentsso make sure you know what you are doing, before altering them.
> launchctl list
System Preferences > Users & Groups > [specific user] > Login Items
A Cron Job
While cron jobs don’t run on startup, they are a way to make sure some app or service gets to run without an explicit start.
crontab -l- for current user
sudo crontab -l -u root- for all users, run as root
crontab -e- as current user
sudo crontab -e -u root- as root
Login Scripts are deprecated, but some old or malicious apps may still be able to exploit this method.
No user application should ever need to use this method, but somebody could run some code as a Kernel Extension. Fair warning: messing with these is extremely dangerous and you should definitely know what you are doing.