Linux Tactic

Get the Best of Both Worlds: Run Ubuntu on Windows 10 with WSL

Are you tired of switching between Windows and Linux operating systems on your computer? Well, look no further than the Windows Subsystem for Linux (WSL)! This innovative feature allows you to run Linux commands and applications directly on your Windows 10 computer without the need for a virtual machine or dual-boot setup.

In this article, we will guide you through the steps to enable WSL on Windows 10 and configure Ubuntu on it.

Enabling WSL on Windows 10

Before we can start using WSL, we need to enable it on Windows 10. To do this:

1.

Navigate to ‘Settings’ by clicking the Windows icon in the lower-left corner of your screen. 2.

Click on ‘Apps and Features.’

3. Select ‘Programs and Features’ on the right-hand side of the window.

4. Scroll down and click on ‘Turn Windows features on or off.’

5.

Locate ‘Windows Subsystem for Linux’ from the list of features and ensure that it is checked. 6.

Click ‘OK’ and let Windows complete the installation process. 7.

Restart your computer to apply the changes. Congratulations! You have now enabled WSL on your Windows 10 computer.

Installing Ubuntu on Windows 10 WSL

Now that WSL is enabled, we can install Ubuntu from the Microsoft Store. To do this:

1.

Open the Microsoft Store from the start menu or taskbar. 2.

Search for ‘Ubuntu’ in the store’s search bar. 3.

Choose either the Ubuntu 16.04 LTS or Ubuntu 18.04 LTS version (depending on your preference) and click on it. 4.

Click ‘Get’ to begin the installation process. 5.

Once the installation is complete, click on ‘Launch’ to open the terminal. Congratulations! You have now installed Ubuntu on your Windows 10 computer through WSL.

Configuring Ubuntu on Windows 10 WSL

Upon launching Ubuntu, you will be prompted to create a user account and password. To do this:

1.

Type in a username of your choice. 2.

Enter a secure password when prompted. 3.

Confirm your password by entering it a second time. 4.

Press ‘Enter’ to complete the user creation process. Congratulations! You have now set up your user account on Ubuntu within WSL.

Running Ubuntu Commands on Windows 10 WSL

Now that Ubuntu has been installed and configured on WSL, we can test it out by running some basic Linux commands. Here are some examples:

1.

To check which version of Ubuntu you are running, type ‘lsb_release -a’ into the terminal and press ‘Enter’. 2.

To open up the Linux bash shell from within Ubuntu, simply type ‘bash’ into the terminal and press ‘Enter’. 3.

To exit the Linux bash shell and return to the Windows command prompt, type ‘exit’ into the terminal and press ‘Enter’. 4.

To check how much free memory is available on your system, type ‘free’ into the terminal and press ‘Enter’. Congratulations! You have now successfully run Linux commands and applications on your Windows 10 computer through WSL.

Conclusion

In conclusion, WSL is an excellent feature that allows you to run Linux commands and applications directly on your Windows 10 computer. By following the steps outlined in this article, you can now enable WSL, install and configure Ubuntu, and start running Linux commands and applications on your Windows computer.

So why not give it a try and experience the best of both worlds today!

So you have successfully enabled WSL on your Windows 10 computer, installed and configured Ubuntu via the Microsoft Store, and even run some basic Linux commands. What’s next?

Installing Ubuntu packages!

Ubuntu comes with a vast repository of packages that can be installed through various APT (Advanced Package Tool) commands. APT is a command-line tool for managing packages in Ubuntu, and it allows you to easily search for and install packages from the official Ubuntu repositories.

Installing Ubuntu packages on Windows 10 WSL

To install packages on WSL, you’ll need to use either Apt or Apt-Get commands in the Ubuntu terminal. Here’s how:

1.

Open the Ubuntu terminal in WSL. 2.

Update the package list by running the command ‘sudo apt update’. 3.

Use the Apt command to search for a package by running the command ‘apt search package-name’. 4.

Once you have found the package you want to install, use the following command to install it: ‘sudo apt install package-name’

For example, if you want to install the ‘htop’ package, which is a process monitoring and resource usage tool for Linux, you would enter the following command into the terminal:

“`

sudo apt install htop

“`

That’s it! The package will be downloaded and installed, and you can start using it right away.

Example of installing and running a package on Windows 10 WSL

Let’s say you have successfully installed the ‘htop’ package on your Ubuntu system within WSL. Here’s how you can start using it:

1.

Open the Ubuntu terminal in WSL. 2.

Type in the command ‘htop’ and press ‘Enter’. 3.

The htop dashboard will now appear, displaying a list of the processes running on your computer, along with their CPU and memory usage. By default, htop sorts the process list by CPU usage, but you can sort it by other criteria by pressing ‘F6’.

You can also kill a process by selecting it and pressing ‘F9’, or change the update interval by pressing ‘F2’. And that’s it! You have now successfully installed the htop package and are using it on your Windows 10 computer through WSL.

In conclusion, installing Ubuntu packages on Windows 10 WSL is a simple process that can provide you with even more functionality and flexibility when using Ubuntu within a Windows environment. By using APT or Apt-Get commands in the Ubuntu terminal, you can easily search for, install and manage packages from the vast Ubuntu package repository.

Whether you’re a Linux power user or just getting started with Ubuntu, WSL is an excellent tool that can take your computing experience to the next level. In this article, we have explored the process of installing and running Ubuntu on Windows 10 WSL.

We began by enabling WSL and installing Ubuntu from the Microsoft Store, followed by configuring Ubuntu and running basic Linux commands. We then discussed the process of installing Ubuntu packages using the Apt or Apt-Get commands and provided an example of installing and running the ‘htop’ package.

By using Ubuntu on Windows 10 WSL, you can access the vast Ubuntu package repository and enhance your computing experience. Whether you’re a Linux power user or just getting started with Ubuntu, WSL is an excellent tool that can take your computing experience to the next level.

Popular Posts