It’s 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 installing linux on a virtual machine.
With this linux bash shell on windows 10, you can run various linux commands and apps ( not the graphical ones ) on your windows pc. Also, you have the option to install your favorite linux distribution, including ubuntu.
In this guide, we’ll focus on installing Linux’s Ubuntu distribution on Windows 10.
- 1 Step 1: Enable Linux in Windows Features
- 2 Step 2: Download and Install a Linux Distribution on Your PC
- 3 Step 3: Configure the Linux Bash Shell on Windows 10
- 4 Step 4: Start Using Linux Bash Shell Commands on Windows 10
- 4.0.1 1. Update Package List
- 4.0.2 2. Install Software Updates
- 4.0.3 3. Install a New Program
- 4.0.4 4. Remove an Installed Program
- 4.0.5 5. Edit a Text File
- 4.0.6 6. List the Contents of a Directory
- 4.0.7 7. Change the Current Directory
- 4.0.8 8. Download Files From the Internet
- 4.0.9 9. Clear the Terminal Screen
- 4.0.10 10. Quit the Terminal
Step 1: Enable Linux in Windows Features
The first step to perform 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. Check what bit version your PC runs before you proceed.
If your PC runs the 64-bit version of Windows 10, follow these steps:
- Open Control Panel on your PC.
- Select Programs on the main Control Panel window.
- On the following screen, select Turn Windows features on or off from the Programs and Features section.
- In the Windows Features window that opens, scroll down and enable the Windows Subsystem for Linux option.
- Select OK at the bottom of the window to save your changes.
- Windows will ask you to reboot your computer to bring changes into effect. Select Restart now to reboot your PC.
Step 2: Download and Install a Linux Distribution on Your PC
Now that Windows Subsystem for Linux is installed, download your favorite Linux distribution and install it on your PC. You can install more than one Linux distro available on the Microsoft Store.
We’ll install the Ubuntu distro in the following steps.
- When your PC boots back up after the last step in the above section, open the Start menu, search for Microsoft Store, and select Microsoft Store in the search results.
- In the Store, select Search at the top-right corner and type Ubuntu. You may enter any other Linux distro name here if you want.
- Select Ubuntu in the search results.
- On Ubuntu’s app screen, select Install to install this Linux distribution on your PC. Windows will install this distro as if you’re installing any other Store app.
- 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’re ready to start using it.
When you run the shell for the first time, it’ll ask you to configure a few options. Here’s how to launch and configure the shell:
- Open the Start menu, search for Ubuntu, and select Ubuntu in the search results.
- When Ubuntu opens, it’ll start configuring some of its options automatically. Wait for this to finish.
- When you see the Enter new UNIX username prompt, type the username you’d like to use with the Bash shell. This username can be different from the one you use with your Windows user account. Then, press Enter.
- Ubuntu then asks you to create a password for the shell. Type a password and press Enter.
- Type the password again and press Enter.
- The window will display various messages. At the bottom of these messages, you’ll see the username you just created and your PC’s name.
- 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 start running your commands in it. If you aren’t sure what commands to start with, the following will give you some ideas.
Note that each command that starts with sudo will require you to enter the password you created in the above section. This is because these commands need admin privileges to run.
1. Update Package List
Command: sudo apt-get update
This command updates the packages list for your specific Linux distribution. Keep in mind that this command doesn’t actually install any updates; it only updates the list.
2. Install Software Updates
Command: sudo apt-get upgrade
Use this command to get updates for the apps installed on your Linux distribution.
3. Install a New Program
Command: sudo apt-get install PackageName
This command helps you install a program on your Linux distribution. Replace PackageName in the command with the name of the program you want to install.
For example, to install Audacity, you’d use the following command:
sudo apt-get install audacity
4. Remove an Installed Program
Command: sudo apt-get remove PackageName
To get rid of a program from your Linux distribution, use this command replacing PackageName with the name of the program you want to remove.
5. Edit a Text File
Command: nano FileName.txt
This command opens Ubuntu’s built-in text editor to let you edit the specified file. Make sure to replace FileName with the actual name of the file you want to edit.
6. List the Contents of a Directory
Command: ls (that’s a small L)
Use this command to display the contents of your current working directory.
7. Change the Current Directory
Command: cd Path
To change your current working directory, run this command replacing Path with the full path to the directory you want to make your new working directory.
8. Download Files From the Internet
Command: wget URL
You can download files from the internet to your computer with this command. Simply replace the URL in the command with the web address of the file you wish to download.
9. Clear the Terminal Screen
This command clears everything in your Terminal window and lets you start typing commands from scratch. Use this when your Terminal screen is too cluttered.
10. Quit the Terminal
This command closes the terminal window. Use this when you’ve finished working with your commands.
And those are some of the essential commands you should learn to get started with the linux bash shell on your windows 10 pc. We hope this guide helps you out.