How to Install and Use Nu Shell on Linux
If you’re tired of the same old Bash prompt and want something that feels like a modern CLI without giving up your favorite tools, Nu Shell (nushell) is worth a try. It’s a cross‑platform shell written in Rust that treats output as structured data, making pipelines feel more like spreadsheets than text streams.
Quick Overview
1. Grab the binaries or install via package manager
2. Switch to a Nu prompt with nu
3. Learn the basics: navigating columns, filtering rows, and calling external commands
4. Plug it into your daily workflow (aliases, config, integration)
That’s all you’ll need for a solid start.
5–Minute Install
Ubuntu / Debian
sudo apt update && sudo apt install nu
If the repo doesn’t have the latest version, grab a tarball from GitHub:
curl -LO https://github.com/nushell/nushell/releases/download/v0.84.1/nu-linux-x86_64.tar.gz tar xf nu-linux-x86_64.tar.gz sudo mv nu /usr/local/bin/
Fedora / CentOS
sudo dnf install nushell
Arch Linux (and derivatives)
yay -S nushell
If you prefer Snap, it’s available too:
sudo snap install nu --classic
Why You’ll Notice the Difference
Nu parses command output into tables and lists automatically. That means when you run ls, instead of a raw string list, Nu gives you columns for size, modification time, owner, etc., all ready for further manipulation with simple commands like where or sort. Think of it as having a spreadsheet built into your terminal.
First Steps in Nu
Start the shell:
nu
You’ll see a prompt that looks similar to Bash but has the word “Nu” instead of $. Now try a few quick experiments:
1. List files with size filtering
ls | where size > 1000000 | sort-by -i size
This shows only large files, sorted by size.
2. Chain commands with pipes
cat /etc/passwd | lines | each { $it.split(':')[0] }
You can use each to apply a small closure to every line—just like awk.
3. Call external utilities and keep data structured
ping -c 2 google.com | lines | first
Nu keeps the output in a readable format while still letting you pipe it into further filters.
Integrating Nu Into Your Workflow
Aliases
Add these to ~/.config/nushell/config.nu (create if missing) for quick access:
alias ll = 'ls -l' alias gs = 'git status'
Now ll will give you a nicely formatted table, and gs will use Nu’s git wrapper.
Custom Prompt
Want something more informative? Add this to the same config file:
export-env prompt_config = {
left: [
(prompt_segment { text: $env.USER color: green })
(prompt_segment { text: ($nu.current_dir | path basename) color: blue })
(prompt_symbol { symbol: '❯' color: yellow })
]
}
It displays your username, current directory in a bright color, and a cool arrow.
Auto‑Completion
Nu ships with an auto‑completion script for Bash, Zsh, and Fish. Add it to your existing shell:
source /usr/share/nushell/completions/bash.nu-completion.sh
Now you’ll get suggestions when you hit <Tab> inside Nu.
Real‑World Scenarios
- Troubleshooting logs:
If a service crashes and dumps a stack trace, pipe it into Nu to filter lines containing “error” or “panic.”
tail -n 200 /var/log/syslog | grep error | nu
- System inventory:
Get all installed packages with their sizes in one glance.
dpkg-query -l | lines | each { split row ' ' } | where $it[0] == 'ii'
I once had a broken network driver that caused ifconfig to output gibberish. Running it through Nu and then applying where on the interface name made the culprit obvious in seconds.
When Nu Might Not Be Your Thing
If you’re deep into Bash scripting and rely heavily on shell-specific syntax ($@, process substitution), switching fully can feel like learning a new language. Nu is great for interactive use, but you’ll need to port scripts or wrap them with bash -c if you want them to stay functional.
Final Thoughts
Nu Shell gives the terminal a modern twist without forcing you to abandon your favorite tools. Install it, play around with pipelines that treat data like tables, and watch your productivity get an unexpected boost. If you’re already comfortable with Bash or Zsh, Nu is a low‑effort upgrade that’s worth experimenting with.