Linux – How Much Disk Space is WSL Using On Windows

disk-spaceUbuntuwindows 10windows-subsystem-for-linux

How much disk space is WSL using on Windows?

I found that you can go into Windows' Apps & Features and it will display disk usage for the WSL2 "Ubuntu", but this does not seem to include WSL Legacy or maybe it does since it seems to report more than I expect?

Best Answer

Determine Disk Usage From Linux

Using a tool like ncdu can make determining disk usage easy with a nice cli interface to it as well.

Install ncdu

sudo apt install ncdu  

Running ncdu

So we do not get all of Windows' directories along for the ride we'll need to exclude the /mnt directory.

ncdu --exclude /mnt

Determining From Windows

Under Windows' Apps & Features it lists Ubuntu as taking up 1.92 GB

ncdu reports 1.7 GiB (~1.82GB) which is pretty close to what Windows reports.

WSL Legacy "Bash on Ubuntu on Linux"

I was not able to find how much room Bash on Ubuntu on Linux was occupying through Windows, but I was able to see how much it was using by running ncdu --exclude /mnt.

Related Research

Related Question