Home > News Tips

How to Reset Terminal on Mac to Default [Bash and Zsh]

Updated on Thursday, January 25, 2024

iBoysoft author Jessica Shee

Written by

Jessica Shee

English Français Deutsch やまと Español Português

3 Ways to Reset Mac Terminal to Factory Defaults Safely

If you engage in software development, coding, programming, IT support, or any role involving software-related tasks on a Mac computer, chances are you're acquainted with the Terminal application. This tool is powerful and efficient until you mess the settings up and can't revert or can't type a password in Terminal.

Then you may wonder how to reset Terminal on Mac. This article will introduce 3 ways to help you quickly and safely restore your Terminal application on your Mac to the factory defaults. These steps apply to both zsh and bash shells on your Mac.

What is the Terminal application on Mac?

Mac's Terminal app, similar to Command Prompt on Windows, is a command-line interface (also known as shell) that allows users to interact with the computer's operating system and execute commands through text-based commands. It enables you to execute a range of tasks, including navigating the file system, running programs, managing files, and configuring system settings.

Users type commands in plain text into the Terminal. These commands are specific instructions that tell the computer what tasks to perform. After executing a command, the Terminal displays the output as text. This could include the results of the command, error messages, or other relevant information. 

Compared to a graphical user interface (GUI) with buttons and icons, sometimes, you can control and manage your Mac computer more efficiently via Terminal commands. 

If you find this article helpful, do you mind sharing it?

 

How to reset Terminal on Mac - 3 ways

Mac's Terminal application supports two types of resets:

  • Configuration Reset: If you've customized the preference settings of the Terminal app to suit your preferences, this reset type involves reverting any changes made to the app's configuration.
  • State Reset: The second type resets the terminal application's state when the command line entry or screen output gets corrupted. For example, you consistently encounter a command not found error message on Mac Terminal

Solution 1: Reset Mac Terminal's preferences

Resetting your Terminal application's configuration settings to the original defaults is a simple process. Simply delete the configuration file that stores the settings. Follow the steps below, and you can easily restore your Terminal settings to default.

Step 1. Close the Terminal app if it is open and open the Finder app.

Step 2. On the Finder menu at the top of your screen, select Go > Go to Folder.

Go to Folder in Finder menu

Step 3. Type in or copy the following path to the Go to Folder window and hit Return.

~/Library/Preferences

Preferences folder on Mac

Step 4. In the Preferences folder, look for the files called com.apple.Terminal.plist.

Terminal preferences settings file

Step 5. Right-click on the file and select Move to Trash.

Step 6. Restart the Terminal application and all preferences settings have been reset to the defaults.

Don't be concerned about deleting the file. When you relaunch the Terminal app, it will automatically create a new file to store your settings.

Now you know how to reset the Terminal to the default settings. Let others know too.

 

Solution 2. Reset Terminal on Mac by resetting Shell

To reset the state of a terminal session when your Terminal app is not functioning properly, you have two options - reset Shell or hard reset Shell.  The Reset option fixes issues in the Terminal but does not clean the command in the Terminal screen. 

Here is how to do it:

Step 1. Open the Terminal app on your Mac.

Step 2. Click on the Shell option in the menu bar.

Reset Mac Terminal

Step 3. Select Reset or press Option + Command + R keys altogether on your Mac keyboard.

Solution 3. Reset Mac Terminal by hard resetting Shell 

If you would like to reset everything and clean your Terminal screen, you can choose hard reset the Terminal. 

Step 1. Open the Terminal app on your Mac.

Step 2. Click on the Shell option in the menu bar.

Step 3. Select Hard Reset or press Control + Option + Command + R keys altogether on your Mac keyboard.

Step 4. The Terminal window may appear blank or display only a cursor. Simply press Return, and the Terminal should restore the normal command prompt.

It is simple to reset the Mac Terminal, right? Share this simple trick on your social media now. 

 

Conclusion

When your Terminal is displaying characters or content that you don't recognize during a session, try the solutions in this article to factory reset the Terminal on Mac. You can choose to either reset the Mac Terminal to its default preference settings or restore the default command prompt screen. 

FAQs about how to reset Terminal on Mac

 
A

You can clear all commands in Terminal on Mac at once in several ways.
 1. Type in Clear in the Terminal screen and hit Return.
 2. Press the Command + K keys together on your Mac keyboard.
 3. Press the Control + Command + L keys on your Mac keyboard.
 4. Open Edit in the menu bar and choose Clear to Start or Clear Screen.

A

If your Mac is running macOS 10.14 Mojave or earlier, the default shell is bash (Bourne-again Shell). If your Mac has macOS 10.15 Catalina, the default shell is zsh (Z Shell).

A

No. Performing a factory reset to your Terminal app on Mac just fixes its problems or cleans up the data in the Terminal screen. It doesn't affect your personal data stored on the Mac.

A

The steps to restore Terminal to factory defaults are the same on every Mac model, including MacBook Air and MacBook Pro.