Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
  • Introduction
  • Installation
    • Default Shell
  • Getting Started
    • Quick Tour
    • Moving Around the System
    • Thinking in Nu
    • Nushell Cheat Sheet
  • Nu Fundamentals
    • Types of Data
    • Loading Data
    • Pipelines
    • Working with Strings
    • Working with Lists
    • Working with Records
    • Working with Tables
    • Navigating and Accessing Structured Data
    • Special Variables
  • Programming in Nu
    • Custom Commands
    • Aliases
    • Operators
    • Variables
    • Control Flow
    • Scripts
    • Modules
      • Using Modules
      • Creating Modules
    • Overlays
    • Sorting
    • Testing your Nushell Code
    • Best Practices
  • Nu as a Shell
    • Configuration
    • Environment
    • Stdout, Stderr, and Exit Codes
    • Running System (External) Commands
    • How to Configure 3rd Party Prompts
    • Directory Stack
    • Reedline, Nu's Line Editor
    • Custom Completions
    • Externs
    • Coloring and Theming in Nu
    • Hooks
    • Background Jobs
  • Coming to Nu
    • Coming from Bash
    • Coming from CMD.EXE
    • Coming from PowerShell
    • Nu map from other shells and domain specific languages
    • Nu Map from Imperative Languages
    • Nu Map from Functional Languages
    • Nushell operator map
  • Design Notes
    • How Nushell Code Gets Run
  • (Not So) Advanced
    • Standard Library
    • Dataframes
    • Metadata
    • Creating Your Own Errors
    • Parallelism
    • Plugins
    • explore
    • Building TUIs with tui

Installing Nu

There are lots of ways to get Nu up and running. You can download pre-built binaries from our release page, use your favourite package manager, or build from source.

The main Nushell binary is named nu (or nu.exe on Windows). After installation, you can launch it by typing nu.

$ nu
/home/sophiajt/Source>
  • Pre-built Binaries
  • Package Managers
  • Docker Container Images
  • Build from Source
    • Installing a Compiler Suite
    • Installing Rust
    • Dependencies
    • Build from crates.io using Cargo
    • Building from the GitHub repository
    • Optional Build Features

Pre-built Binaries

Nu binaries are published for Linux, macOS, and Windows with each GitHub release. Just download, extract the binaries, then copy them to a location on your PATH.

Package Managers

Nu is available via several package managers:

Packaging status

For macOS and Linux, Homebrew is a popular choice (brew install nushell).

For Windows:

  • Winget

    • User scope installation (the default): winget install Nushell.Nushell
    • Machine scope installation (for all users): winget install Nushell.Nushell --override 'ALLUSERS=1'
    • Upgrade: winget upgrade Nushell.Nushell

    The --scope flag of winget install is not supported. Use --override as shown above for a machine scope installation.

  • Scoop (scoop install nu)

For Debian & Ubuntu:

wget -qO- https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/fury-nushell.gpg
echo "deb [signed-by=/etc/apt/keyrings/fury-nushell.gpg] https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury-nushell.list
sudo apt update
sudo apt install nushell

For RedHat/Fedora & Rocky Linux:

echo "[gemfury-nushell]
name=Gemfury Nushell Repo
baseurl=https://yum.fury.io/nushell/
enabled=1
gpgcheck=0
gpgkey=https://yum.fury.io/nushell/gpg.key" | sudo tee /etc/yum.repos.d/fury-nushell.repo
sudo dnf install -y nushell

For Alpine Linux:

echo "https://alpine.fury.io/nushell/" | tee -a /etc/apk/repositories
apk update
apk add --allow-untrusted nushell

Cross Platform installation:

  • npm (npm install -g nushell Note that nu plugins are not included if you install in this way)

Docker Container Images

Docker images are available from the GitHub Container Registry. An image for the latest release is built regularly for Alpine and Debian. You can run the image in interactive mode using:

docker run -it --rm ghcr.io/nushell/nushell:<version>-<distro>

Where <version> is the version of Nushell you want to run and <distro> is alpine or the latest supported Debian release, such as bookworm.

To run a specific command, use:

docker run --rm ghcr.io/nushell/nushell:latest-alpine -c "ls /usr/bin | where size > 10KiB"

To run a script from the current directory using Bash, use:

docker run --rm \
    -v $(pwd):/work \
    ghcr.io/nushell/nushell:latest-alpine \
    "/work/script.nu"

Build from Source

You can also build Nu from source. First, you will need to set up the Rust toolchain and its dependencies.

Installing a Compiler Suite

For Rust to work properly, you'll need to have a compatible compiler suite installed on your system. These are the recommended compiler suites:

  • Linux: GCC or Clang
  • macOS: Clang (install Xcode)
  • Windows: MSVC (install Visual Studio or the Visual Studio Build Tools)
    • Make sure to install the "Desktop development with C++" workload
    • Any Visual Studio edition will work (Community is free)

Installing Rust

If you don't already have Rust on your system, the best way to install it is via rustup. Rustup is a way of managing Rust installations, including managing using different Rust versions.

Nu currently requires a recent stable version of Rust (1.96.1 or later for Nu 0.116.0, as listed in the rust-version field of Nu's Cargo.toml). The best way is to let rustup find the correct version for you. When you first open rustup it will ask what version of Rust you wish to install:

Current installation options:

default host triple: x86_64-unknown-linux-gnu
default toolchain: stable
profile: default
modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation

Once you are ready, press 1 and then enter.

If you'd rather not install Rust via rustup, you can also install it via other methods (e.g. from a package in a Linux distro). Just be sure to install a version of Rust that is 1.96.1 or later.

Dependencies

Nu is written in Rust, but a few of its dependencies (such as the bundled SQLite library and the ring cryptography library used for TLS) include C code, so you also need a C compiler. pkg-config is optional but recommended.

Since version 0.105, Nu uses rustls rather than OpenSSL by default. The OpenSSL development packages listed below (libssl-dev, openssl-devel, or Homebrew's openssl) are only needed if you build with the native-tls feature.

Debian/Ubuntu

You will need to install the "build-essential" and "pkg-config" packages:

apt install build-essential pkg-config
# only needed if you build with the `native-tls` feature:
apt install libssl-dev

RHEL based distros

You will need to install a C compiler ("gcc") and "pkgconf-pkg-config":

dnf install gcc pkgconf-pkg-config
# only needed if you build with the `native-tls` feature:
dnf install openssl-devel

macOS

Xcode Command Line Tools

The Xcode Command Line Tools provide the C compiler. If you build with the native-tls feature, you will also need OpenSSL, which you can install with Homebrew:

xcode-select --install
# only needed if you build with the `native-tls` feature:
brew install openssl
Nix

If using Nix for package management on macOS, the pkg-config package is recommended (and openssl is required only with the native-tls feature). These can be installed:

  • Globally, using nix-env --install (and others).
  • Locally, using Home Manager in your home.nix config.
  • Temporarily, using nix-shell (and others).

Build from crates.io using Cargo

Nushell releases are published as source to the popular Rust package registry crates.io. This makes it easy to build and install the latest Nu release with cargo:

cargo install nu --locked

The cargo tool will do the work of downloading Nu and its source dependencies, building it, and installing it into the cargo bin path.

Note that the default plugins must be installed separately when using cargo. See the Plugins Installation section of the Book for instructions.

Building from the GitHub repository

You can also build Nu from the latest source on GitHub. This gives you immediate access to the latest features and bug fixes. If you use rustup, it picks up the Rust version pinned in the repository's rust-toolchain.toml file. First, clone the repo:

git clone https://github.com/nushell/nushell.git

From there, we can build and run Nu with:

cd nushell
# ./nushell
cargo build --workspace; cargo run

You can also build and run Nu in release mode, which enables more optimizations:

cargo build --release --workspace; cargo run --release

People familiar with Rust may wonder why we do both a "build" and a "run" step if "run" does a build by default. This is to get around a shortcoming of the new default-run option in Cargo, and ensure that all plugins are built, though this may not be required in the future.

Optional Build Features

The default build enables the dap, lsp, mcp, network, plugin, rustls-tls, sqlite, and trash-support Cargo features. You can add others with --features:

  • system-clipboard: lets the line editor use the system clipboard
  • full: all of the default features plus system-clipboard

For example:

cargo install nu --locked --features full

The rustls-tls and native-tls features can't be enabled together. native-tls uses the platform's TLS library (such as OpenSSL on Linux). To use it, turn off the default features and list the ones you want, for example --no-default-features --features plugin,network,sqlite,trash-support,native-tls.

Edit this page on GitHub
Contributors: Carson Black, Ibraheem Ahmed, Jake Vossen, prrao87, Andrés N. Robalino, rashil2000, dgalbraith, Reilly Wood, Justin Ma, Adam Smith, fdncred, rgwood, max-nextcloud, Hofer-Julian, Mark Karpov, follower, Jakub Žádník, Garbaz, NotTheDr01ds, Kieron Wilkinson, allan2, Jan Klass, Stefan Holderbach, Nguyễn Hồng Quân, Phil Crockett
Prev
Introduction
Next
Default Shell