Software

Differences between macOS and Linux: let’s discover them together

Differences between macOS and Linux: let's discover them together

When it comes to operating systems, we often focus on the direct comparison between Windows and Linux. Instead, the differences between macOS and Linux. This is a significant comparison for two platforms that many, even today, consider similar at a low level. Rightly? Wrongly? Let’s find out together.

What makes us believe that macOS and Linux have a lot in common is that both operating systems support the use of UNIX commands in the terminal window. Windows, however, does not, unless you install a component like WSL (Windows Subsystem for Linux) which, thanks to virtualization, allows you to run the main Linux distributions in a window and even allows direct interaction with the file system of the host machine.

The birth of macOS is linked to UNIX more than Linux: here’s why

The history of macOS (which used to be called Mac OS The invention of the platform is due to the work done by Steve Jobs and his NeXT Computer, when the unforgettable and unforgettable CEO was not working in the ranks of the company he co-founded (Jobs had left Apple in 1985). Technically, the operating system based its operation on the Mach kernel and BSD, which in turn was derived from UNIX.

Il kernel Mach is a microkernel developed at Carnegie Mellon University. It was meant to be lightweight and modular, with basic functions such as memory management and managing processes in separate spaces, which communicate with each other via messages.

BSD (Berkeley Software Distribution) is a family of operating systems UNIX-like developed at the University of Berkeley in California. BSD is known for its contribution to free and open source software: its kernel has a long history and integrates advanced features such as support for networks, file systems, and security.

In macOS, the kernel XNU (XNU is Not Unix) combines elements of the Mach kernel and BSD, creating a hybrid that incorporates features from both worlds. The hybrid kernel created following the work carried out by NeXT Computer provides the low-level functions necessary for the functioning of the operating system still used today on Apple systems.

The operating system from which macOS was born: NeXTSTEP

NeXTSTEP was born in 1988 as an operating system developed by NeXT Computer incorporating “the fundamentals” of the Mach kernel and BSD. It did not achieve great success but the operating system became significant for subsequent steps, so much so that Apple acquired NeXT in 1997. This is the main reason why macOS combines UNIX components with a wide range of Apple proprietary technologies.

The differences between Linux kernel and macOS kernel

Otherwise, the Linux kernel was born in 1991 by Linus Torvalds. Then a student, Torvalds was interested in experimenting with the UNIX operating system, but could not afford access to a full UNIX system on his personal computer. Therefore, he decided to create an operating system UNIX-like that could really be compatible with his computers. Starting from 1992, the GNU/Linux combination led to the formation of a completely free operating system.

In itself, in fact, the Linux kernel cannot, on its own, be considered an operating system: it needs several additional components, for example the desktop environment, to declare themselves as such. The various ones Linux distributions they are real operating systems that meet the specific needs of each user: private, professional or corporate. Recently, for example, we talked about the best immutable Linux distributions.

While the kernel macOS combines the characteristics of a microkernel kernel (Mach) with those of a monolithic kernel (BSD), on Linux only a monolithic kernel is used.

What is a monolithic kernel

In a monolithic kernel, all kernel functionality, such as memory management, process management, device drivers, and the file system, are executed in the kernel space itself as a single block of code. These features share the same memory space and can call each other directly, without having to go through complex system interfaces. The approach used makes the monolithic kernel efficient in terms of performance, since system calls and communications between different parts of the kernel can happen quickly and directly.

However, the monolithic kernel can be more complex to manage and maintain compared to other types of kernels, since all features are integrated into a single unit. Furthermore, a failure in one part of the kernel can affect the entire system, making the monolithic kernel potentially less robust in certain situations than other types of kernels, such as microkernels or hybrid kernels.

What Linux and macOS have in common

macOS uses UNIX components and Linux was built like alternativa a UNIX. Therefore, the two operating systems have something in common. Both platforms, for example, provide access to UNIX commands, Bash/Zsh, and other shells. The default shell can be changed by the user according to his specific preferences.

For the rest, thesoftware ecosystem they have evolved in a truly explosive way over the years, obviously proceeding on completely different tracks.

Proprietary approach versus open code

macOS is and remains a proprietary operating system: users, experts, developers and any other person do not have access to it source code of the Apple operating system.

A part of the “whole” is available, for example the GNU libraries. And it is also possible to get your hands on the code of the kernel XNU used in the development of the macOS and iOS operating systems. However, it is not possible to reuse the code to develop a macOS clone to install on any machine, regardless of the hardware configuration used. In another article we saw the differences between open source and free software.

Obviously, the transparency provided by the Linux model undoubtedly offers greater advantages. If nothing else, the ability to access code on Linux without doing strenuous tasks reverse engineeringwhich is also disliked by Apple, allows you to identify and resolve any bugs and security problems even more quickly.

Using macOS and Linux: which systems support them

It goes without saying that macOS is designed to run exclusively on Apple desktop systems and laptops. The developers of Fedora Asahi Remix they succeeded in bringing an alternative operating system to Apple hardware which, for example, offers better performance with OpenGL compared to macOS. All thanks to painstaking work reverse engineering and on the development of code from scratch.

However, Linux is used practically everywhere. Especially on systems serverbut also on devices for the Internet of Things (IoT), on single-board computeron desktops and notebooks as well as in places you couldn’t even imagine.

macOS vs Linux: the “user experience” chapter

macOS offers, as is known, a pleasant user interface. It’s visually appealing with nice animations and spot-on graphics choices. L’user experience it’s nice, it’s simple, and it’s uniform, seamless, across the entire platform.

With Linux, on the other hand, you have the possibility to choose the distribution that is best suited to your specific needs. On servers we tend not to use them distro Linux equipped with a graphical interface, and it all boils down to CLI (command-line interface), also because most administrators who create a Linux server access it remotely via SSH.

The experience of use, in general, can vary – even greatly – based on the chosen distribution and therefore on the desktop environment that accompanies her. Distributions like Pop!_OS, Ubuntu, Zorin O.S. ed Elementary OSare known for their convincing interface and are also suitable for those coming from Windows.

In 2019, Torvalds had urged the choice…

Leave a Reply

Your email address will not be published. Required fields are marked *