Skip to main content
Flox makes it simple to have the same environment on multiple systems and CPU architectures. This guide walks through an example between two coworkers who have different system types, and shows how to customize your environment with system-specific dependencies.

Creating an environment

To get started, let’s create an environment from a Linux laptop. This laptop is using an ARM CPU (aarch64) which makes its full system type aarch64-linux. When using flox search you may see packages that won’t immediately work with your manifest, but finding and allowing system specific packages is very easy. Flox shows software from the following systems: aarch64-darwin, x86_64-darwin, aarch64-linux, and x86_64-linux. Some packages may support only a subset of system types. You can inspect a package with flox show to see what system types are supported:
First let’s install some packages to our environment running on Linux:
To make it easy to share this system across platforms we are going to share it on FloxHub with flox push.
Learn more about this and other sharing options in the sharing environments guide.

Using the environment from a different system type

Many packages in Flox will work without any issue across system types. To test this out, run flox pull from another system such as an Apple machine with an M-series processor. This system type is aarch64-darwin. Then let’s run a simple gpg --version command to test everything is working.
Looks like the environment works cross-platform, nice!

Handling unsupported packages

However, some packages only work with a subset of systems. To demonstrate this let’s install a package that isn’t compatible with an Apple machine. From the Linux machine…
Flox installs the package for all systems that it’s compatible with, but it skips Apple systems since they don’t support the package. We can push this update so we can list packages from the Apple machine to verify everything works.
Then, from the Apple machine, let’s pull the latest and inspect the manifest.
The Apple machine does not have systemd, because the systemd.systems list specifies that systemd should only be installed on Linux. This environment will activate on both machines and the Apple machine won’t get the systemd package.

Where to next?