A data-oriented shell

Data Pipeline

© Lead Image © shacil, 123RF.com

© Lead Image © shacil, 123RF.com

Article from Issue 296/2025
Author(s):

Nushell's data-first approach elevates shell scripting to a new level of clarity and precision.

Traditional shells operate on unstructured text, often requiring brittle parsing. Nushell replaces that with structured data pipelines, enabling consistent, reliable commands that treat output as typed tables, records, and lists. Nushell (often called Nu) is a modern shell designed for working with structured data, built in Rust, and inspired by Unix's pipeline philosophy. Unlike traditional shells that pass text streams, Nushell pipelines pass structured data (tables, records, lists), allowing you to filter, sort, and query information without tedious string parsing. This makes Nu especially powerful for developers and system administrators who frequently work with JSON, YAML, CSV, and other data formats.

Installation and Configuration on Ubuntu

Nushell can be installed on Ubuntu in multiple ways (Apt repository, Snap, or building from source). Here I will focus on the Apt repository method, which is straightforward and keeps Nushell up to date via apt. Alternatively, you can use Snap or Homebrew [1].

To install Nushell securely on Ubuntu using the official Apt repository, start by adding the GPG key that ensures the packages' authenticity. This key is required by the Apt system to verify that downloaded packages come from a trusted source.

curl -fsSL https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/fury-nushell.gpg

Next, add the Nushell repository to your system's Apt sources list:

echo "deb https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury.list

This enables your package manager to locate and retrieve Nushell packages from the designated remote repository. Once the repository is configured, update your local package cache so that Apt becomes aware of the newly added Nushell source and can fetch package metadata:

sudo apt update

Finally, install Nushell using the standard apt installation command:

sudo apt install nushell

This pulls the Nushell binary and all its dependencies from the repository and installs them on your system (Figure 1).

Figure 1: The welcome screen confirms that the environment and config files were initialized.

Basic Configuration

Once Nushell is installed, you'll likely want to configure it to suit your environment. Nushell's configuration is typically done in two files (Figure 2) located in your config directory (usually ~/.config/nushell/ on Ubuntu systems):

  • config.nu: The main configuration script that runs at startup for interactive Nushell sessions (similar to Bash's .bashrc). Here you can set Nushell-specific options, aliases, prompt customization, and run any commands on startup.
  • env.nu: A script to set environment variables for Nushell (and exported to commands run from Nushell). This is akin to an environment profile.
Figure 2: The config.nu and env.nu files are created automatically on first launch.

Structured Data Processing

One of Nushell's standout features is its ability to handle structured data natively in the shell. Traditional shells treat all command output as text, leaving you to parse it with tools such as grep, awk, or jq. Nushell commands, by contrast, return tables, records, and lists – rich data types that you can filter and manipulate with ease.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • FOSSPicks

    After building a 3D printer last month, Graham's home is now filled with cup holders, phone holders, cable holders, and tiny PLA boats. This month, Graham explores Zrythm, Mumble 1.3, NoteKit, Kirogi, monolith, pastel, Nu Shell, PacVim, Stunt Car Racer Remake, and more!

  • Spider, Spider

    Scrapy is an open source framework written in Python that lets you build your own crawlers with minimal effort for professional results.

  • Advanced Shell Scripting

    Shell scripting is a versatile tool for managing and automating the modern IT infrastructure. This article reaches beyond the basics with some advanced techniques for tackling real-world challenges.

  • Bash vs. Vista PowerShell

    Microsoft’s new PowerShell relies on .NET framework libraries and thus has access to a treasure trove of functions and objects. How does PowerShell measure up to traditional shells like Bash?

  • Tutorial – Shell Scripting

    You do not need to learn low-level programming languages to become a real Linux power user. Shell scripting is all you need.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News