Running terminal commands on startup/login How can I run terminal commands on startup or login? On FreeBSD I believe you can do this using rc.d - is there an equivalent for the Mac? I know how to set up Login Items, but these only work for GUI applications, and there must be an elegant way to make terminal commands run without wrapping them in a GUI executable? As clarified below, I sometimes need to sudo these commands.
OSX uses launchd to start Unix scripts and executables at boot or login.

New tasks are added via launchctl to update a plist

An easier way of doing this is to use the app Lingon now available on the Mac App Store or LaunchControl