Contents

About sudo(2)

   Jun 19, 2023     1 min read

This is an article about the sudo command.

Can the sudo command be controlled on Windows and MacOS?

As we discussed in our previous article on sudo, sudo is a Unix-based operating system. Let’s take a look at why it might be possible to control it on other OSes as well.

For more information, see: ##### Let’s start with Windows.

In general, Windows operating systems do not support the sudo command natively. However, Windows 10 provides a feature called Windows Subsystem for Linux (or WSL). WSL is a feature that allows Linux operating systems to run inside Windows, which allows users to execute Linux commands through the bash shell (or Terminal as we call it). So, in a Windows environment with WSL installed, you can use the sudo command (think emulation and you’ll get the idea).

Here’s a good example: ##### Next up is MacOS.

For MacOS, it’s built on the Berkeley Software Distribution (BSD), yes, that’s right. MacOS is built on the BSD, which is part of the Unix family of operating systems, so naturally you can use the Unix-style command sudo.

Digression
I was curious about the reasons why MacOS is built on BSD.
  1. Open source: When developing a new operating system, you have the freedom to modify or add to existing code.
  2. Mature technology: BSD is an operating system that has been proven and refined over decades and has earned high ratings for stability, security, and performance.
  3. POSIX compatibility: A set of standards that ensures compatibility between operating systems, allowing a wide variety of software to run on macOS.
  4. Community: As an open source project, it has an active community that can help shape the new OS.

See #####

Emulation: A technology that mimics hardware or software to make it work in a different environment. Emulation is used for a variety of purposes, including providing compatibility with other operating systems, devices, or software, testing the behavior of a system, or recreating old technologies in a modern environment.