Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I don't think there's a macOS direct equivalent.

Can you describe the specific problem you're trying to solve using namespaces? Or were you just interested in where various tidbits of information resided?

Although I'm not aware of a macOS direct equivalent, there are various places where some information resides. For example, the mount-table and the sysctl() function provide access to certain information that's available in Linux namespaces.
 
I don't think there's a macOS direct equivalent.

Can you describe the specific problem you're trying to solve using namespaces? Or were you just interested in where various tidbits of information resided?

Although I'm not aware of a macOS direct equivalent, there are various places where some information resides. For example, the mount-table and the sysctl() function provide access to certain information that's available in Linux namespaces.
I'm looking to be able to create a sandboxed environment so any executables in the sandbox can't access code and/or information outside of the sandbox. I want to use it as a security feature where code from one executable can only run other executable code by sending a message between the two sandboxed environments.
 
I searched for keywords: macos sandbox environment

This was a top hit:

There are probably more related docs.


Here's an article that was farther down the list:

It's from 2018, but it seems well-written.


A virtualized environment like Parallels might be made to work. A typical VM presents only an artificial set of resources to its hosted code. One could put as many layers as one wished between the foundational VM and the desired "sandboxed environment", including running a Linux distro under the VM, then using actual Linux namespaces.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.