How to Install Ubuntu on Windows 10 WSL

29/12/2020
Chưa phân loại
The full form of WSL is Windows Subsystem for Linux. It is a feature of Windows 10 that lets you install and run a full-fledged Linux environment on Windows 10. Windows did not use any virtualization technique here. Instead, Microsoft built a way (WSL) to run Linux binaries on Windows. So, it’s fast and does not require much memory to run.  In this article, I will show you how to install Ubuntu on Windows 10 using Windows WSL. Let’s get started.

Enabling WSL:

First, you have to enable WSL on Windows 10. It is really easy.  First, go to the Settings app from the Start menu.

Now, click on Apps.

Now, from the Apps & features tab, click on Programs and Features as marked in the screenshot below.

Now click on Turn Windows features on or off from the Programs and Features as marked in the screenshot below.

Now, check the Windows Subsystem for Linux checkbox as marked in the screenshot below and click ok OK.

Now, click on Restart now. Windows 10 should reboot.

Installing and Configuring Ubuntu on Windows 10 WSL:

Once your computer starts, open Microsoft Store from the Start menu as shown in the screenshot below.

Now, search for ubuntu. As you can see in the screenshot below, you can install Ubuntu 16.04 LTS or Ubuntu 18.04 LTS at the time of this writing.

I decided to install Ubuntu 16.04 LTS in this article. So, I clicked on it. Now, click on Get as marked in the screenshot below to install Ubuntu.

As you can see, Ubuntu is being installed from the Microsoft Store. It may take a while to complete.

After a while, Ubuntu should be installed.

Now, start Ubuntu from the Start menu as shown in the screenshot below.

As you’re running Ubuntu on Windows 10 for the first time, you will have to configure it. Just press <Enter> to continue.

Now, you have to create a user account on Ubuntu. Type in the username and press <Enter>.

Now, type in a new password for the username you picked and press <Enter>.

Now, retype the password and press <Enter>.

A new user for Ubuntu should be created.

Now, you can run any Ubuntu Linux command here. I ran the lsb_release -a command and as you can see in the screenshot below, I am running Ubuntu 16.04.5 LTS on Windows 10 through WSL.

Ubuntu WSL version is using a custom version of the Linux kernel as you can see in the screenshot below.

You can also exit out of the bash like you always do with the exit command.

Once you do the initial configuration, every time you run the Ubuntu app, you will see a bash console as shown in the screenshot below.

As you can see, the Ubuntu’s free command also works.

Installing Ubuntu Packages:

You can also install Ubuntu packages here as well. The popular apt and apt-get commands are available.  For example, let’s install the htop package on this version of Ubuntu and see what happens.  First, open Ubuntu app and run the following command to update the APT package repository cache:

$ sudo apt update

As you can see, the APT package repository cache is updated.

Now, install htop with the following command:

$ sudo apt install htop

As you can see, htop is installed.

Now, you can run htop with the command:

$ htop

As you can see, htop is running.

So, that’s how you install and use Ubuntu on Windows 10 through WSL. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Installing GCC and C/C++ Build Tools on CentOS 8

In this article, I am going to show you how to install GCC and all the required C/C++ build tools on CentOS 8 for developing...
29/12/2020

How to Install, And Configure a Nginx Server For the First Time

Nginx is one of the popular web servers, and is used as a proxy server, reverse proxy server, load balancer. It’s a popular...
29/12/2020

Install Arch Linux in VirtualBox

Arch Linux may not be for everyone. Most new users would probably prefer an out of the box solution like Debian or Fedora....
28/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Dịch Vụ Xây Dựng Hệ Thống Peering Với Internet Exchange (IXP)
04/04/2025

Dịch Vụ Triển Khai VPN Site-to-Site & Remote Access
04/04/2025

Dịch Vụ Thiết Lập Hệ Thống Tường Lửa (Firewall)
04/04/2025

Dịch Vụ Triển Khai Hệ Thống Ảo Hóa & Cloud
04/04/2025

Dịch Vụ Triển Khai Hệ Thống Ceph
04/04/2025