Skip to content

Commit 6ef63bc

Browse files
committed
update and improve
ODA #85
1 parent a63f289 commit 6ef63bc

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

wsl/how-to/install-ubuntu-wsl2.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,26 @@
44
## What you will learn:
55

66
* How to enable and install WSL on Windows 10 and Windows 11
7+
* How to install `Ubuntu 24.04 LTS` using: Microsoft Store, WSL CLI, or Winget
78

89
## What you will need:
910

1011
* A Windows 10 or Windows 11 physical or virtual machine with all the updates installed
1112

1213
## Install WSL
1314

14-
WSL can be installed from the command line. Open a PowerShell prompt as an Administrator (we recommend using Windows Terminal) and run:
15-
```
15+
You can install WSL from the command line. Open a PowerShell prompt as an Administrator (we recommend using [Windows Terminal](https://github.com/microsoft/terminal)) and run:
16+
```text
1617
wsl --install
1718
```
1819

1920
This command will enable the features necessary to run WSL and also install the default Ubuntu distribution of Linux available in the Microsoft Store. It is recommended to reboot your machine after this initial installation to complete the setup. You can also install WSL from the Microsoft Store.
2021

2122
## Install Ubuntu WSL
2223

23-
WSL supports a variety of Linux distributions including the latest Ubuntu release. Check out [the documentation](../reference/distributions.md) to see which one you prefer. For the rest of this tutorial we'll use `Ubuntu` as the example.
24+
WSL supports a variety of Linux distributions including the latest Ubuntu LTS release. Check out [the documentation](../reference/distributions.md) to see which one you prefer. For the rest of this tutorial we'll use `Ubuntu 24.04 LTS` as the example.
2425

25-
There are multiple ways of installing distros on WSL, here we show three: via the Microsoft store, via Winget, and the WSL CLI. The result is equivalent.
26+
There are multiple ways of installing distros on WSL, here we show three: via the Microsoft store, WSL Command Line Interface, and Winget. The result is the same regardless of the method.
2627

2728
### Method 1: Microsoft store
2829

@@ -36,37 +37,38 @@ Ubuntu will then be installed on your machine. Once installed, you can either la
3637

3738
### Method 2: WSL Command line interface
3839

39-
It is possible to install the same Ubuntu applications available on the Windows Store directly from the command line.
40-
In a PowerShell terminal, you can run `wsl --list --online` to see all available distros.
40+
It is possible to install the same Ubuntu versions available on the Windows Store directly from the command line.
41+
In a PowerShell terminal, you can run `wsl --list --online` to see all available distros and versions.
4142

4243
![image|690x388](https://github.com/ubuntu/WSL/blob/main/docs/guides/assets/install-ubuntu-wsl2/wsl-list-online.png?raw=true)
4344

44-
You can install a distro using the NAME by running:
45-
```
46-
wsl --install -d Ubuntu-20.04
45+
You can install the version using its NAME:
46+
```text
47+
wsl --install -d Ubuntu-24.04
4748
```
4849

4950
![image|690x388](https://github.com/ubuntu/WSL/blob/main/docs/guides/assets/install-ubuntu-wsl2/installing.png?raw=true)
5051

51-
Use `wsl -l -v` to see all your currently installed distros and which version of WSL they are using:
52+
Use `wsl -l -v` to see all your currently installed distros and the version of WSL they are using:
5253

5354
![image|690x311](https://github.com/ubuntu/WSL/blob/main/docs/guides/assets/install-ubuntu-wsl2/wsl-l-v.png?raw=true?raw=true)
5455

5556
### Method 3: Winget
57+
5658
Open a PowerShell terminal and type:
57-
```powershell
59+
```text
5860
winget show --name Ubuntu --source msstore
5961
```
6062

61-
You'll see a list of distros available and their ID. Choose the one you prefer and install it. For instance, Ubuntu:
62-
```powershell
63-
winget install --Id "9PDXGNCFSCZV" --source msstore
63+
You'll see a list of available distros and their Ids. Choose the one you prefer and install it. For instance, for `Ubuntu 24.04 LTS`:
64+
```text
65+
winget install --Id "9NZ3KLHXDJP5" --source msstore
6466
```
6567

6668
You'll be prompted to accept the source and package agreements before installing. You need to accept them in order to proceed.
6769

6870
Check out [the documentation](../reference/distributions.md) to see which executable matches your application and run it.
69-
```
71+
```text
7072
ubuntu.exe
7173
```
7274

@@ -77,17 +79,18 @@ Congratulations, you now have an Ubuntu terminal running on your Windows machine
7779
Once it has finished its initial setup, you will be prompted to create a username and password. They don't need to match your Windows user credentials.
7880

7981
Finally, it’s always good practice to install the latest updates with the following commands, entering your password when prompted.
80-
```bash
82+
```text
8183
sudo apt update
8284
sudo apt full-upgrade -y
8385
```
8486
## Enjoy Ubuntu on WSL!
8587

86-
That’s it! In this tutorial, we’ve shown you how to install WSL and Ubuntu on Windows 11, set up your profile, install a few packages, and run a graphical application.
88+
That’s it! In this tutorial, we’ve shown you how to install WSL and Ubuntu on Windows 10 or 11.
8789

88-
We hope you enjoy working with Ubuntu inside WSL. Don’t forget to check out [our blog](https://ubuntu.com/blog) for the latest news on all things Ubuntu.
90+
We hope you enjoy working with Ubuntu in WSL. Don’t forget to check out [our blog](https://ubuntu.com/blog) for the latest news on all things Ubuntu.
8991

9092
### Further Reading
93+
9194
* [Setting up WSL for Data Science](https://ubuntu.com/blog/upgrade-data-science-workflows-ubuntu-wsl)
9295
* [Whitepaper: Ubuntu WSL for Data Scientists](https://ubuntu.com/engage/ubuntu-wsl-for-data-scientists)
9396
* [Microsoft WSL Documentation](https://learn.microsoft.com/en-us/windows/wsl/)

0 commit comments

Comments
 (0)