Basics

The Terminal provide a window into the low level operation of your computer.

What Is Terminal?

Terminal is an interface for you to execute text-based commands, and it gives you direct access to the underlying operating system, via a shell, on your Mac. A long time ago, before computers had graphical user interfaces (GUIs), the only way to operate a computer was through the command line. Needing to run the computer through the command line helped users better understand what was going on inside their computer.

Ever since GUIs became more commonplace, we have almost forgotten about the command line, and the typical Mac user probably doesn't even know that it exists. This may be okay for the layperson, but if you want to really know how to use computers to their full potential, it's still crucial that we know how to use the terminal.

To load the terminal, press CMD-space and type terminal

List the Files

To have a look around type ls and press return. ls stands for list and shows you the files and folders at this location - the Home directory (folder).

Create A File

To make a file we will use the touch command. Make sure that you have a Finder window open in your home directory first so that you can see the file being created.

Type

touch myfile.txt 

and press return.

This creates a file called myfile.txt The .txt part tells the computer that we want a text file. This will let us edit it easily. DO NOT INCLUDE SPACES IN YOUR FILE NAME

To see if the file was created, type ls and see if your file is there.

Look Inside

Return to the terminal and PRESS THE UP ARROW to repeat the cat command.

cat myfile.txt

and press return.

You should see the text that you wrote appear on the screen.

Last updated

Was this helpful?