If you’re not, the Terminal is an application included in every version of OS X into the Utilities folder which provides a command line interface to manually control your Mac. In this roundup I’ve collected the best links about Terminal.app: you’ll find the best commands, hacks and tips to get the most out of it. The Terminal can help you configure your Mac exactly how you want it and provide access to features that just don't have any graphical interface to change. There are many options that are perfectly safe to use but to avoid overwhelming the user, they're hidden away, only to be found by power users wanting to make the change.
Terminal User Guide
Each window in Terminal represents an instance of a shell process. The window contains a prompt that indicates you can enter a command. The prompt you see depends on your Terminal and shell preferences, but it often includes the name of the host you’re logged in to, your current working folder, your user name, and a prompt symbol. For example, if a user named michael is using the default zsh shell, the prompt appears as:
This indicates that the user named michael is logged in to a computer named MacBook-Pro, and the current folder is his home folder, indicated by the tilde (~).
Open Terminal
Mac Os Terminal Hacks
On your Mac, do one of the following:
Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal.
In the Finder , open the /Applications/Utilities folder, then double-click Terminal.
Quit Terminal
In the Terminal app on your Mac, choose Terminal > Quit Terminal.
Quit a shell session
In the Terminal app on your Mac, in the window running the shell process you want to quit, type
exit
, then press Return.
Best Mac Terminal Hacks
This ensures that commands actively running in the shell are closed. If anything’s still in progress, a dialog appears.
If you want to change the shell exit behavior, see Change Profiles Shell preferences.