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.
Release status
Section titled “Release status”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:
- Homebrew, if you use it.
- The install script.
- A manual download with a checksum that you verify yourself.
- 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.
Supported machines
Section titled “Supported machines”| 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.
Homebrew
Section titled “Homebrew”The tap nomux-sh/homebrew-tap has one formula for macOS and Linux:
brew install nomux-sh/tap/nomuxThe command adds the tap and installs the three binaries. Make sure that the shell finds the CLI:
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/nomuxtrusts 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
SHA256SUMSof the release. -
The formula has a bottle for four Homebrew platforms:
arm64_big_sur,big_sur,arm64_linuxandx86_64_linux. The tap releasenomux-0.5.0has one bottle file for each of them, and its SHA-256 value is the value in the formula. Thex86_64_linuxbottle was downloaded: it hasnomux,nomuxdandnomux-holderinnomux/0.5.0/bin. -
The
testblock of the formula runsnomux --version,nomuxd --versionandnomux-holder --versionand expects<binary> 0.5.0. The three binaries of that bottle print exactly that:Terminal window $ nomux --versionnomux 0.5.0$ nomuxd --versionnomuxd 0.5.0$ nomux-holder --versionnomux-holder 0.5.0
Install script
Section titled “Install script”The script does these steps:
- It finds the target of the machine from
uname. - It downloads the archive of that target and the file
SHA256SUMSfrom the GitHub release. - It verifies the SHA-256 checksum of the archive. If the checksum is wrong, it installs nothing.
- It puts
nomux,nomuxdandnomux-holderinto~/.local/bin.
The script does not use sudo. It needs curl, tar, and sha256sum or shasum.
$ curl -fsSL https://raw.githubusercontent.com/nomux-sh/nomux/main/install.sh | shDownloading nomux-0.5.0-x86_64-unknown-linux-musl.tar.gzThe 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:
$ curl -fsSL https://raw.githubusercontent.com/nomux-sh/nomux/main/install.sh | sh -s -- --version 0.5.0 --dir ~/binDownloading nomux-0.5.0-x86_64-unknown-linux-musl.tar.gzThe 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:
$ nomux --versionnomux 0.5.0Manual download
Section titled “Manual download”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.
-
Set the version and the target of the machine:
Terminal window version=0.5.0target=x86_64-unknown-linux-musl -
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" -
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 --checknomux-0.5.0-x86_64-unknown-linux-musl.tar.gz: OKOn macOS, replace
sha256sum --checkwithshasum -a 256 --check. -
Extract the archive and copy the binaries:
Terminal window tar -xzf "nomux-$version-$target.tar.gz"mkdir -p ~/.local/bincp "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.
Build from source
Section titled “Build from source”You need git and rustup. The repository pins the Rust version, and rustup installs it automatically.
-
Get the source of the release and build the binaries:
Terminal window git clone --branch v0.5.0 https://github.com/nomux-sh/nomux.gitcd nomuxcargo build --releaseWithout
--branch v0.5.0, you build themainbranch, which can be newer than the release. -
Copy the three binaries to a directory that is in
PATH. Keep them in the same directory:Terminal window mkdir -p ~/.local/bincp 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.
Where the files are
Section titled “Where the files are”| 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:
export PATH="$HOME/.local/bin:$PATH"Update
Section titled “Update”Install the new version in the same directory. With Homebrew, use these commands:
brew updatebrew upgrade nomux-sh/tap/nomuxA 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.
nomux daemon stopThe 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.
Remove
Section titled “Remove”-
End each Session and stop the daemon.
nomux kill --all --include-dormantalso removes the dormant Sessions with their output. On a terminal it asks you first:Terminal window nomux kill --all --include-dormantnomux daemon uninstall-servicenomux daemon stop -
Remove the binaries. With Homebrew:
Terminal window brew uninstall nomux-sh/tap/nomuxbrew untap nomux-sh/tapWithout Homebrew:
Terminal window rm ~/.local/bin/nomux ~/.local/bin/nomuxd ~/.local/bin/nomux-holder -
Remove the directories of nomux. These are the paths on Linux:
Terminal window rm -r ~/.nomux ~/.local/state/nomux ~/.local/share/nomux ~/.config/nomuxA 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.
Next step
Section titled “Next step”Continue with the quick start.