There is no doubt, Linux is one of the most powerful operating systems, which comes with a great comment line or Terminal, and it is more powerful than the GUI itself. But despite the power of Linux, the popularity and market share of Windows is always at the top, at least for personal and office computers. But most enterprise users use Linux, as it is open source. Most of the machines, which are run on Azure Cloud use Linux, and it is enough to make Microsoft understand its position in the enterprise market. To integrate the power of Linux within Windows, Microsoft has brought the native support for Bash on Windows 10, which can help the Windows 10 users execute a number of common line tasks from Windows itself. Yes, it is pretty cool.
But Microsoft was sure, most people will not need the Bash shell, and thus, it is not available to all the users, by default. Yes, you got it right. Most people who do everyday tasks on the computer, or use a computer for the purpose of gaming and entertainment will hardly use Bash shell. Even you can use Bash for Windows 7 with a different piece of software, but on Windows 10, you will not need any third-party software, as a Windows bash commands can easily be executed from the Windows Command Prompt. Without discussing further, let’s find out how to get bash on Windows 10, with some simple steps, which are yet easy to execute.
How to Install Bash on Windows 10 to Run Ubuntu Linux
The steps to install Bash
There is no requirement of Bash download, to run Ubuntu in Windows 10, as it is already present. Though, some downloads will be necessary later on.
Step 2: Click on ‘Update & Security’.
Step 4: Developers option
On the left side, you can find the option saying ‘For developers’. Click on that.
Step 5: Developer Mode
Check the option saying ‘Developer mode’. You will get a message. Just hit the ‘OK’ button to continue.
Now it the time to close the ‘Settings’ app, and open ‘Control Panel’. On Windows 10, you can hit the ‘Start’ button, type ‘cpl’, and hit the enter key, to open the Control Panel.
Step 6: Programs and Features
Now open ‘Programs and Features’, and on the left panel, you can find an option saying ‘Turn Windows features on or off’.
Step 7: Windows Subsystem for Linux
You will have to scroll down a little bit unless you find the option saying ‘Windows Subsystem for Linux’. Just mark it, and hit the OK button. The installation of the components will start and will take some time.
Once the installation is complete, you will be asked to restart your computer. Just hit the ‘Restart now’ to restart the computer right now, or hit ‘Don’t restart’, if you want to restart it later on.
After the computer restarts, which might take some time, as it will install the updates, go to ‘Microsoft Store’, and search for your preferred distribution of Linux. Ubuntu being my favorite, I will use Bash to run Ubuntu on Windows 10. You can even install Linux on Windows 10 with other distributions like OpenSUSE, Debian, Kali Linux, and many others.
I don’t think, I will have to elaborate the process of installing an app from the Windows Store. Thus, once the installation is complete, you will have to launch the Linux app, which will be Ubuntu for me. In the image below, you can even find a number of other Linux distributions, which can be used with the aid of Bash. You can even use other distributions if you need.
Initializing Ubuntu Command Line for Windows 10 using Bash
On starting, you will get the following screen. The installation will take a few seconds, or even minutes, depending on your system.
Now you will have to enter a new username, which is ‘sarbasish’ for my case. After that, hit the enter key, and enter your desired password. After that, you will get the following prompt, and once you get that, the installation is complete. (In the case of entering the username and the password, you do not necessarily need to enter the same username and password, which is associated with your Windows computer).
Linux Terminal commands execution on Windows 10
Now all the Linux Terminal commands can be executed on Windows 10.
You can even get the same user interface by searching for Bash on ‘Start’.
Some basic tips for Bash on Windows 10
The installation is complete. Now, let’s find out some basic tips, which can be helpful for you at the time of using Windows subsystem for Linux, using Bash.
Once you open Bash, you will be in the default directory, which is ‘/mnt/c/Windows/System32’. Here the directory ‘c’ refers to the C drive, and you can find all the other drives, in the directory ‘/mnt/’.
If some of your commands do not work for you, or some packages can’t be installed, just type ‘sudo apt-get update’, and that will solve the issue in most of the cases. Windows bash packages can be updated with the command, which can be helpful for you.
With the help of Windows 10 Linux subsystem, with the help of Bash, you can get to use all the Linux and Unix commands, and that too on the Windows environment. The Linux subsystems for Windows with Bash is almost the complete Linux, with the absence of the Linux kernel, which is pretty obvious. If you are a developer, the Windows 10 Bash is really going to help you to make your job simpler. The option to install Ubuntu for Windows 10 using virtual machine platforms is always available and always have the option to use that, if the Bash is not working out for you, according to your expectations. If you want to know, how to use Bash on Windows, that is not at all difficult. Just follow the steps above to install Bash, and just use the Linux commands to start using Bash.
Hope, the way to install and use Bash on Windows 10, to use Linux on Windows, was helpful for you. Let me know in the comment section below if you faced any kinds of troubles.
- How to Install Ubuntu on Windows 10 using Virtualbox Virtual Machine
- Tutorial on how to install XAMPP on Windows and Linux to use Marina DB, Perl, and PHP on a localhost
- Install WAMP server for windows 10: Step by Step Tutorial Guide
- Way to Install Java in Ubuntu / Linux mint using Terminal
- Enable Native Windows 10 OpenSSH Client Beta Support