Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I filter from plain text output

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

just found this in –help docs

wsl -l --running

output:

Windows Subsystem for Linux Distributions:
Ubuntu (Default)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading