Mac Terminal Not Working? Fix It in Minutes
In this article
If your Mac Terminal is not working—whether it won't open, freezes, shows a blank window, or spits out errors—the quickest fix is usually to restart the app, check for a stuck process, or reset its preferences. In most cases, a simple restart or a preference reset resolves the issue. Below is a step-by-step guide to get Terminal back to normal.
What You'll Need
- Your Mac (any model running macOS)
- Administrator access (you'll need it for some steps)
- About 10–15 minutes of time
Step-by-Step
- Force quit Terminal. If Terminal is frozen or unresponsive, press Command + Option + Escape, select Terminal in the list, and click Force Quit. Then reopen Terminal from the Applications > Utilities folder or via Spotlight (Command + Space, type “Terminal”).
- Restart your Mac. A full restart clears temporary glitches. Click the Apple menu > Restart. After it boots, try Terminal again.
- Check if Terminal opens but shows a blank window. This often happens when the default shell is misconfigured. In the Terminal menu bar, click Shell > New Window or press Command + N. If that works, the issue is with your saved window settings.
- Reset Terminal preferences. Quit Terminal. Go to ~/Library/Preferences (in Finder, press Command+Shift+G and type that path). Find the file named com.apple.Terminal.plist. Move it to your Desktop (as a backup), then reopen Terminal. It will create a fresh preferences file. If Terminal works now, you can delete the old plist or keep it as backup.
- Check for a stuck shell process. If Terminal opens but every new window shows “-bash: fork: Resource temporarily unavailable” or similar, there may be too many processes. Open Activity Monitor (from Applications > Utilities), click the CPU tab, and look for any process using high CPU. If you see something like bash or zsh stuck, select it and click the X button to force quit it.
- Verify your default shell is valid. Go to System Settings > Users & Groups (or System Preferences on older macOS). Right-click (or Control-click) your user account and select Advanced Options. Check the “Login shell” field—it should be /bin/zsh (or /bin/bash on older systems). If it’s empty or wrong, change it to /bin/zsh and restart.
- Run First Aid on your disk. If Terminal still won't work, disk corruption might be the cause. Restart your Mac and hold Command + R to enter Recovery Mode. Open Disk Utility, select your startup disk, and click First Aid. Run it—this can take a while. When done, restart normally.
- Reinstall Terminal (if nothing else works). Terminal is part of macOS, so you can't delete it, but you can reinstall macOS from Recovery Mode. This won't erase your data. In Recovery Mode, choose Reinstall macOS and follow the prompts. This will replace system files, including Terminal, while keeping your files and apps.
Common Mistakes
- Deleting the plist file without backup. Always move the file to your Desktop instead of deleting it immediately. If something goes wrong, you can restore it.
- Changing the login shell to an invalid path. Only use /bin/zsh or /bin/bash. Typing a wrong path will prevent Terminal from opening at all.
- Ignoring permission issues. If you see “Permission denied” when opening Terminal, your user account may have lost admin rights. Check in System Settings > Users & Groups that your account is listed as “Administrator”.
- Assuming it's a virus. Terminal issues are almost always software glitches, not malware. Don't install random “cleaner” apps—they can make things worse.
Tips
- Keep your macOS updated. Many Terminal bugs are fixed in system updates.
- If you use custom shell profiles, try switching to the default profile (Terminal > Settings > Profiles > Basic) to see if that helps.
- Use Command + K to clear the terminal screen if it looks frozen but is actually just full of text.
- If you have multiple monitors, check that the Terminal window isn't opening on a disconnected display. Press Command + Tab to switch to Terminal, then go to Window > Bring All to Front.
- Create a new user account temporarily to test if the issue is specific to your user profile. If Terminal works there, the problem is in your user's settings.
Troubleshooting
If you've gone through the steps and Terminal still isn't working, try these additional checks:
- Check if the issue is with a specific command. If Terminal opens but a command like
lsorcdfails, the problem might be in your shell configuration files (.zshrc or .bash_profile). Rename them to .zshrc_backup and restart Terminal. - Boot into Safe Mode. Restart your Mac and hold the Shift key until the login window appears. Safe Mode runs a disk check and disables third-party extensions. If Terminal works in Safe Mode, a login item or extension is interfering. You can then remove it.
- Check for a corrupted system cache. In Recovery Mode, open Terminal from the Utilities menu and run
fsck -fyto repair the filesystem. This is an older tool but still works. - If Terminal opens but shows “zsh: command not found” for everything, your PATH variable is broken. In Terminal, type
export PATH=/usr/bin:/bin:/usr/sbin:/sbinand press Enter. This will temporarily fix it. Then edit your .zshrc file to correct the PATH. - If you see a message about “Terminal can't be opened because it's damaged,” this is rare but can happen after a failed update. Reinstalling macOS as described above is the fix.
Frequently Asked Questions
Why does Terminal open and close immediately?
This usually means your shell configuration file has a syntax error or an incompatible command. Open Terminal in Safe Mode (hold Shift during boot), then rename your .zshrc file to .zshrc_backup and restart Terminal normally.
Can I reset Terminal without losing my saved commands?
Yes. Resetting preferences (step 4) only affects window settings, not your command history. Your shell history is stored in ~/.zsh_history (or ~/.bash_history) and is not touched by resetting Terminal's plist.
Why is Terminal so slow to open?
This can happen if your shell profile loads many plugins or if your home folder is on a slow network drive. Try renaming .zshrc to see if speed improves. Also check if you have many background processes running.
Is it safe to delete the com.apple.Terminal.plist file?
Yes, it's safe—Terminal will recreate it with default settings. But always back it up first by moving it to your Desktop, just in case you want to revert.
What if Terminal works but shows a weird error like “-bash: /usr/local/bin: Is a directory”?
This means your PATH variable is misconfigured. Open Terminal, type export PATH=/usr/bin:/bin:/usr/sbin:/sbin, then edit your shell profile to remove the incorrect line.
Can I use a third-party terminal app instead?
Yes, you can download iTerm2 from the official website, but it won't fix the underlying issue if your system shell is broken. It's better to fix Terminal first, then try alternatives.