How to Use Linux Bash Shell on Windows 10

It is possible to install and use the Linux Bash shell on your Windows 10 PC. This is a Linux subsystem that runs on your PC without Install Linux on a virtual machine

This Linux Bash shell on Windows 10 allows you to run various Linux commands and apps (not the graphical ones) on your Windows PC. You also have the option to install your favorite Linux distribution, including Ubuntu.

In this guide, we will focus on installing Linux’s Ubuntu distribution on Windows 10.

Step 1: Enable Linux in Windows Features

The first step you need to do is to enable and install Windows Subsystem for Linux on your Windows 10 PC. You can do this from the Windows Features panel.

This option only works for the 64-bit versions of Windows 10. Please check which bit version your PC is running before proceeding.

If your PC is running the 64-bit version of Windows 10, follow these steps:

  1. Open the Control Panel on your PC.
  2. Select Programs in the main Control Panel window.
  1. On the next screen, select Enable or disable Windows features of the Programs and Features section.
  1. In the Windows applications window that opens, scroll down and enable the Windows Subsystem for Linux choice.
  2. Select Okay at the bottom of the window to save your changes.
  1. Windows will prompt you to restart your computer for the changes to take effect. Select Restart now to restart your PC.

Step 2: Download and install a Linux distribution on your PC

Now that the Windows Subsystem for Linux is installed, download your favorite Linux distribution and install it on your PC. You can install more than one Linux distribution available in the Microsoft Store.

We will install the Ubuntu distro in the following steps.

  1. When your PC boots up again after the last step in the section above, open the Get started menu, search for Microsoft Storeand select Microsoft Store in the search results.
  1. In the Storeselect To search in the top right corner and type Ubuntu† You can enter a different Linux distro name here if you like.
  2. Select Ubuntu in the search results.
  1. On the Ubuntu app screen, select to install to install this Linux distribution on your PC. Windows will install this distro as if you were installing any other Store app.
  1. Close Microsoft Store when Ubuntu is installed.

Step 3: Configure the Linux Bash Shell on Windows 10

The Linux Bash shell is now installed on your PC and you are ready to use it.

When you run the shell for the first time, you are prompted to configure a few options. Here’s how to start and configure the shell:

  1. Open the Get started menu, search for Ubuntuand select Ubuntu in the search results.
  1. When Ubuntu opens, it will automatically start configuring some of its options. Wait for this to finish.
  2. When you see the Enter a new UNIX username prompt, type the username you want to use with the Bash shell. This username may be different from the username you use with your Windows user account. Then press Enter
  1. Ubuntu will then ask you to create a password for the shell. Type a password and press Enter
  1. Retype the password and press Enter
  2. The window will display several messages. At the bottom of these messages you will see the username you just created and the name of your PC.
  1. You can now start running Linux commands on your PC.

Step 4: Start Using Linux Bash Shell Commands on Windows 10

The Linux Bash shell is now fully configured and you can run your commands in it. If you’re not sure which commands to start with, the following will give you some ideas.

Note that any command that starts with sudo requires you to enter the password you created in the section above. This is because these commands require administrator privileges to run.

1. Update Package List

Assignment: sudo apt-get update

This command will update the list of packages for your particular Linux distribution. Keep in mind that this command doesn’t actually install updates; it only updates the list.

2. Install software updates

Assignment: sudo apt-get upgrade

Use this command to get updates for the apps installed on your Linux distribution.

3. Install a new program

Assignment: sudo apt-get install PackageName

This command will help you install a program on your Linux distribution. To replace Packaging Name in the command with the name of the program you want to install.

For example to install Darewould you use the following command:

sudo apt-get install audacity

4. Uninstall an installed program

Assignment: sudo apt-get remove package name

Use this command to remove a program from your Linux distribution: Packaging Name with the name of the program you want to remove.

5. Edit a text file

Assignment: nano Filename.txt

This command will open Ubuntu’s built-in text editor so that you can edit the specified file. Make sure to replace file name with the actual name of the file you want to edit.

6. List the contents of a directory

Assignment: ls (that’s a small L)

Use this command to list the contents of your current workbook.

7. Change the current folder

Assignment: cd path

To change your current working directory, run this command instead: Path with the full path to the directory you want to create your new working directory from.

8. Download files from the Internet

Assignment: wget URL

This command allows you to download files from the Internet to your computer. Simply replace the URL in the command with the web address of the file you want to download.

9. Clear the terminal screen

Assignment: Transparent

This command will clear everything in your Terminal window and start typing commands from scratch. Use this when your Terminal screen is too cluttered.

10. Close the terminal

Assignment: Exit

This command closes the Terminal window. Use this when you are done with your assignments.

And those are some of the essential commands you need to learn to get started with the Linux Bash shell on your Windows 10 PC. We hope this guide gets you started.

Leave a Reply

Your email address will not be published.