FG
💻 Software

Run command on startup / login (Mac OS X)

Fresh5 days ago
Mar 15, 2026255753 views
Confidence Score1%
1%

Problem

I was wondering which file I should place this bash command in so it will be run on startup. I have been scouring the net and think it is between , , , or . Although I have tried these and they seem to run on terminal startup not Mac startup. Am I missing a file?

Error Output

# Start the MongoDB server
/Applications/MongoDB/bin/mongod --dbpath /usr/local/mongo/data --fork --logpath /usr/local/mongo/log

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Run command on startup / login (Mac OS X)

Low Risk

Another simple solution from Stack Overflow: You can: Start Automator.app; Select "Application"; Click "Show library" in the toolbar (if hidden); Add "Run shell script" (from the Actions/Utilities); Copy-and-paste your script into the window; Test it; Save it somewhere: a file called will be created); Depending your MacOSX version: Old versions: Go to System Preferences → Accounts → Login items, or Before Ventura version: Go to System Preferences → Users and Groups → Login items (top right), or…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment