Skip to content

Install

nomux has three binaries: nomux (the CLI), nomuxd (the daemon) and nomux-holder (the holder). How it works tells you what each one does.

The current release is nomux 0.5.0. It is a pre-release, as each version earlier than 1.0.0 is: interfaces can change between minor versions. The roadmap shows the state of the work.

There are four paths to the binaries. Use the first one that applies:

  1. Homebrew, if you use it.
  2. The install script.
  3. A manual download with a checksum that you verify yourself.
  4. A build from source.

You install nomux only on the computer on which you type. A remote Host needs no install: nomux host add puts the binaries there. Refer to Remote hosts.

The output on this page is the real output of version 0.5.0 on Linux x86_64. The home directory of that run was a temporary directory. The page shows it as /home/user. Homebrew is the exception: the machine of the run had no Homebrew, thus brew install did not run. Homebrew says what was checked instead.

Machine Target of the release archive
Linux, x86_64 x86_64-unknown-linux-musl
Linux, aarch64 aarch64-unknown-linux-musl
macOS, Intel x86_64-apple-darwin
macOS, Apple silicon aarch64-apple-darwin

The Linux binaries of a release are static. They do not use the C library of the machine. There is no build for Windows.

The tap nomux-sh/homebrew-tap has one formula for macOS and Linux:

Terminal window
brew install nomux-sh/tap/nomux

The command adds the tap and installs the three binaries. Make sure that the shell finds the CLI:

Terminal window
nomux --version
  • The formula does not build nomux. Homebrew installs a bottle with the binaries of the release archive of your machine and compares its SHA-256 checksum with the value in the formula: if the two are different, Homebrew installs nothing. A Mac with Apple silicon needs no Xcode and no Command Line Tools, and an Intel Mac needs them in some version, not the newest one.
  • Homebrew 6.0.0 and later versions load a formula of a tap that is not from Homebrew only after you trust it. An install with the full name nomux-sh/tap/nomux trusts this one formula. Refer to Tap Trust in the Homebrew documentation.
  • The formula gets a new version after the release of nomux: a workflow of the tap looks for a new release one time each day, and a maintainer merges the change.

These commands and statements come from the README of the tap. brew install was not run for this page. What was checked:

  • The formula at version 0.5.0 names four archives, one for each machine of the table above. The SHA-256 value of each archive in the formula is the same as the value of that archive in SHA256SUMS of the release.

  • The formula has a bottle for four Homebrew platforms: arm64_big_sur, big_sur, arm64_linux and x86_64_linux. The tap release nomux-0.5.0 has one bottle file for each of them, and its SHA-256 value is the value in the formula. The x86_64_linux bottle was downloaded: it has nomux, nomuxd and nomux-holder in nomux/0.5.0/bin.

  • The test block of the formula runs nomux --version, nomuxd --version and nomux-holder --version and expects <binary> 0.5.0. The three binaries of that bottle print exactly that:

    Terminal window
    $ nomux --version
    nomux 0.5.0
    $ nomuxd --version
    nomuxd 0.5.0
    $ nomux-holder --version
    nomux-holder 0.5.0

The script does these steps:

  1. It finds the target of the machine from uname.
  2. It downloads the archive of that target and the file SHA256SUMS from the GitHub release.
  3. It verifies the SHA-256 checksum of the archive. If the checksum is wrong, it installs nothing.
  4. It puts nomux, nomuxd and nomux-holder into ~/.local/bin.

The script does not use sudo. It needs curl, tar, and sha256sum or shasum.

Terminal window
$ curl -fsSL https://raw.githubusercontent.com/nomux-sh/nomux/main/install.sh | sh
Downloading nomux-0.5.0-x86_64-unknown-linux-musl.tar.gz
The SHA-256 checksum is correct.
Installed nomux 0.5.0 in /home/user/.local/bin: nomux nomuxd nomux-holder
/home/user/.local/bin is not in PATH. Add it to PATH to run nomux by name.

The last line is there because ~/.local/bin was not in PATH in this run. If the directory is in PATH, the script does not print it. Where the files are has the line for the startup file of your shell.

Option Default Function
--version <version> The newest version that has no suffix The version to install, for example 0.5.0
--dir <directory> ~/.local/bin The directory for the binaries

To give an option, add -s -- after sh:

Terminal window
$ curl -fsSL https://raw.githubusercontent.com/nomux-sh/nomux/main/install.sh | sh -s -- --version 0.5.0 --dir ~/bin
Downloading nomux-0.5.0-x86_64-unknown-linux-musl.tar.gz
The SHA-256 checksum is correct.
Installed nomux 0.5.0 in /home/user/bin: nomux nomuxd nomux-holder
/home/user/bin is not in PATH. Add it to PATH to run nomux by name.

Make sure that the shell finds the CLI:

Terminal window
$ nomux --version
nomux 0.5.0

Each release has one archive for each target and one SHA256SUMS file. An archive contains the three binaries, the README and the two license files.

  1. Set the version and the target of the machine:

    Terminal window
    version=0.5.0
    target=x86_64-unknown-linux-musl
  2. Download the archive and the checksums from the releases page:

    Terminal window
    curl -fsSLO "https://github.com/nomux-sh/nomux/releases/download/v$version/nomux-$version-$target.tar.gz"
    curl -fsSLO "https://github.com/nomux-sh/nomux/releases/download/v$version/SHA256SUMS"
  3. Verify the checksum. The command must print the name of the archive and OK. If it does not, do not continue:

    Terminal window
    $ grep "nomux-$version-$target.tar.gz" SHA256SUMS | sha256sum --check
    nomux-0.5.0-x86_64-unknown-linux-musl.tar.gz: OK

    On macOS, replace sha256sum --check with shasum -a 256 --check.

  4. Extract the archive and copy the binaries:

    Terminal window
    tar -xzf "nomux-$version-$target.tar.gz"
    mkdir -p ~/.local/bin
    cp "nomux-$version-$target/nomux" "nomux-$version-$target/nomuxd" "nomux-$version-$target/nomux-holder" ~/.local/bin/

The checksum shows that the download is complete and is the file of the release. It does not show who made the release. The binaries are not signed and not notarized. The README of nomux says that code signing and notarization start with the first stable release.

You need git and rustup. The repository pins the Rust version, and rustup installs it automatically.

  1. Get the source of the release and build the binaries:

    Terminal window
    git clone --branch v0.5.0 https://github.com/nomux-sh/nomux.git
    cd nomux
    cargo build --release

    Without --branch v0.5.0, you build the main branch, which can be newer than the release.

  2. Copy the three binaries to a directory that is in PATH. Keep them in the same directory:

    Terminal window
    mkdir -p ~/.local/bin
    cp target/release/nomux target/release/nomuxd target/release/nomux-holder ~/.local/bin/

A build on Linux uses the C library of the machine. It is not the static binary of the release archive.

Path Content
~/.local/bin/nomux, nomuxd, nomux-holder The binaries. The path is different if you used Homebrew or --dir, or copied them to a different directory.
~/.nomux/run/ The runtime directory: the socket, the lock and the log of the daemon, and one directory for each Session that runs. nomux makes it at the first command.
~/.local/state/nomux/ on Linux, ~/Library/Application Support/nomux/ on macOS The state directory: for each Session, its description, its name and its journal, and the file workspace.json with your Groups and Projects. After a restart says what nomux does with them.
~/.local/share/nomux/extensions/ on Linux, ~/Library/Application Support/nomux/extensions/ on macOS The extensions that you installed, with the permissions that you approved. Refer to Extensions.
~/.local/share/nomux/hooks/ on Linux, ~/Library/Application Support/nomux/hooks/ on macOS The record of each nomux hooks install --apply: the bytes of the settings file before the install. Refer to Agent adapters and hooks.
~/.config/nomux/config.toml on Linux, ~/Library/Application Support/nomux/config.toml on macOS The configuration file. If XDG_CONFIG_HOME is an absolute path, the file is $XDG_CONFIG_HOME/nomux/config.toml. nomux makes the file when you add a remote Host. It also has the pool settings, the memory and hibernation settings and the prefix keys of an attach. nomux daemon status prints the path that the daemon reads.
~/.config/systemd/user/nomuxd.service on Linux, ~/Library/LaunchAgents/sh.nomux.nomuxd.plist on macOS The service file. It exists only after nomux daemon install-service.

The paths for macOS come from the documents of the nomux repository. This page has output from Linux only. On macOS, the daemon reads config.toml only in ~/Library/Application Support/nomux, not in ~/.config/nomux, unless XDG_CONFIG_HOME is set. A home directory of more than 73 bytes makes nomux use a short link in /tmp: Long home paths.

The CLI starts nomuxd, and the daemon starts nomux-holder. Each one looks for the other binary in its own directory first, and then in PATH. Thus the three binaries must be in one directory, or all of them must be in PATH.

If ~/.local/bin is not in PATH, add this line to the startup file of your shell:

Terminal window
export PATH="$HOME/.local/bin:$PATH"

Install the new version in the same directory. With Homebrew, use these commands:

Terminal window
brew update
brew upgrade nomux-sh/tap/nomux

A daemon and the holders that run continue with the old binaries. To start the new daemon, stop the old one. The pooled holders of the old daemon end with it: Holder pool says why.

Terminal window
nomux daemon stop

The next command starts the new daemon, and it finds the Sessions that run. A holder that runs is not replaced: a Session keeps its holder until its command ends.

If you installed the service file and the path of the binaries changed, run nomux daemon install-service again. The file has the path of nomuxd.

  1. End each Session and stop the daemon. nomux kill --all --include-dormant also removes the dormant Sessions with their output. On a terminal it asks you first:

    Terminal window
    nomux kill --all --include-dormant
    nomux daemon uninstall-service
    nomux daemon stop
  2. Remove the binaries. With Homebrew:

    Terminal window
    brew uninstall nomux-sh/tap/nomux
    brew untap nomux-sh/tap

    Without Homebrew:

    Terminal window
    rm ~/.local/bin/nomux ~/.local/bin/nomuxd ~/.local/bin/nomux-holder
  3. Remove the directories of nomux. These are the paths on Linux:

    Terminal window
    rm -r ~/.nomux ~/.local/state/nomux ~/.local/share/nomux ~/.config/nomux

    A directory that nomux did not make does not exist: remove it from the command.

If you added ~/.local/bin to PATH only for nomux, remove that line from the startup file of your shell. Remote hosts says how to remove nomux from a remote Host.

Continue with the quick start.