Hello Sunil
How to Install and use Windows Subsystem for Linux (WSL) on Windows 10

How to Install and use Windows Subsystem for Linux (WSL) on Windows 10

For example, if you enter “sunil_linux” and “demo@123” as your credentials, your username in the Ubuntu Linux environment will be “sunil_linux” and the password you use inside the Ubuntu Linux environment will be “demo@123”.

Finally, you are taken into the Ubuntu Bash shell, which you can see in the next figure.

Username and password has successfully set for Ubuntu Linux - WSL on Windows 10

At this point, you can now use the Ubuntu Bash shell as if you were on a computer with Ubuntu installed as its primary OS.

Play with Linux commands in Ubuntu Bash shell

In our last section we have configured Ubuntu environment by setting username and password, now we are ready to play with Linux commands inside Windows 10 as if we are using Linux PC. Type below commands one by one to play around in Bash shell.

apt help  : It demonstrate the usage of the package manager.

apt help - It demonstrate the usage of the package manager - WSL on Windows 10

sudo apt update  : Use this command to get the latest packages, as you are on a Linux PC.

sudo apt update - Use this command to get the latest packages, as you are on a Linux PC - WSL on Windows 10

sudo apt upgrade  : Use this command to upgrades Linux to the latest version of the OS.

sudo apt upgrade - Use this command to upgrades Linux to the latest version of the OS - WSL on Windows 10

Meanwhile, other standard commands are available. You can check your network connectivity with ifconfig, check the current directory with pwd, and change to a different directory with cd.

In short, it’s just like using Linux within the Windows 10 operating system.

Conclusion

We hope this article helped you learn how to activate WSL then download Linux distribution from Microsoft Store and finally use it under Windows 10 environment.

This is not everything what we have covered here, we also recommend WSL guide on Github from Michael Leon Treat. It covers some of the same information we have covered in this article, but is written specifically to help developers new to WSL set up their work environment and understand how the Windows and Linux file systems interact.

[yasr_visitor_votes size=”medium”]

Sunil Pradhan

Hi there 👋 I am a front-end developer passionate about cutting-edge, semantic, pixel-perfect design. Writing helps me to understand things better.

Add comment

Stay Updated

Want to be notified when our article is published? Enter your email address below to be the first to know.

Sunil Pradhan

Hi there 👋 I am a front-end developer passionate about cutting-edge, semantic, pixel-perfect design. Writing helps me to understand things better.