How to Use Linux Bash Shell on Windows 10
Commands for use with Ubuntu distribution
It’s possible to install and use the LinuxBash shellon your Windows 10 PC. This is a Linux subsystem that runs on your PC withoutinstalling 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.
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. Checkwhat bit version your PC runsbefore you proceed.
If your PC runs the 64-bit version of Windows 10, follow these steps:
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.
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:
Step 4: Start Using Linux Bash Shell Commands on Windows 10
The Linux Bash shell is now fully configured, and you canstart running your commandsin it. If you aren’t sure what commands to start with, the following will give you some ideas.
Note that each command that starts withsudowill require you to enter the passwordyou created in the above section. This is because these commands need admin privileges to run.
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.
Command:sudo apt-get upgrade
Use this command to get updates for the apps installed on your Linux distribution.
Command:sudo apt-get install PackageName
This command helps youinstall a program on your Linuxdistribution. ReplacePackageNamein the command with the name of the program you want to install.
For example, to installAudacity, you’d use the following command:
sudo apt-get install audacity
Command:sudo apt-get remove PackageName
To get rid of a program from your Linux distribution, use this command replacingPackageNamewith the name of the program you want to remove.
Command:nano FileName.txt
This command opens Ubuntu’s built-in text editor to let you edit the specified file. Make sure to replaceFileNamewith the actual name of the file you want to edit.
Command:ls(that’s a small L)
Use this command to display the contents of your current working directory.
Command:cd Path
To change your current working directory, run this command replacingPathwith the full path to the directory you want to make your new working directory.
Command:wget URL
You can download files from the internet to your computer with this command. Simply replace theURLin the command with the web address of the file you wish to download.
Command:clear
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.
Command:exit
This command closes the Terminal window. Use this when you’ve finished working with your commands.
And those are some of the essentialcommands you should learnto get started with the Linux Bash shell on your Windows 10 PC. We hope this guide helps you out.
Mahesh has been obsessed with technology since he got his first gadget a decade or so ago. Over the last few years, he’s written a number of tech articles on various online publications including but not limited to MakeTechEasier and Android AppStorm.Read Mahesh’s Full Bio
Welcome to Help Desk Geek- a blog full of tech tips from trusted tech experts. We have thousands of articles and guides to help you troubleshoot any issue. Our articles have been read over 150 million times since we launched in 2008.
HomeAbout UsEditorial StandardsContact UsTerms of Use
Copyright © 2008-2024 Help Desk Geek.com, LLC All Rights Reserved