HomeWinBuzzer TipsWindows 10: How to Install the Bash Shell Command-Line Tool / Subsystem...

Windows 10: How to Install the Bash Shell Command-Line Tool / Subsystem for Linux (WSL)

How to Install the Windows Subsystem for Linux (WSL) and activate bash shell using Ubuntu, SUSE, Debian, Kali and Co. within Windows 10.

-

Thanks to the Windows Subsystem for (WSL) you can run complete Linux distributions within . We show you how to install Ubuntu or other Linux packages and how to activate the bash shell.

Since the Windows 10 Anniversary Update you can use complete Linux distributions like Ubuntu, SUSE Linux or Debian and Linux software directly on Windows 10.

The Windows Subsystem for Linux (WSL) is a so called compatibility layer for running Linux executables in ELF format in Windows 10 and not a fully emulated Linux virtual machine.

Microsoft and Canonical have partnered to download and install an Ubuntu image in Windows 10.

Unlike Services for UNIX, the applications contained in this image can run natively on the Windows Subsystem for Linux.

The WSL does not contain any Linux kernel code itself but instead a Linux-compatible kernel interface developed by Microsoft. Executables provided by Ubuntu run on it in user mode.

Microsoft now offers various Linux distributions for free download on the Microsoft Store, with which the respective Bash can also be used on Windows 10.

We show you how to install the Linux subsystem and the available distributions in Windows 10 and how to start working with the Bash.

How to Install the Windows Subsystem for Linux and the Bash Shell Command-Line Tool

Open “Turn Windows features on or off” using Windows 10 search.

Windows 10 - Search - Turn Windows Features on or off
Windows 10 – Search – Turn Windows Features on or off

There, activate “Windows Subsystem for Linux” and click “OK”

Windows 10 - Turn Windows Features on or off - Windows Subsystem for Linux
Windows 10 – Turn Windows Features on or off – Windows Subsystem for Linux

In the following window, click on “Restart now” to finish setting up Windows Subsystem for Linux (WSL).

Windows 10 - Turn Windows Features on or off - Restart now
Windows 10 – Turn Windows Features on or off – Restart now

After reboot, open the “Microsoft Store”.

Windows 10 - Search - Store
Windows 10 – Search – Store

In the Microsoft Store, search for “Linux” to bring up a list of all available distributions, such as Ubuntu, SUSE Linux or Debian GNU.

Microsoft Store - Search - Linux
Microsoft Store – Search – Linux

You can download and install one or more of these distributions just like other normal apps.

Microsoft Store - Downloads and Updates - Ubuntu Debian download
Microsoft Store – Downloads and Updates – Ubuntu Debian download

Installing Ubuntu or another linux distribution will add it to your apps collection insider the start menu.

Windows 10 - Start - Pin Ubuntu Debian to Start
Windows 10 – Start – Pin Ubuntu Debian to Start

When you start a linux distribution from the Windows Subsystem for Linux (WSL) for the first time, it still needs to be set up by entering an administrator name and password of your choice. This should be different to the login data you use for your Windows 10 user account.

Windows 10 - Ubuntu-Bash - UNIX username
Windows 10 – Ubuntu-Bash – Set UNIX username

Once setup is complete, you can use the respective Linux distribution with the bash shell.

Windows 10 - Ubuntu-Bash - Set UNIX password
Windows 10 – Ubuntu-Bash – Set UNIX password

You can use the available commands to install and update packages over the Internet. On Ubuntu, for example, we recommend to first use the command “sudo apt-get update” to update package lists of the software repositories. After that you can set up your WSL-system according to your own preferences.

Windows 10 - Ubuntu-Bash - run - sudo get apt update
Windows 10 – Ubuntu-Bash – run – sudo get apt update

For example, the command “sudo apt install mc” will install the popular file manager “Midnight Commander”. You can launch it afterwards with the command “mc”.

Windows 10 - Ubuntu-Bash - run - sudo apt get mc - run- sudo apt install mc
Windows 10 – Ubuntu-Bash – run – sudo apt get mc – run- sudo apt install mc

Midnight Commander offers you easy navigation on your system, file-related actions and many other things.

Windows 10 Subsystem for Linux - Ubuntu - Midnight Commander
Windows 10 Subsystem for Linux – Ubuntu – Midnight Commander

 

Markus Kasanmascheff
Markus Kasanmascheff
Markus is the founder of WinBuzzer and has been playing with Windows and technology for more than 25 years. He is holding a Master´s degree in International Economics and previously worked as Lead Windows Expert for Softonic.com.

Recent News