-
|
About 5 years ago I installed WSL on a Windows 10 machine. It was just out of curiosity really, I've never had much reason to use it. So it's still there on my machine (along with Debian) and they never caused any problem so I just left them there. But now I'd like to look a bit deeper and install some Linux apps - which got me wondering... How does disk space get allocated to/by WSL? Is it something T would've needed to configure at install time or does WSL allocate space fluidly (i.e. as and when Debian needs more space?) And is there a bash command I could run to find out how much space it thinks is available? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 12 replies
-
|
You may use |
Beta Was this translation helpful? Give feedback.
-
|
Short answer to your two questions: it's fluid, you didn't configure anything at install time, and WSL 2 keeps the whole Debian filesystem inside a single virtual disk file ( Two things bound how big it can get:
To see what Debian thinks it has, from inside the distro: df -h /
One thing worth knowing before you start installing apps: the wsl --shutdown
# then compact, either via Hyper-V's module (Windows Pro):
Optimize-VHD -Path "<path to ext4.vhdx>" -Mode Full
# or via diskpart: select vdisk file="<path to ext4.vhdx>" then compact vdiskFor just trying out a few Linux apps you won't get anywhere near the limit, so you can ignore all of that and just go. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
@ELHart05 - HEEEELP... on a different forum I was chatting about WSL and I casually asked if anyone could take a guess at the simpler command I previously used for nautilus to run in the background without showing those numbers. Some lunatic suggested it was probably nohup nautilus&. It didn't seem right but I tried it anyway. But now, whenever I launch any app, a brand new job gets created:-
Given that it survives a re-boot, I guess some secret file must get created somewhere and once created, nohup then takes over the bash terminal for the rest of eternity. Is there any way I can get things back to normal? [Edit...] Notice that while the process ID changes, the job number is always [1]. It only ever changed to [2] if I launched nautilus while another instance was already active. After nohup the same command sequence now looks like this (even after re-booting etc):- which suggests (to me) that closing nautilus down is no longer stopping the process (or maybe it's now taking a long time for processes to stop?). The guy on the other forum is saying that this shouldn't be happening after a re-boot (i.e. nohup shouldn't survive a re-boot) and therefore it must be some peculiarity with WSL??? |
Beta Was this translation helpful? Give feedback.

That's normal job control, nothing is wrong. When you background a process with
&, bash prints[1] 12345: the[1]is the job number and12345is the process ID, which changes every launch because each new process gets a fresh one. Safe to ignore.If you would rather not see them, launch it detached and quiet with
setsid nautilus >/dev/null 2>&1.More on how this works: https://www.gnu.org/software/bash/manual/html_node/Job-Control-Basics.html
Sounds like Home is back and Nautilus launches the way you wanted, so if you are happy with it all, feel free to mark this as the answer, thanks