Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to check version/build number of WLS #1728

Closed
pawelpanasewicz opened this issue Feb 26, 2017 · 8 comments
Closed

how to check version/build number of WLS #1728

pawelpanasewicz opened this issue Feb 26, 2017 · 8 comments

Comments

@pawelpanasewicz
Copy link

I can update WLS instance using lxrun /upadate? How can I check the version of it?

Will the version be some of the build numbers listed in WLS releases page?
https://msdn.microsoft.com/en-us/commandline/wsl/release_notes

@aseering
Copy link
Contributor

aseering commented Feb 26, 2017

Hi @pawelpanasewicz -- lxrun /update updates the Ubuntu userspace software cache in your WSL environment. It's the equivalent of running sudo apt-get update. You would additionally want to run sudo apt-get upgrade in order to actually update packages. There is no single version number for these packages; each installed package has its own version, and that command will check for updates for all of them. You can see the version number for each installed Linux package (beware, there are a lot of them!) by running dpkg -l.

Updates to WSL itself are automatically available through Windows Update. If you're using the stable version of Windows, WSL is updated very infrequently; probably once or twice per year. If you want faster updates, you can join the Windows Insider program; then you get updates to all of Windows (including WSL) about once every week or two (for the "Fast Ring") or maybe once every month or two (for the "Slow Ring"). Please read about the Insider program before joining; it has a bunch of effects on your system.

To find your Windows build number (which corresponds to your WSL version), go to Cortana and type "About your PC", and press Enter. This should open up the Windows 10 "About" window. Your Build number is shown in the "OS Build" field:

2017-02-26

@benhillis
Copy link
Member

@aseering - You're mostly right. lxrun /update only updates the package cache (apt update), it doesn't actually install the upgrades (apt upgrade).

@aseering
Copy link
Contributor

@benhillis -- thanks for catching that! I've updated my comment above.

@pawelpanasewicz
Copy link
Author

Hi @aseering, @benhillis, thanks for advices!

@Memphizzz
Copy link

To get this information from within WSL, you can run the following:
cmd.exe /c "systeminfo" | grep "^OS Version"

@Birhanukassa
Copy link

you can check which specific wsl version you are in by running on your Linux-alike terminals :
name -r

@DPatrickBoyd
Copy link

@BrukeG1 did you mean "uname -r"?

@Birhanukassa
Copy link

To update your wsl 2, go on Power Shell as administrator and type

wsl --set-default-version 2

to check which version you are currently running/if any, go to the PowerShell as an administrator and type

wsl --list --verbose

@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants