Darling Wiki

macOS translation layer for Linux

User Tools

Site Tools


darling_shell

Darling Shell

Darling shell is a more or less standard Bash version 3.2. This is the version of Bash used in macOS.

Basic Usage

Darling Shell can be executed through the darling shell command. This opens a Bash prompt very much like executing bash on Linux.

Remember that Darling Shell, just like anything executed through the darling command, runs in a Darling Prefix (virtual chroot). You can leave the prefix environment by navigating into the /system-root directory.

Many popular commands are available in Darling Shell. You can list them by looking into directories such as /bin or /usr/bin.

Setting up the Environment

Darling Shell is compiled not to read ~/.bashrc at startup. Instead, Darling Shell reads ~/.dshellrc, which allows you to configure PATH in a way that makes sense inside your prefix, for example.

If you want to alter your environment for a specific prefix only, edit /etc/bashrc inside the prefix.

Becoming Root

Should you encounter an application that bails out because you are not root (typically because it needs write access outside your home directory), you can use the fake sudo command. It is fake, because it only makes getuid and geteuid system calls return 0, but grants you no extra privileges.

Examples

  • darling shell: Opens a Bash prompt.
  • darling shell /usr/local/bin/someapp arg: Execute /usr/local/bin/someapp with an argument. Note that the path is evaluated inside the Darling Prefix. The command is started through the shell (uses sh -c).
  • darling ~/.darling/usr/local/bin/someapp arg: Equivalent of the previous example (which doesn't make use of the shell), assuming that the prefix is ~/.darling.
darling_shell.txt · Last modified: 2017/01/18 23:16 (external edit)