diese Website in deutscher Sprache - this website in Dutch

Under the hood of your Mac

The foundation of MacOS is an operating system under which so-called mainframes or enterprise systems run: UNIX. These are mainly large business and university computers.
The first UNIX was developed in 1969 by Bell Laboratories. In those days, memory was terribly expensive and computers were still the size of the average living room. Programs therefore had to take up little memory. UNIX therefore consists of all kinds of small programs. A characteristic of small programs is that they contain fewer errors than large ones and - very important - when one crashes, the rest does not fall over.
In addition, UNIX became a powerful operating system that enabled multitasking (multiple commands at once) and multi-user (multiple users). A strict separation between different users and their privileges made Unix not only a powerful but also above all a secure system. After all these years of improvements and adjustments, the system is now the most reliable that exists.

Variants of UNIX
UNIX now has several variants such as HP-UX, SGI, Sun Solaris, IRIX and the Free BSD version developed at the University of Berkeley.
MacOS is therefore based on the latter. The popular Linux is also a UNIX variant!
UNIX is controlled by text commands and / or by a GUI, a Graphical User Interface. Such a graphical operating system means you don't need anything to remember commands and UNIX has gained the user-friendliness of the Apple Macintosh.

Why UNIX?
The reason is simple: poorly written software that crashes almost never takes over the entire system.
The old MacOS - pre 2001, and now called "Classic" - was much more sensitive, once a week a crash - almost always due to Microsoft software (!) - was normal there. Without MS Software much, much less crashes.

MacOS
The MacOS - with the graphical user interface - originally dates from 1984. It unleashed a true revolution.
In a time when computers were controlled only with text commands, suddenly a tray that worked with a mouse, could talk and show pictures. Over the years, more and more options were added. The MacOS, which has seen many improvements over the years, grew out of its format. Apple - under the inspiring leadership of the late Steve Jobs - decided it was necessary for a new system. Not built from the ground up, but based on the time-honored, rock-solid UNIX.


Another UNIX advantage: system management by the system itself
As an operating system, macOS can maintain itself. It does not require separate software for that.
MacOS contains a large number of files that are invisible to the user and can take up a lot of space on the hard disk. These files are removed from your HD by the so-called Cron scripts. This happens during startup. There are scripts for daily, weekly and monthly maintenance. So you can leave your Mac on at night.


Typing commands instead of mice
For those who like it, the Mac can also be controlled by typing commands in the 'Terminal' utility:



UNIX Commands
A simple command is 'ls'. It shows the contents of your Home folder:



UNIX Commands 2
- Stop everything at once (without saving!) And turn off Mac:

sudo halt



Tap the 'enter key' and you're done. The Mac will now turn off without asking any questions (!). Something not saved? Too bad.


- Delete a file (which makes it difficult and does not want to be deleted, for example):

Type this command in the Terminal:

sudo rm

Or in a case of a folder:

sudo rmdir

Then drag and drop the file to the terminal.
You will now get the file in the full path name after sudo rm.
This saves typing and you don't make any mistakes, because the 'sudo' command CANNOT BE RESET.
Then hit 'enter' and optionally enter your administrator password and you're done.

WARNING FOR THE SUDO COMMAND
What actually happens under the 'sudo' command is that you are temporarily 'root'. It stands for "Superuser Do". You are then the most powerful person behind the machine. Incorrect use of the 'sudo' command can therefore be dangerous! Terminal will therefore warn you the first time to think before you tap and to respect the privacy of others:





- Opening the CD tray (old fashioned):

drutil tray open

UNIX commands do indeed work WITH spaces!



Test your network: ping
Suppose you want to log in to a (wired or wireless does not matter) network. You try to access the network via a router, modem or server and you cannot.
However, if you know the IP address of the router / modem / server, you can always test whether it is 'awake' and you can reach it. You can 'ping' it.
Pinging is no longer like sending a small data package and seeing if it comes back. Like calling out in an echo pit.
It's the most essential server test out there, after all






Log files
UNIX keeps a close eye on events within the system. You can view these 'log files' in the Console utility:



Abacadabra?
Log files can help you solve a problem, but reading them is a skill. Pay attention to the time and search online for the terms that are there. It can help you find the source of the problem.





The next chapter is:
solving problems






Disclaimer: MacMiep is independent. This means she writes what she wants, based on 30 years of Mac-experience. She doesn't get paid for stories (positive or negative) on this website. MacMiep is not interested in your data. However, she does use Google's services. Google is indeed interested. Are you happy with MacMiep? Please support your local cat shelter.