Home TechnologyLinux How to Get the Linux Terminal Using Windows Subsystem for Linux

How to Get the Linux Terminal Using Windows Subsystem for Linux

by Ivan

Need to use the Linux terminal on your Windows PC? Learn how to run Linux on Windows 10 with Windows Subsystem for Linux.

How to Get the Linux Terminal Using Windows Subsystem for Linux

You can now access most of the Linux Terminal command-line utilities and applications on top of Windows 10 OS using Windows Subsystem for Linux (WSL).

Although Windows is the most widely used and most popular operating system for desktops and laptops, it is not as secure and open-sourced as Linux OS. That’s is why a lot of software developers and professionals prefer Linux OS.

Microsoft has started a partnership with Canonical, creators of Ubuntu Linux. This paved way for Linux users to use Linux on Windows. Yes, you can run Linux on top of Windows 10 without the need for a dual boot, or using VMWare/VirtualBox, or installing it as your main Operating System.

You can access various Linux commands and software from the Linux terminal in Windows 10. In this article, we’ll give you step-by-step instructions on how to install and run the Linux terminal on Windows 10 OS.

Want quick and easy access to Linux on your Windows PC? The best option is to use the Windows Subsystem for Linux.

This gives you a Linux bash shell, a terminal window running in Windows. The process essentially installs Linux on Windows 10 – here’s what you need to know.

What Is the Windows Subsystem for Linux?

First included with the 2018 Windows 10 Anniversary Update and rolled out to all users in the Fall Creators Update, Windows Subsystem for Linux lets you run Linux software in Windows 10.

This is a feature that has been built into Windows. Unlike installing Linux in a virtual machine, the Windows Subsystem for Linux can be instantly called from the Start menu.

For this to work, however, you first need to enable the feature.

Once the Windows Subsystem for Linux is installed on Windows 10, you can run Linux in command line mode. This gives you an almost fully functional Linux terminal for Windows 10.

Linux Bash Shell: For 64-Bit Windows 10 Only

Before you get started, make sure you’re running a 64-bit version of Windows 10. Sadly, the Windows Subsystem for Linux will not work on 32-bit systems. Check if your computer is running a 32-bit or a 64-bit version of Windows.

To check your computer for 64-bit compatibility, press WIN + I to open Settings, then System > About. Under “Device specifications” you’ll see the System type listed; for Windows Subsystem for Linux, this should read 64-bit operating system.

If not, you’ll need to upgrade your Windows 10 system from 32-bit to 64-bit. However, this will only work if you have 64-bit hardware.

How to Install Linux Bash Shell on Windows 10

Before proceeding, be aware that some systems cannot have Windows Subsystem for Linux enabled and virtual machines (VM) at the same time. As such, if running Linux in a VM is your preference, you’ll need to disable Windows Subsystem for Linux before using the virtual machine again.

Ready to install Bash on Windows? Start by clicking Start and entering “turn windows”. The Turn Windows Features on or off item should be displayed, so click this to open. Wait while the list is populated, then scroll down to Windows Subsystem for Linux.

This box should be checked. If it isn’t, add a check, then click OK to confirm.

You’ll be prompted to restart Windows, so follow this instruction. Upon restarting, open Start > Windows Store. Use the search tool to find entries relating to “Linux” and select your preferred Linux version to install. Whichever one you choose will determine the Bash experience. For example, you can install Ubuntu on Windows 10.

Install the Linux operating system, then wait. Once complete, click Launch from within the Windows Store or open it from the Start menu. On the first run, you’ll be prompted to input a username and password to create a user account.

Other methods are available to launch your chosen Linux environment. From the Start menu, you can enter:

  • bash
  • wsl

Both will display as a “Run command” that can be selected to instantly open Bash shell. The difference with using either of these methods is that they open in the /mnt/c/Windows/System32 directory. This means you can browse the System32 subdirectory in Windows 10.

Note that it is not possible to damage Windows 10 using the Linux environment. Any commands you input will damage only the Windows Subsystem for Linux and the chosen operating system. Windows 10 will remain safe and secure.

Also, you no longer need to enable the Windows 10 Developer Mode in Settings to run Bash.

How Does Bash Shell Terminal Differ from the Windows PowerShell?

With the Linux terminal for Windows 10 running, you can input a variety of command line instructions.

Note that it is not possible to damage Windows 10 using the Linux environment. Any commands you input will damage only the Windows Subsystem for Linux and the chosen operating system. Windows 10 will remain safe and secure.

Also, you no longer need to enable the Windows 10 Developer Mode in Settings to run Bash.

How Does Bash Shell Terminal Differ from the Windows PowerShell?

With the Linux terminal for Windows 10 running, you can input a variety of command line instructions.

Similarly, the sudo apt upgrade command upgrades Linux to the latest version of the OS.

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.

You can also get a quick list of the last 10 inputs with the history command.

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

Windows 10 Bash Brings Linux to Any PC

Setting up the Windows Subsystem for Linux and accessing the Bash shell is easy. It’s also quicker than running a virtual machine, and far less complicated than relying on a dual boot.

To recap, all you need to do to run the Linux Bash shell on Windows 10 is:

  1. Check you’re using 64-bit Windows 10.
  2. Enable Windows Subsystem for Linux in the Windows Features screen.
  3. Install your chosen Linux environment from the Windows Store.
  4. Run Linux from the Start menu.

From then on, you can use the Linux terminal for Windows for standard command line tasks. Or you might use Windows 10’s Linux subsystem to install a desktop environment.

Meanwhile, almost all Linux commands can be used in the Bash shell on Windows. Bit rusty, or need some help learn some Linux command line tricks.

You may also like

Leave a Reply

[script_16]