Basics
The Terminal provide a window into the low level operation of your computer.
Last updated
The Terminal provide a window into the low level operation of your computer.
Last updated
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
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).
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
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.
We will now edit this file. Open Finder and using the menus at the top click Go->Home. This takes you to the home directory. Open your file and write something before saving it.
Return to the terminal and PRESS THE UP ARROW to repeat the cat command.
and press return.
You should see the text that you wrote appear on the screen.