Skip to content
Manual install steps

Manual install steps

The one-line installer in Install MSL suits most people. This page covers installing a release you downloaded yourself, installing without questions, and what the installer changes on your Mac.

Step 1: Download a release

  1. Open the latest release and download msl-<version>-macos-arm64.tar.gz and its .sha256 file.

  2. Check the download:

    $ shasum -a 256 -c msl-<version>-macos-arm64.tar.gz.sha256
    

Step 2: Install it

Download the installer and point it at the file:

$ curl -fsSL -o install.sh https://raw.githubusercontent.com/onexay/msl/main/install.sh
$ sh install.sh --from msl-<version>-macos-arm64.tar.gz

Install without questions

Pass --yes and any options you need:

$ curl -fsSL https://raw.githubusercontent.com/onexay/msl/main/install.sh | sh -s -- --yes [options]
OptionEffect
--prefix <dir>Where to install. The default is ~/.local, which needs no sudo. /usr/local asks for sudo.
--version <x.y.z>Install a specific release instead of the latest.
--from <tarball>Install a downloaded msl-<version>-macos-arm64.tar.gz.
--no-pathDon’t add MSL to PATH.
--no-ideDon’t set up the VS Code extension.
--yes, -yAccept the defaults without asking.

MSL has no Homebrew formula. It updates itself with msl --update.

What the installer changes

WhatWhereRemoved by
MSL itself: the command, the service, the kernel and VM image, the VS Code extension<prefix>/bin/msl, <prefix>/libexec/msl/ (msld, msl-portd, msl-fileviewd), <prefix>/share/msl/, <prefix>/share/doc/msl/msl --uninstall
PATHOne line in ~/.zshrc, ~/.bash_profile, ~/.config/fish/config.fish or ~/.profileRemoving the line by hand
LaunchAgent~/Library/LaunchAgents/dev.msl.msld.plist, added the first time you run mslmsl --uninstall
VS Code extensionEach IDE’s extensions foldermsl --manage-ide --ide all --uninstall, or msl --uninstall
enable-proposed-apiEach IDE’s argv.json, for example ~/.vscode/argv.json. The first change saves a backup, argv.json.msl-backup.The same; the entry is removed
Which msl the extension runs~/Library/Application Support/msl/cli-pathThe same

MSL creates these the first time you use it:

WhatWhere
Distributions and state~/Library/Application Support/msl/: each distribution’s sparse disk, distros/<id>/ext4.img (unless you chose another location), plus registry.json, msld.log and the service’s sockets
Distribution files in Finder~/.msl/distros/<distro>, while the VM runs
Downloads~/Library/Caches/msl/: distribution images, and the VS Code Server for your IDE’s version
VM settings~/.mslconfig, only if you create it

MSL doesn’t install a kernel extension or a login item. Its LaunchAgent runs nothing at login: launchd starts msld when you first run msl, and msld stops the VM 60 seconds after nothing is running. When you log out, restart or shut down the Mac, launchd gives msld up to 30 seconds to stop the distributions and flush their disks. Over SSH with nobody logged in to the Mac, msl starts msld itself.

Install the VS Code extension by hand

The installer sets up the extension if it finds VS Code, VS Code Insiders, VSCodium or Cursor. Later, run msl --manage-ide. To install it without msl:

  1. Download msl-<version>.vsix from the latest extension release.

  2. Install it:

    $ code --install-extension msl-<version>.vsix
    
  3. In VS Code, run Preferences: Configure Runtime Arguments, add "enable-proposed-api": ["onexay.msl"] to argv.json, and save.

  4. Quit VS Code with ⌘Q and open it again. Closing the window isn’t enough.

The extension isn’t on the Visual Studio Marketplace, because it uses VS Code’s proposed remote-resolver API. See Get started with VS Code.

Last updated on