Windows 10 Ubuntu Linux: Getting Started

Ubuntu Linux Logo Black-OrangeYou might have heard that Microsoft introduced support for Windows 10 Ubuntu Linux! This has often been referred to as “Bash on Windows 10,” which isn’t untrue, but in reality, it’s actually much more than that. Bash, after all, is just a shell, and there are quite a few different shells available for Linux. What Ubuntu on Windows 10 actually is, is an implementation of Ubuntu Linux that runs natively on Windows 10, otherwise known as the Windows Subsystem for Linux (WSL / WSFL). This is completely revolutionary! In fact, MSDN Channel 9 has an incredibly detailed video that talks about the process architecture for WSL, and helps you to understand how exactly it’s implemented on Windows 10.

Whereas in the past, in order to use common Linux utilities, such as Git or the command line version of SSH, you’d have to install packages like msysgit or Cygwin, both of which had their downsides. The installers for these packages weren’t exactly “Windows-friendly” and could corrupt your shell environment, if you weren’t careful with the installation options. Now that Ubuntu’s Bash shell is natively available on Windows 10, you can run Git, SSH, and other common Linux commands natively! Instead of creating a Linux virtual machine locally, or in the cloud, you can just fire up an Ubuntu Bash shell in a split second, and start running Linux commands!

Windows 10 Ubuntu Linux Overview

  • Requires a download from the Windows Store
  • Bash.exe runs natively on top of Windows 10
  • Local disk drives mounted under /mnt
  • Apt package manager available “out-of-box”
  • Native SSH and Git command line support

Installation

Installing Ubuntu Linux on Windows is incredibly easy. First of all, you need to make sure that you’re running the Windows 10 Insider build 14332 or later. You can verify the version of Windows that you’re running by pressing Windows + R (invokes a Run prompt), and type winver. To actually install Ubuntu on Windows 10, all you need to do is fire up an administrative PowerShell session and run the following command: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux. After this installation completes, you’ll need to restart your computer.

Install Windows 10 Ubuntu Linux

Launching Bash

After restarting your computer, to launch the Bash shell, simply right-click the Start Menu and choose Run, and the type bash and hit Enter. You’ll be presented with a native Bash shell running on Linux. One of the first things you’ll need to do, after launching the Bash shell, is to set a root password for the Linux environment. This password is completely separate from the password or PIN that you use to login to Windows 10, so make sure that you remember it! Any time that you use the sudo command to elevate your environment, you’ll need to make sure that you type the root password for the Ubuntu Linux environment.

Using Bash

Now that you’ve got Bash installed and launched on your Windows 10 computer, you can start installing Ubuntu software packages using the apt package manager. For example, to install Git, simply run sudo apt update (this updates your package cache), followed by sudo apt install git. You can navigate the filesystem using common Linux utilities, including: cd, ls, mkdir, and so on.

Go explore, get used to Bash scripting, Python scripting, and everything else that Linux has to offer! Maybe you install Apache or NGINX and host a website from the Ubuntu environment. Whatever you do, keep in mind that this is early release software, so the bugs haven’t all been worked out just yet. The choice on what to do next is yours!

 

Leave a Reply

Your email address will not be published. Required fields are marked *