diff --git a/index.mdx b/index.mdx index 216de9b..3e90b2e 100644 --- a/index.mdx +++ b/index.mdx @@ -22,7 +22,7 @@ Flox makes it easy to work locally, test in CI, and deploy to production—all w - Install `flox` with `apt`, `yum`, `brew`, or a standalone installer to get your dev environment set up in minutes. + Install `flox` with one command (`curl -fsSL https://get.flox.dev | sh`), or with `apt`, `yum`, `brew`, or a standalone installer to get your dev environment set up in minutes. [Download & Install](/install-flox/install) diff --git a/install-flox/install.mdx b/install-flox/install.mdx index 18333b4..df532a2 100644 --- a/install-flox/install.mdx +++ b/install-flox/install.mdx @@ -12,6 +12,103 @@ description: "How to install or upgrade the Flox CLI" Flox 1.14.0 online. + + + ## Install with one command + + The install script detects your OS and CPU architecture and installs Flox + with the best method available on your machine. It supports MacOS and + Debian- and Red Hat-based Linux distributions, on `x86_64` and `aarch64`. + + ```bash + curl -fsSL https://get.flox.dev | sh + ``` + + The script picks the install method that matches your platform: + + * On MacOS, it downloads and runs the `.pkg` installer. + * On Debian- and Ubuntu-family systems, it installs the `.deb` package + with `apt`. + * On Fedora- and RHEL-family systems, it installs the `.rpm` package + with `dnf` or `yum`. + + If Flox is already installed, the script makes no changes and instead + prints the upgrade command for your package manager. + + + **Privileged commands are shown before they run** + + Before using `sudo`, the script prints the exact commands it is about + to run with elevated privileges, so you know what you are agreeing to. + You may be prompted for your `sudo` password. + + + Here is what an install looks like on Ubuntu: + + ```console + $ curl -fsSL https://get.flox.dev | sh + ==> Resolving the latest Flox version (stable channel)... + ==> Installing Flox 1.14.0 for x86_64-linux + ==> Downloading https://downloads.flox.dev/by-env/stable/deb/flox-1.14.0.x86_64-linux.deb + ==> The following commands will be run with sudo: + sudo apt-get install -y /tmp/flox-install.XXXXXX/flox-1.14.0.x86_64-linux.deb + ==> Installing the .deb package with apt + ... + ``` + + + **If Nix is already installed on your system** + + The script does not install Flox through Nix, and it will not modify + your existing Nix installation. When it detects Nix (the `nix` command + or a populated `/nix/store`), it stops and points you to the + [Nix](#nix) tab, which covers installing Flox with an existing Nix. + + + **Unsupported systems** + + The script refuses to run on systems where the native packages are + untested: immutable (ostree-based) distributions such as Fedora + Silverblue or CoreOS, openSUSE/SLES, and RPM-family systems without + `dnf` or `yum`. On those systems, install Nix first and then follow the + [Nix](#nix) tab instructions. + + + ## Pin a channel or version + + The script honors two environment variables: + + ```console + $ curl -fsSL https://get.flox.dev | FLOX_CHANNEL= sh + $ curl -fsSL https://get.flox.dev | FLOX_VERSION= sh + ``` + + `FLOX_CHANNEL` (default `stable`) selects the release channel. + `FLOX_VERSION` pins an exact version instead of the channel's latest. + + ## Verify Flox installation + + If the following command returns without error then you're ready to get + started! + + ```console + $ flox --version + 1.14.0 + + ``` + + The version you see might be different. + + ## Upgrade existing Flox installation + + The script does not upgrade an existing installation. Re-running it on a + system that already has Flox prints the upgrade command for your package + manager, for example: + + ```bash + sudo apt-get update && sudo apt-get install --only-upgrade flox + ``` + Install Flox with the standalone [`.pkg` installer](#pkg-installer) or @@ -108,7 +205,7 @@ description: "How to install or upgrade the Flox CLI" The package will register a new source in `/etc/apt/sources.list.d` to enable upgrades via `apt`. - **Download and install the package** + ## Download and install the package 1. Download flox.deb for your system architecture: @@ -149,7 +246,7 @@ description: "How to install or upgrade the Flox CLI" The version of Nix installed by Flox tracks the stable version of Nix in nixpkgs, occasionally adding additional backports or patches. Nix is usually updated monthly, although if Nix makes breaking changes, updates may be less frequent. - **Verify Flox installation** + ## Verify Flox installation If the following command returns without error then you're ready to get started! @@ -162,7 +259,7 @@ description: "How to install or upgrade the Flox CLI" The version you see might be different. - **Upgrade existing Flox installation** + ## Upgrade existing Flox installation ``` sudo apt update; @@ -179,7 +276,7 @@ description: "How to install or upgrade the Flox CLI" The rpm will register a package repository in `/etc/yum.repos.d` to enable upgrades. via `yum`, `dnf` and other compatible tools. - **Download and install the package** + ## Download and install the package 1. Download flox.rpm for your system architecture: @@ -221,7 +318,7 @@ description: "How to install or upgrade the Flox CLI" The version of Nix installed by Flox tracks the stable version of Nix in nixpkgs, occasionally adding additional backports or patches. Nix is usually updated monthly, although if Nix makes breaking changes, updates may be less frequent. - **Verify Flox installation** + ## Verify Flox installation If the following command returns without error then you're ready to get started! @@ -234,7 +331,7 @@ description: "How to install or upgrade the Flox CLI" The version you see might be different. - **Upgrade existing Flox installation** + ## Upgrade existing Flox installation ``` sudo yum update flox @@ -520,13 +617,13 @@ description: "How to install or upgrade the Flox CLI" If you have Docker installed then you can also run flox in a container to try it out before installing on your system. - **Invoke Flox container** + ## Invoke Flox container ``` docker run --pull always --rm -it ghcr.io/flox/flox ``` - **Verify Flox installation** + ## Verify Flox installation If the following command returns without error then you're ready to get started! @@ -571,14 +668,14 @@ description: "How to install or upgrade the Flox CLI" * terminate distribution: `wsl --terminate ` * unregister and delete distribution: `wsl --unregister ` - **Supported distributions** + ## Supported distributions Please follow the steps below to install Flox on the distribution of your choice: - **Download and install the package** + ## Download and install the package 1. Download flox.deb for your system architecture: @@ -599,7 +696,7 @@ description: "How to install or upgrade the Flox CLI" sudo apt-get install policycoreutils semodule-utils tar wget xz-utils ``` - **Download and install the package** + ## Download and install the package 1. Download flox.deb for your system architecture: @@ -620,7 +717,7 @@ description: "How to install or upgrade the Flox CLI" sudo yum install tar xz ``` - **Download and install the package** + ## Download and install the package 1. Download flox.rpm for your system architecture: @@ -650,7 +747,7 @@ description: "How to install or upgrade the Flox CLI" You can disregard this message as we will be configuring the `nix-daemon` to start automatically in the next section. - **Configure `nix-daemon` to start on activation** + ## Configure `nix-daemon` to start on activation Once Flox has been installed on your WSL distribution the `nix-daemon` will need to be automatically started as you start your WSL instance. @@ -670,7 +767,7 @@ description: "How to install or upgrade the Flox CLI" ``` nix --extra-experimental-features nix-command store ping ``` - **Verify Flox installation** + ## Verify Flox installation If the following command returns without error then you're ready to get started! @@ -683,7 +780,7 @@ description: "How to install or upgrade the Flox CLI" The version you see might be different. - **Upgrade existing Flox installation** + ## Upgrade existing Flox installation Please follow the instructions provided on either the Debian or RPM tab (whichever matches the existing Linux Distribution installed with your diff --git a/install-flox/troubleshooting.mdx b/install-flox/troubleshooting.mdx index 3cf3f9c..1517673 100644 --- a/install-flox/troubleshooting.mdx +++ b/install-flox/troubleshooting.mdx @@ -77,6 +77,14 @@ If you have a partial Flox installation, you can run Flox uninstallation. + + + The install script installs Flox with your system package manager. + Follow the tab that matches how the script installed Flox: + [MacOS (Pkg)](#macos-pkg) on MacOS, + [Debian](#debian) on Debian- and Ubuntu-family systems, or + [RPM](#rpm) on Fedora- and RHEL-family systems. + @@ -398,7 +406,7 @@ filling out the `Install failure` Issue template. Please include: - Your operating system and version -- The installation method you used (Pkg, Homebrew, Debian, RPM, etc.) +- The installation method you used (install script, Pkg, Homebrew, Debian, RPM, etc.) - The full install log output (see [Finding install logs](#finding-install-logs) above) - Any error messages you encountered diff --git a/install-flox/uninstall.mdx b/install-flox/uninstall.mdx index 21470c3..00774ac 100644 --- a/install-flox/uninstall.mdx +++ b/install-flox/uninstall.mdx @@ -15,6 +15,15 @@ Here's how to **completely remove `flox` from your system**. + + + The install script installs Flox with your system package manager. + Uninstall with the method that matches how the script installed Flox: + + * On MacOS, follow the [MacOS (Pkg)](#macos-pkg) tab. + * On Debian- and Ubuntu-family systems, follow the [Debian](#debian) tab. + * On Fedora- and RHEL-family systems, follow the [RPM](#rpm) tab. + diff --git a/tutorials/installing-from-repo.mdx b/tutorials/installing-from-repo.mdx index 0776fe1..334de26 100644 --- a/tutorials/installing-from-repo.mdx +++ b/tutorials/installing-from-repo.mdx @@ -14,7 +14,9 @@ as they are released. When you [download and install a Flox `.deb` or `.rpm` package](/install-flox/install), - the installer performs these steps for you. + the installer performs these steps for you, and the + [install script](/install-flox/install) (`curl -fsSL https://get.flox.dev | sh`) + automates the download as well. But you can easily script the steps below to automate this process. These instructions cover the process of installing from Flox's repository