WindowsmacOSLinux

Where Is the Nushell Config File?

Nushell's config.nu and env.nu paths per OS, history storage, and XDG overrides.

Last updated

Nushell boots from config.nu and env.nu in a per OS default directory, creating both with comments on first launch. History, plugins registry and login scripts share the same root.

The in-shell shortcut is config nu, which opens the live file in your editor. XDG_CONFIG_HOME relocates the whole tree on every platform when dotfiles demand it.

Where Nushell stores this, by platform

Windows
%APPDATA%\nushell\config.nu

Expands to C:\Users\[Username]\AppData\Roaming\nushell. env.nu, login.nu, history and plugin.msgpackz sit beside it. Reset with config reset, which archives old files first.

macOS
~/Library/Application Support/nushell/config.nu

Same file set. History path is inspectable at runtime via $nu.history-path if behavior ever looks off.

Linux
~/.config/nushell/config.nu

Under $XDG_CONFIG_HOME or ~/.config. Data hungry pieces like plugins consult $nu.data-dir, which XDG_DATA_HOME can redirect separately.

Frequently asked questions

How do I edit Nushell config from inside Nushell?

Run config nu for settings or config env for environment. Both open the real files, so saves apply on next launch without path hunting.

Where is Nushell history?

In the same config root by default, as text or SQLite depending on version. Check $nu.history-path in a running shell for the exact file.

Notice an outdated path? Let us know.