Applying Your Linux Skills to macOS: An Introduction

by Jason W. Eckert | May 04, 2018
A Macbook with the headline Talk Tech to Me: Linux + macOS

This article is part one in a series about using Linux skills when working in a mac operating system. Check out the other articles in the series:

As I mentioned in my blog post All About Linux and Linux+, Linux is essentially an open-source UNIX operating system. And since nearly all of the concepts, commands and files are identical between UNIX and Linux, anyone who is CompTIA Linux+ certified could easily administer a UNIX system. In the job market, this means that CompTIA Linux+ certification is seen as a valid skills benchmark for jobs that require UNIX knowledge.

Likewise, the macOS operating system that runs on Apple computers is also a flavor of UNIX. Thus, most of the concepts you learned when studying for the CompTIA Linux+ certification are also applicable to macOS.

While Windows is the most common client operating system used today, many organizations support some macOS clients. It’s not uncommon to find Apple laptops running macOS within organizations today, or even Apple desktops within departments that do things like graphic and web design. Consequently, when applying for IT administration and support jobs that require a macOS skillset, Linux+ is a big benefit!

However, before supporting macOS within an organization, it’s important to understand the similarities and differences between Linux and macOS from an IT point of view. Keep reading for an overview of what macOS is and how each of the major Linux administration topics covered on the CompTIA Linux+ certification relate to macOS.

Overview of macOS

Simply put, macOS is the operating system that Apple ships on their desktop and laptop computers. While macOS can host server services, it was designed primarily as an end-user operating system and not as a server. (Apple does not sell server hardware products.)

It’s also important to note that macOS is mostly comprised of open-source software. The underlying operating system is an open-source operating system called Darwin that is largely maintained by the BSD UNIX community. Apple simply adds the remaining closed source components that comprise the graphical desktop and app frameworks.

The Mac operating system uses the XNU kernel, which is one-third MACH 3.0 microkernel, one-third BSD UNIX kernel (filesystem and networking) and one-third I/O Kit (which is a driver framework that allows the other two components to interact with Darwin).

Both XNU and Darwin are directly evolved from NeXTSTEP UNIX. When Apple purchased NeXT in the late 1990s, it essentially rebranded NeXTSTEP UNIX as Mac OS X (now called macOS). The latest version of macOS at the time of this writing is called High Sierra (version 10.13).

macOS Filesystem Structure

Although macOS 10.1 through 10.12 typically used Hierarchical File System Plus (HFS+), the default macOS filesystem in macOS 10.13 is the Apple File System (APFS). Both HFS+ and APFS contain the same features found in modern Linux filesystems, such as ext4, as well as macOS-specific features, such as the storage of file fork information used by earlier Apple operating systems.

Regardless of which filesystem is used, the directory structure on macOS is very similar to Linux since all UNIX systems support the Filesystem Hierarchy Standard (FHS). However, there are some notable differences, such as the absence of a /proc filesystem and the use of the /Users directory instead of /home.

These are some common macOS directories:

  • /Applications Stores most user apps
  • /bin Contains binary commands that any user may execute
  • /dev Contain device files used to reference system devices
  • /etc​ Contains most system configuration (symlink to /private/etc)
  • /Library Contains app libraries, documentation, and app settings
  • /Network Contains libraries and information from remote systems
  • /private​  OS information that users should not normally view
  • /sbin​ Contains superuser (root) executables
  • /System Contains most system configuration and operating system files
  • /tmp​ Contains temporary files used by apps (symlink to /private/tmp)
  • /Users​ Default location for all regular user home directories (contains subdirectories for documents, pictures, movies, desktop and so on)
  • /User Information Contains system documentation (is a symbolic link to /Library/Documentation)
  • /usr​ Stores most executables (in /usr/bin and /usr/sbin) and their documentation (/usr/share/man, /usr/share/info, /usr/share/doc)
  • /var Contains log files and spool/content directories (symlink to /private/var)
  • /Volumes​ Contains subdirectories used for mounting devices

NOTE: Only the /Applications, /Library, /System, /User Information and /Users folders are shown in the graphical desktop by default. All other directories are hidden from normal view and may be viewed using a BASH shell.

The same filename rules in Linux apply in macOS. Filenames may be 255 characters in length and contain upper and lowercase letters, numbers, underscores ( _ ) and dashes ( - ). Hidden files start with a period ( . ), and there are two special files in each directory: ( . ) = current directory, ( .. ) = parent directory.

The macOS Desktop

As you can see in the picture below, the macOS desktop is very similar to the GNOME desktop in Linux. The dock along the bottom of the desktop is the macOS equivalent of the sidebar in the GNOME desktop. It contains the trash can (a hidden folder in the user’s home directory, ~/.Trash/*) as well as shortcuts to common apps, including the finder (file explorer) and system preferences (system settings). The context-sensitive menu bar at the top of the macOS desktop is used to control the foreground app, as well as perform common system tasks such as connecting to a Wi-Fi network or shutting down the system.

A screenshot of a macOS desktop

Under the hood, the macOS desktop does not reside on X Windows as in Linux. In macOS, Quartz provides the same functionality of X Windows, and the desktop environment that runs on top of it is called Aqua. X Windows is an optional add-on component in macOS called XQuartz that allows you to run Linux graphical apps within the macOS desktop.

Now that you have an understanding of macOS basics, we can move forward with how your Linux skillset will help you support Apple machines. Check out part two, which covers terminal BASH and common commands in macOS.

Round out your IT skillset with CompTIA Linux+.

1 Comments

  • Claire Bellmonte

    Wednesday, August 8, 2018

    The Unix Operating System is more powerful OS, the Mac operating system uses the XNU kernel, which is one-third MACH 3.0 microkernel which provides high security for your system.

Leave a Comment

Boost your Career with a Certification

Find out more about our Certifications

How to get Certified

4 Steps to Certification

Already certified? Let us and others know!

Share Your Story