Get started with Terminal on Mac
Terminal is an app you use to perform tasks using a command-line interface (CLI) in macOS.
Use the command line
You can use the command line in Terminal to efficiently execute commands, run tools and run shell scripts. For example, to see a list of files in your default folder, type the List command ls
, then press Return. When you’ve finished, clear the window of the list by choosing Edit > Clear Screen.
Find the commands you need
To look up UNIX commands, you can use the command man
to display manual pages, called man pages. To display a man page with the details about the man
command, type the command man man,
then press Return. To close the man page and clear the window, press Q.
Set up Terminal windows
You can change the look of Terminal windows so they are easy to identify when several are open at the same time. To see window options, choose Terminal > Settings, then click Profiles.
Ready to try scripting?
If you are new to scripting, see Apple Developer website: the Shell Scripting Primer to learn more about working with shell scripts in Terminal.
Want to learn more?