If you’re a software developer, coder, engineer or you just like to play around with your computer from the command line for fun or as a hobby, then you are at least a little familiar with Mac’s Terminal application.
Regular users of terminal applications know that we like to configure and set up a terminal app to work in a specific way that we may be comfortable with. Often when trying to do this we mess up or corrupt the settings and don’t know how to get back to the original configuration.
I’m Eric and I have been a software engineer for nearly 25 years. I’ve spent a lot of time in front of computer terminal interfaces so I am quite familiar with how they work and how to configure them. Mac’s Terminal app is somewhat new to me so I have been trying to learn more about it.
If you would like to learn a little with me and see how to reset the Terminal application to its original settings, keep reading and I will show you what I have found.
Contents
What is the Terminal Application?
If you have ever worked in the software world as a developer, engineer, IT support, or various other software-related positions you are probably familiar with a terminal interface. You may also be familiar with it if you are an avid computer user who likes to run things at the command level.
If you are not familiar with terminal interfaces, no worries, I will explain here. A terminal interface is a window or application that lets you run system commands, scripts, applications, and various other things by typing them directly into the computer instead of clicking on a desktop icon.
Commands are typed line by line and output can normally be seen directly below each command that is typed. You can do things like look at what files are on your hard drive, see system configuration settings, change environment variables, and much more.
Most computer systems have some type of terminal interface for which you can use to run commands and scripts from the command line. Apple’s default terminal interface is simply called Terminal and you can find it on your menu or by searching in Launchpad.
Different Way to Reset Terminal
There are two different types of reset that we can do with Mac’s Terminal application. The first type involves resetting any configuration settings we may have changed in the Preferences of the Terminal app.
The second type of reset involves resetting the state of the terminal application when the command line entry or the screen output has been corrupted for some reason. This can often happen from the unexpected output of a command or script that has been executed.
How to Reset Terminal
Configuration Reset
Resetting your Terminal application’s configuration settings back to the original default settings is quite easy. All that you need to do is remove the configuration file that saves the settings. Just follow the steps below to do this and you can quickly have your settings back to default.
Step 1: Close the Terminal app if you have it open.
Step 2: Open Finder.
Step 3: On the Finder menu, select Go->Go to Folder.
Step 4: In the Go to Folder window type ~/Library/Preferences and hit return.
Step 5: Finder will show all the files in the folder, look for the file called com.apple.Terminal.plist.
Step 6: Right-click on the file name and select Move to Trash.
Step 7: Restart the Terminal application and you will now see that the settings have been reset to the defaults.
When Terminal starts back up, it will also create a new com.apple.Terminal.plist file to save any new settings. You can go back at any time and remove it again whenever you want to go back to the default settings. Just follow the same steps you just completed.
Terminal State Reset
To Reset the state of a terminal session when the input or output is corrupted you can simply use the Reset or Hard Reset command on the Terminal->Shell menu.
These commands will reset the current shell if something is corrupted and causing your command-line to act erratically, or if it is frozen or showing no output. Reset will often fix the problem and leave all of the current data on the screen.
Hard Reset will reset everything and also clear the screen so that none of the previous output is left to scroll back to. This is a great option when a command has left your screen full of garbage or unrecognizable characters. This can also work when the terminal screen is frozen.
After clicking on Hard Reset from the menu, you will see a blank screen or a screen with just a cursor. Hit the return key on your keyboard and the terminal should then bring you back to your normal command prompt.
Why Does It Need Reset?
There are lots of reasons that you may need to reset your Terminal application. Many times we like to adjust the configuration settings to make the application easier or more convenient to use or we might just want it to have a cool appearance.
When configuring the app through the settings, we can sometimes make a change that we do not like or that makes the application perform in a way that we do not want it to. If we have changed many things we may not remember how to undo the changes.
It is often easier to just reset Terminal to its original configuration settings.
If you are using the command line in Terminal, it is possible that you can run a command that freezes the screen or gives you odd, random, or unpredictable output. Resetting the terminal state will fix the problem and your command shell will be back to normal.
Why Use Terminal?
If you aren’t familiar with Terminal or don’t have much experience with it, you might be wondering what you would use it for in the first place. In most cases, casual computer users don’t really have much of a reason to use it.
You can do most things with your normal desktop interface, but many older computer users and those who work in software development are very familiar with terminal interfaces and often feel more comfortable doing their work in this type of setting.
The Terminal allows you to run specific commands within the operating system that may not be available or obvious from the normal graphical user interface that most others use. You can run them with specific parameters to carry out certain tasks.
Running commands from the command line can provide you with information that you may need and it can be displayed directly in the terminal window. The information can then be selected and copied in case you need to paste it into a document or something like that.
Using the command line from Terminal can also help you to debug and fix system problems that are not easily seen from your normal desktop. It can take quite a bit of learning and experience to get good at using Terminal but once you learn it, it is a wonderful tool to know how to use.
Running commands from Terminal is very similar and based on UNIX/LINUX operating systems. Take a look at this link if you would like to learn more. You can also take a look at Apple Support’s Terminal Guide for information on configuring it and to see what else it can do.
Final Words
Mac’s Terminal application is a great tool for those who want to run operating system-level commands to do certain tasks, troubleshoot problems, or find out information about your system.
The Terminal can be configured in many ways and there are an almost endless number of commands and scripts that can be run. If and when Terminal gets corrupted or misconfigured you can always reset it with the methods I have described above.
Let me know about your experiences with Mac Terminal. I would love to hear from you.
Chris
Really helpful, thanks!
Joe
Thank you for the post!