Where Are Nushell Config Files Stored?
Nushell keeps config.nu and env.nu in its default config directory. The parent folder differs by operating system.
Last updated
Nushell loads env.nu then config.nu at startup, plus optional login.nu and autoload files. First launch creates the folder with commented defaults.
Find the active folder from inside Nushell by printing the default config dir constant. That path is where to place custom modules and edits.
Where Nushell stores this, by platform
C:\Users\<username>\AppData\Roaming\nushell\config.nu
<username> is your Windows account name. env.nu lives in the same folder. Respects XDG_CONFIG_HOME if set before launch.
/Users/<username>/Library/Application Support/nushell/config.nu
<username> is your macOS account name. env.nu lives in the same folder. History and plugin files also default here.
/home/<username>/.config/nushell/config.nu
<username> is your Linux user name. env.nu lives in the same folder. Respects XDG_CONFIG_HOME if set before launch.
Frequently asked questions
How do I open the config quickly?
Run config nu to open config.nu in your set editor, and config env to open env.nu. Set buffer_editor first if no editor is defined.
How do I use a custom location?
Set XDG_CONFIG_HOME before launch to move the config root, or start Nushell with explicit config and env file flags. Test setups often use a temp folder for isolation.
Notice an outdated path? Let us know.