How To Install And Use Ubuntu Terminal In Windows 10

With the Microsoft Windows Subsystem for Linux (WSL), you can directly install and run Linux distros without having to use a virtual machine or dual booting.

This can be convenient when wanting to run native Linux commands directly from Windows. You can also install just the Ubuntu Terminal in Windows 10 due to this feature.

Here is how to install Ubuntu Terminal in Windows 10:

Installing Windows Subsystem for Linux (WSL) :

The first thing to do is install the WSL. Right click on Windows start menu and choose Windows Powershell (Admin) mode.

Next, type the following to get WSL installed :

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

installing WSL through Windows Powershell in admin mode

Installing it will take some time. Once it is complete, restart the PC.

installation of WSL completed in Windows 10

Installing Ubuntu Terminal :

After WSL is installed, installing Ubuntu Terminal is easy. Simply locate it from Microsoft Store and click Get.

Ubuntu Terminal available from Microsoft Store

Note : If you directly try to install it without having the WSL installed first, an error will be displayed indicating that it is not installed.

error when installing Ubuntu Terminal when WSL isn't installed

So install WSL first and then continue with installing Ubuntu Terminal after that. Wait for installation to be over. After it is done, a Unix user account needs to be created.

setting a username and password for Ubuntu Terminal in Windows 10

This can be a different username than your Windows 10 username. Choose and set it as required.

Using Ubuntu Terminal:

The usual Bash shell is the default with all it’s goodness will now be available ready to use.

Bash shell in Windows 10 using Ubuntu Terminal

There are others available too if you need to use them.

list of available shells in Ubuntu Terminal for Windows 10

Command line text editors like nano and vi are available by default. So you can make shell scripts and run them just like in any other native Linux distro.

nano editor in Ubuntu Terminal for Windows 10

You can also run various commands for different uses like rsync over ssh, wget and so on.

Here is a brief primer on commonly used commands in Linux.

uptime command used from Ubuntu Terminal in Windows 10

The disk partitions of Windows 10 can be mounted using the Terminal and accessed too. First list them using the df command :

df command to see disk usage from Ubuntu Terminal in Windows 10

Next, mount the required disk partition by accessing the specific mount point :

accessing Windows 10 disk partitions through Ubuntu Terminal

All done.

Comments are closed.