How to Install and Use Nushell (nu) on Ubuntu 26.04 and 24.04

Share

To install Nushell (nu) on Ubuntu 26.04 LTS or 24.04 LTS, use the project’s Gemfury APT repository. For an install without sudo, use the official GitHub archive. Nushell passes structured data between commands, so you can sort files by size or filter rows in a CSV by column.

Before you begin

Use a Bash terminal and confirm you’re on Ubuntu 26.04 LTS or 24.04 LTS. Run dpkg --print-architecture and look for amd64 (64-bit Intel or AMD) or arm64 (64-bit Arm). Both methods need internet access. APT needs sudo. Choose one install method so a copy in ~/.local/bin can’t take precedence over the APT binary.

1. Install Nushell

Step 1A. Install from the Nushell APT repository

Ubuntu’s standard archives for both releases do not ship nushell. The Gemfury repository documented by Nushell provides Nu 0.117.0 for both architectures. First, install the download and key tools.

Bash
sudo apt update &&
sudo apt install ca-certificates curl gnupg &&
sudo install -m 0755 -d /etc/apt/keyrings

Add the repository and its key. The signed-by setting limits this key to the Gemfury source. The chmod a+r line keeps both files readable to APT on machines with a restrictive umask.

Bash
(
  set -o pipefail
  curl -fsSL https://apt.fury.io/nushell/gpg.key |
    sudo gpg --batch --yes --dearmor -o /etc/apt/keyrings/fury-nushell.gpg
) &&
printf '%s\n' 'deb [signed-by=/etc/apt/keyrings/fury-nushell.gpg] https://apt.fury.io/nushell/ /' |
  sudo tee /etc/apt/sources.list.d/fury-nushell.list >/dev/null &&
sudo chmod a+r /etc/apt/keyrings/fury-nushell.gpg /etc/apt/sources.list.d/fury-nushell.list &&
sudo apt update &&
sudo apt install nushell
Step 1B. Install the GitHub archive without sudo

Use this method to install Nu for your account. You’ll need curl, tar, and sha256sum. The commands select the official 0.117.0 musl tarball for your architecture and check it against the release’s SHA256SUMS before installing nu in ~/.local/bin.

Bash
(
  set -e
  case "$(dpkg --print-architecture)" in
    amd64) cpu=x86_64 ;;
    arm64) cpu=aarch64 ;;
    *) printf '%s\n' 'This example supports amd64 and arm64.' >&2; exit 1 ;;
  esac

  release=0.117.0
  bundle="nu-${release}-${cpu}-unknown-linux-musl"
  base="https://github.com/nushell/nushell/releases/download/${release}"
  workdir=$(mktemp -d)
  trap 'rm -rf -- "$workdir"' EXIT
  cd "$workdir"

  curl -fsSLO "$base/$bundle.tar.gz"
  curl -fsSLO "$base/SHA256SUMS"
  sha256sum --check --ignore-missing SHA256SUMS
  tar -xzf "$bundle.tar.gz" "$bundle/nu"
  install -d "$HOME/.local/bin"
  install -m 0755 "$bundle/nu" "$HOME/.local/bin/nu"
)

Look for OK next to the archive name. If verification fails, the install stops. The archive also contains optional nu_plugin_* binaries. This guide installs only nu because the examples use built-in commands.

If you already use mise, you can install Nu with mise use -g nushell, or build it with cargo install nu --locked using Rust and Cargo.

2. Verify and launch Nu

Step 2. Start a Nushell session from Bash
Bash
nu --version
nu

Expect 0.117.0 with the release shown here. APT may offer a newer version. If Bash can’t find the archive install, run ~/.local/bin/nu directly. When you’re done, type exit in Nu to return to Bash.

To open Nu automatically in GNOME Terminal, open Preferences, select a profile, go to its Command tab, and enable the custom command. Enter /usr/bin/nu for the APT install or the full path to the user-local binary. Keep Bash as your login shell because Nu uses its own syntax and does not process POSIX login profiles. See the terminal setup guide for other terminal apps.

3. Use Nushell pipelines

Step 3A. Find your five largest files

In Nu, go to a directory with files you want to inspect. This pipeline filters out directories and uses the size column to put the largest five files first. If there are fewer than five files, you’ll see fewer rows.

Nushell
ls | where type == file | sort-by size | reverse | first 5
Step 3B. Filter a CSV by column

In an empty practice directory, create this sample inventory. The first row names the columns.

Nushell
[
  [item stock];
  ["USB cable" 3]
  ["Keyboard" 0]
  ["Mouse" 7]
] | save nu-demo-stock.csv

Open the CSV as a table and show only the items with stock above zero.

Nushell
open nu-demo-stock.csv | where stock > 0

The result contains USB cable and Mouse. To write the filtered rows to a new CSV, use | save where you might reach for Bash’s > redirection. Nu uses the .csv extension to choose the output format.

Nushell
open nu-demo-stock.csv | where stock > 0 | save nu-demo-in-stock.csv
Step 3C. Run Linux commands and Bash scripts

Prefix a command with ^ to call an external executable when Nu has a built-in with the same name. For example, ^ls -lh calls the system ls, and ^ps aux calls the system ps. To run an existing Bash script, open its directory and pass the file to Bash.

Nushell
bash ./script.sh

If the file is already executable and starts with #!/usr/bin/env bash, you can also run it directly with ./script.sh.

Troubleshoot Nushell installation

Issue 1. Bash cannot find nu or launches the wrong copy

After a user-local install, sign out and back in so Ubuntu’s usual login profile can add ~/.local/bin to PATH. For the current Bash session, add it yourself and check which binary comes first.

Bash
export PATH="$HOME/.local/bin:$PATH"
type -a nu

The APT binary is /usr/bin/nu. A user-local copy or tool manager shim may take precedence. Follow the removal steps below for any duplicate.

Issue 2. APT reports a key error or cannot locate nushell

Check both paths from Step 1A, including the source’s signed-by value. If the key download failed or the files are unreadable, rerun Step 1A and confirm that sudo apt update successfully fetches the Gemfury index. Use apt-cache policy nushell to inspect the package candidate. If the repository remains unavailable, use the verified archive.

Update or remove Nushell

Update Nushell
Bash
sudo apt update && sudo apt install --only-upgrade nushell

This command updates an APT installation. For the archive, select a newer release and repeat Step 1B with the matching release value and checksum file. It replaces your current user-local binary after verification. Check with nu --version.

Restore Bash before removing a Nu login shell

If you previously used chsh to make Nu your login shell, run this before purging the package or deleting ~/.local/bin/nu. Keep your current session open and verify you can log in again with Bash before removing Nu. If you set up a terminal profile for Nu, disable its custom command or switch to a Bash profile first.

Bash
chsh -s /bin/bash
Remove the APT installation

Purge the package. The remaining commands remove the dedicated Gemfury source and key and refresh the APT indexes.

Bash
sudo apt purge nushell &&
sudo rm -f /etc/apt/sources.list.d/fury-nushell.list /etc/apt/keyrings/fury-nushell.gpg &&
sudo apt update
Remove the user-local installation

Remove the binary installed by this guide. If you copied any optional plugins, remove those separately.

Bash
rm -- "$HOME/.local/bin/nu"

Both removal methods preserve your personal configuration, usually under ~/.config/nushell, unless you delete it yourself. Before removal, you can run $nu.config-path in Nu to see the exact path to config.nu.

Frequently asked questions

Can I try Nushell without changing my default shell?

Yes. Start nu from Bash and type exit when you want to return.

Do I need plugins for the examples in this guide?

No. File listings, filters, sorting, and CSV support are built into Nu.

Can I run Bash scripts from Nushell?

Yes. Pass your script to Bash with bash ./script.sh, or run it directly if it is executable and has a Bash shebang.

Helpful Resources

r/Nushell ↗Community questions and examples
The Nushell Book ↗Learn pipelines, types, and shell configuration
Nushell 0.117.0 release ↗Download archives and SHA256SUMS