Looking to learn Linux but don't know how/where to start? WSL may be a good option for you.

In 2018, Microsoft released the Windows Subsystem for Linux (WSL). WSL lets developers run the GNU/Linux shell on a Windows 10 PC, a very convenient way to access the beloved tools, utilities and services Linux offers without the overhead of a VM.

WSL is also the best way to learn Linux on Windows!

About WSL

run bash shell scripts

run GNU/Linux command-line applications including: vim, emacs, tmux

run programming languages like JavaScript, Node.js, Ruby, Python, Golang, Rust, C/C++, C# & F#, etc.

run background services like ssh shells, MySQL, Apache, lighttpd;



install additional software using own GNU/Linux distribution package manager.

invoke Windows applications.

access your Windows filesystem

Installing WSL on Windows 10

Step 1 - Run a Powershell Command

shift + right-click ): On your Windows PC, you will need to run this PowerShell script as Administrator ():

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows -Subsystem-Linux

Step 2 - Install WSL

Start -> Type Store -> Click on the Windows Store :

Running WSL

Using the Terminal

Accessing my Windows files

Access internet resources

I install software

Accessing Windows Files

/mnt/c

mount

ls

Accessing the Internet

ping

ifconfig

Installing Software

apt-get install

sudo apt-get install ruby-full

Using git

sudo apt-get install git

... # apt installs git

git --help # to get help

Getting Help

man git

Additional tip: try the new Windows Terminal

What's next?

learn the basic GNU tools ( cp, rm, ls, more, less, head, top, mount, etc);

etc); try to edit files with Vim or nano;

install software with apt (for Debian-based systems) and dnf (for RH/CentOS/Fedora);

try some development (Python, Ruby, Go, Rust or C with gcc);

try to install and run services such as MariaDB, nginx or Node.js;

test out cool terminal tools like w3m, Ranger file manager, Reddit, DuckDuckGo on the terminal;

Conclusion

ls, cp, man, rm, ps

References

See Also

Currently WSL supports Ubuntu, Debian, Suse and Kali distributions and can:Installing WSL is covered by Microsoft on this article and is as easy is two steps. Let's take a quick look.After the installation ends, restart your PC.After the reboot, WSL can be installed through the Windows Store . To open the Windows Store on your Windows 10, click:Then type "Linux" on the search box and you should get something similar results to this:Click on the icon, accept the terms and Windows will download and install WSL for you.After installation started, you will be prompted to enter your username and password. After done, you'll get a cool Linux terminal to start playing with. You can even have multiple Distros installed on your Windows 10 machine. On mine, I installed Debian and Ubuntu Okay, so now that we have access to our Linux shell, what to do next? Let's go through these use cases:WSL mounts your Windows files on the mount point . To verify on yours typeon the command prompt and look for C: on it. Your windows files should be there.In case you don't know Linux, listing files is done with. This is the content of my C drive as as seen from WSL:Your WSL instance should have access to the internet. Testing the internet is as simple as doing ato Google:You can also verify your network info withInstalling software on Ubuntu/Debian is done by the apt command. For example, this is how we search packages:To install packages, use. For example, to install Ruby on the Ubuntu WSL , run the command below:We can leverage apt and install git with:And, I'd recommend learn to use it on the terminal. Atlassian has an excellent tutorial to learn git Need help? The man tool is there to help you. For example, we could run the commands below to get help on git for example:And, if you want to invest more time on your WSL, I'd suggest that you install the new Windows Terminal . Download the last release from GitHub and install it on your box. It's very customizeable and contains shells for WSL, PowerShell, Azure CLI and the traditional Windows terminal.Now that you know how to locate your files, have access to the internet and installed some software, I'd recommend that you:So you have the WSL installed on your machine and now you have a Linux terminal to starting playing with. Now what? The first thing I'd recommend is to get comfortable with basic system commands , etc), understand the filesystem, learn to add/remove software and run administrative tasks on the terminal. WSL is perfect for users who want to learn Linux and to those who spent a lot of time on Windows but need access to a Linux terminal.For other posts abouton this blog, please click here