Home > Software engineering >  How do I filter from plain text output
How do I filter from plain text output

Time:11-13

I'm running wsl -l -v to get a list of WSL VMs on my computer and I get a list like this:

NAME             STATE     VERSION
Ubuntu-18-04     Stopped   2
Ubuntu-20-04     Running   2

I only want to see the ones that are running.
I tried:

wsl -l -v | Select-Object NAME

but I just get a list of blank lines.

CodePudding user response:

just found this in --help docs

wsl -l --running

output:

Windows Subsystem for Linux Distributions:
Ubuntu (Default)
  • Related