Darling Wiki

macOS translation layer for Linux

User Tools

Site Tools


darling_prefix

Darling Prefix

Darling Prefix is a virtual chroot environment. In other words, it is a minimalist OS X root file system automatically installed an updated by the darling command.

We call it virtual, since it does not make use of the Linux system call. Rather than that, Darling introduces the chroot environment inside of its OS X system call emulation.

Prefix Contents

The prefix primarily contains various command line tools known from OS X (and mostly Linux as well). There are also several configuration files worth noting.

  • /System/Library/CoreServices/SystemVersion.plist: This file controls the output of the sw_vers command.
  • /etc/darling/version.conf: This file controls the output of the uname command.
  • /etc/darling/dylib.conf: This file controls the mapping of various OS X dynamic libraries and frameworks to their Darling equivalents.
  • /.update-timestamp: A timestamp that matches the last updated time of the darling script that updated the prefix contents last. Deleting this file forces an update, wheres running echo -n disable >/.update-timestamp disables any future updates.

Prefix Location

The prefix location defaults to ~/.darling. This can be changed by setting the DPREFIX environment variable, for example:

$ export DPREFIX=~/.mysecondprefix
$ darling shell

Mapped Directories

  • /system-root: This is the only visible and \'\'truly\'\' mapped directory. It contains the real / directory tree. This means you can transform any real path in your file system to a path inside your prefix by prepending /system-root.
  • /home: A symbolic link to your real /home directory.
  • /tmp: A symbolic link to your real /tmp directory.
  • /dev: A symbolic link to your real /dev directory.
  • /proc: While this directory is not listed in /, it is in fact present, because some emulated system calls need to access Linux procfs.
darling_prefix.txt · Last modified: 2017/01/18 23:16 (external edit)