Linux

Installing Nix in WSL Ubuntu

If Try to install Nix package Manager on Window Subsystem for Linux or WSL, it throws some cryptic error messages,
But There is work around for installing Nix On WSL Ubuntu or any other Distro. This Errors in WSL due to limited support to sandbox apis in WSL.

 

Steps to install Nix Package Manager On WSL

  • Before running Nix Install script, we need to create nix config file in path /etc/nix/nix.conf
  • Also make sure you create /etx/nix dir .
  • and add the following config options to the above file
sandbox = false
use-sqlite-wal = false

Now Run the Nix Package Manager Install script:

curl https://nixos.org/nix/install | sh

And It will install successfully.

About the author

Vithal Reddy

Vithal Reddy is a seasoned technology professional with expertise in Full Stack Web development, Micro services and Scaling infrastructure on Cloud.
More at vithalreddy.com