Is it worth learning Terminal on Mac?

OS X: The terminal for beginners

When Apple was faced with the decision at the end of the 90s to replace the old, aging Mac OS with an operating system that was not only able to exhaust the current high-performance hardware, but also had multi-user and multitasking capabilities, they decided Steve Jobs and his colleagues decided to use an already existing system as a basis and to combine this with the most important elements of the well-known and popular graphical user interface of Mac OS. This is NeXTStep. Like the Mac, the iPod and the iPhone, NeXTStep is also a "baby" from Steve Jobs. He and his colleagues developed it in his new company NeXT, Inc. after leaving Apple in 1985. It originally served as the operating system for the legendary NeXT Cube and the NeXT workstation. NeXTStep itself is a conventional Unix operating system. More precisely, it is a derivative of the widespread BSD Unix - and thus the descendant and descendant of what is probably the oldest command line-oriented operating system of all, Unix.

Checklist: advantages of the command line

• Acquire Unix knowledge
• Look behind the scenes of OS X
• Complete overview of the directory structure
• Display of hidden data possible
• Targeted management of files
• More flexible work
• Detailed configuration of the Mac
• Faster remote maintenance online

Unix can look back on more than forty years of history. It was initially developed for scientific and professional purposes as well as users and controlled the minicomputers of the time. These were not, of course, computers the size of a Mac mini, but were the size of closets. Compared with even older computers that filled entire halls, they were considered small. Since then, Unix operating systems have been installed on all kinds of computers - from high-performance computers to Macs and PCs to tablets and cell phones. IOS and Android are nothing more than Unix derivatives.

From the terminal to the terminal app

Most of these Unix descendants and relatives have now been given a graphical user interface to make them easier to use and configure and thus more suitable for the mass market. However, their better usability also has its pitfalls. On the one hand, the actual operating system, its commands, directories and thus its enormous possibilities remain largely hidden from the user, and on the other hand, it restricts the intervention and configuration options. This is exactly where the OS X terminal app comes in.

What is a terminal?

If you are wondering why this app was called “Terminal” and not “Command Prompt” as in Windows or “Command Line”, then this is for the following reason. The earlier mainframes that were operated under Unix were not actually PCs that could be placed on any table, as is common today. They were located in separate, air-conditioned rooms and buildings, and they were accessed via terminals. A terminal basically consisted of a screen, a keyboard, possibly a mouse and the necessary communication electronics. Each user logged on to the terminal and had access to their user account as well as the storage space and computing capacity allocated to them.

The OS X terminal does nothing else today. It is responsible for input and output. The processing of the commands is done by the so-called "shell", which is started automatically when the terminal is called up. The "Bourneagain Shell" (Bash) is set as standard in OS X. Unix professionals may use other shells, these differ mainly in the integrated commands and their configuration options. Ultimately, the shell is comparable to the OS X Finder - a kind of basic program that provides commands for operating the computer, forwards them and, if necessary, starts other programs.

The OS X terminal app

The OS X Mavericks Terminal app can be found in the Applications / Utilities folder. You start it like any other application with a double click. Then an unadorned window with black letters on a white background appears in which you can enter your commands.

Customize the terminal app

If you do not like the representation of the terminal app, you can adapt it. Apple provides numerous preconfigured profiles with different background colors and fonts. To select one of these, open the “Settings” menu via the “Terminal” menu. There you select the “Start” tab and look for the appropriate profile in the “Open on startup” drop-down menu. You can find out what the profiles look like in the "Settings" tab. A good choice is the “Homebrew” profile - named after the Homebrew Computer Club founded in Silicon Valley in 1975, of which Steve Jobs and Steve Wozniak were among the founding members. After choosing the profile, it also makes sense to set a different font size. The standard size is a bit difficult to read on higher resolution screens. To do this, open the tab of the same name in the Terminal settings and select the profile - here Homebrew. Use the "Change" button to adjust the font and size. Attention! Use only so-called non-proportional fonts in which the characters are always the same width. Otherwise the representation will be illegible. In the OS X font selection menu, these are grouped into the groups “Fixed Width” or “Fixed Width”. Set the font size to 18 pt or larger. Otherwise you don't have to change anything. Then start a terminal with the selected settings. To do this, select the “Shell” menu and the “Homebrew” entry.

The first steps in the terminal

At the end of the first episode, you only take the first “walking steps” in the shell, so that you get a feel for what it is like to control and operate a computer with more than just a keyboard, mouse or finger tip. What you see first after starting the Terminal app is explained in the illustration above. You will see the shell prompt with a cursor waiting for your input. First, let's check which directory you are in. To do this, enter the following command and press "Enter" (see box "Terminal commands"):

pwd¶

This shows the directory you are currently in. Usually this is your home directory, which - as explained above on the right - is abbreviated with a tilde "~" in front of the user name. Next, you'd like to see which folders are in your home directory. To do this, type in the following command.

ls -l¶

A detailed list of the folders is displayed. If you would like to list all hidden files and folders - which is one of the advantages of the OS X terminal - then enter the following command:

ls -la¶

This means something like “List me the directory in the long version” and “show all contents”.

And with this you have learned how a command is basically structured in the terminal. First the name of the command or the program to be started is entered. So ls. This is followed by a space and, if necessary, a hyphen with an argument or an option of the command or program. You can find out which arguments or options a command accepts using the Unix man pages - i.e. the online help. You can call this up using the man command. So if you want to call up help on the command ls, the following entry is sufficient:

man ls

Note that you must have a good working knowledge of English to read the man pages. The help pages are also very long. To quit the display of a man page, simply type q for Quit.

That should be enough for the first episode. The others are each dedicated to individual subject areas, such as hardware-related functions, commands for file management, for displaying and editing text files and so on.

Terminal commands

If you have to enter a space when making an entry, this is marked with a ·. Some commands take up several lines on paper, but can be entered in the terminal without interruption. Only when you see the symbol ¶ in the tip, press the Enter key.