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
    • 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 (Preview)
    • Dataframes
    • Metadata
    • Creating Your Own Errors
    • Parallelism
    • Plugins
    • explore

Default Shell

Setting Nu as default shell on your terminal

TerminalPlatformInstructions
GNOME TerminalLinux & BSDsOpen Edit > Preferences. In the right-hand panel, select the Command tab, tick Run a custom command instead of my shell, and set Custom command to the path to Nu.
GNOME ConsoleLinux & BSDsType the command gsettings set org.gnome.Console shell "['/usr/bin/nu']" (replace /usr/bin/nu with the path to Nu). Equivalently, use dconf Editor to edit the /org/gnome/Console/shell key.
KittyLinux & BSDsPress Ctrl+Shift+F2 to open kitty.conf. Go to shell variable, uncomment the line and replace the . with the path to Nu.
KonsoleLinux & BSDsOpen Settings > Edit Current Profile. Set Command to the path to Nu.
XFCE TerminalLinux & BSDsOpen Edit > Preferences. Check Run a custom command instead of my shell, and set Custom command to the path to Nu.
Terminal.appmacOSOpen Terminal > Preferences. Ensure you are on the Profiles tab, which should be the default tab. In the right-hand panel, select the Shell tab. Tick Run command, put the path to Nu in the textbox, and untick Run inside shell.
iTerm2macOSOpen iTerm > Preferences. Select the Profiles tab. In the right-hand panel under Command, change the dropdown from Login Shell to Custom Shell, and put the path to Nu in the textbox.
Windows TerminalWindowsPress Ctrl+, to open Settings. Go to Add a new profile > New empty profile. Fill in the 'Name' and enter path to Nu in the 'Command line' textbox. Go to Startup option and select Nu as the 'Default profile'. Hit Save.

Setting Nu as login shell (Linux, BSD & macOS)

Warning

Nu is not intended to be POSIX compliant. Be aware that some programs on your system (or their documentation) might assume that your login shell is POSIX compatible. Breaking that assumption can lead to unexpected issues. See Configuration - Login Shell for more details.

To set the login shell you can use the chsh command. Some Linux distributions have a list of valid shells located in /etc/shells and will disallow changing the shell until Nu is in the whitelist. You may see an error similar to the one below if you haven't updated the shells file:

chsh: /home/username/.cargo/bin/nu is an invalid shell

You can add Nu to the list of allowed shells by appending your Nu binary to the shells file. The path to add can be found with the command which nu, usually it is $HOME/.cargo/bin/nu.

Edit this page on GitHub
Contributors: Hofer-Julian, stfacc, PolvosMagicos, LoicRiegel, NotTheDr01ds