Open In App

How to run Linux Commands on Windows 10?

Last Updated : 29 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

It is a dilemma when you want to switch from one operating system to another. This is a common case when you switch from Windows to Linux. Either you store your data and then uninstall Windows to install Linux and then transfer your data or you can have a dual boot system where you encounter an option as to which OS to choose in the beginning. Don’t you think that both methods require a lot of work? No worries! What if you practice Linux commands on Windows itself? Yes, it will save a lot of work! Here are some ways to run Linux commands on Windows. 

Windows Subsystem for Linux(WSL)

Step 1: Go to Update and Security in Settings. 

Step 2: Go to the Developer’s Mode and Select the Developer’s Mode option.  


Step 3: Open the Control Panel.  

Step 4: Click Programs and Features. 
 

Step 5: Click Turn Windows Features On or Off. 

Step 6: Enable the Windows Subsystem for Linux Option in the List. Click OK. Click Restart Now to Reboot your Computer.  

Step 7: Click the Start button (or press the Windows key), type bash, and press Enter.  

Note: There are two problems that you might face after this step:  

1. If you are seeing a message like: 

“Windows Subsystem for Linux has no installed distributions. Distributions can be installed by visiting the Microsoft Store: https://aka.ms/wslstore 
Press any key to continue…” 
 

Then open command prompt and type “lxrun /install“. This will install Ubuntu on Windows. 

Accept the terms after which Ubuntu bash will be downloaded from Windows store 

2. If the bash is not opening or above solution not working then you can open Microsoft Store. Download and Install Ubuntu. Or click here to download and install the Ubuntu for Developer Tools Utilities.

Step 8: Create user Account and Password to use bash. Again click the Start button (or press the Windows key), type bash, and press Enter.  

Linux-on-Windows

 


Similar Reads

Ways to Re-run Last Executed Commands in Linux
It would be quite efficient to re-execute the last command. If the command was quite big to type in again, this would be quite a great trick to improve efficiency. So let us see what the commands are to run the last executed command again in the Linux terminal. The ways to run the last executed command are as follows: Ctrl + PUp Arrow key.bang-bang
4 min read
How to Run Multiple Commands on Multiple Linux Servers
In this article, we'll learn how to run multiple commands on multiple Linux servers. It was a manual task completed by System Administrators. Let's say, they made some changes to a server and if they need to make the same changes to many servers they would need to log into each server and repeatedly make changes to each of them. But we can run mult
3 min read
Using the eval command in Linux to run variables as commands
In Linux, the eval command serves as a powerful tool, enabling users to execute commands stored within variables. This functionality proves particularly useful for scripting and automation, allowing dynamic generation and execution of commands during runtime. By employing, users can manipulate and run strings as if they were direct commands, offeri
4 min read
Linux vs Windows Commands
Most of us think that Linux has terminal and we can use a command-line interface only in Linux but it is just a myth. There is a PowerShell and a command prompt in windows as well where we may execute the commands easily. But Windows and Linux have commands with the same name as well. .linux-vs-windows-table { border-collapse: collapse; width: 100%
2 min read
How to Use Linux Commands in Windows with Cygwin
Cygwin is a collection of tools that provide a Linux Operating System's terminal look, feel, and some of its basic functionality for users of Windows OS who want to have a go over the basic commands of Linux without worrying about installing a Linux OS. To use this tool, first of all, we need to download Cygwin setup depending on the version of Win
3 min read
Basic CentOS Linux Commands in linux
CentOS is a free and open-source operating system that aims to provide a stable reliable, and community-supported platform for servers and other enterprise applications. In this article, we will be covering CentOS Linux basics commands and functions of CentOS and also we will look into the advanced commands. These CentOS commands allow you to manag
4 min read
How to run Linux GUI apps on Windows with WSLg?
In this article, we will see how you can install your favorite Linux GUI application on your Windows PC/Laptop. For this, we will use WSLg. WSLg which stands for Windows Subsystem for Linux GUI is an open-source project that enables the support for running Linux GUI applications on Windows in a fully integrated desktop experience. WSLg offers a sea
2 min read
How to Run Linux Software on Windows
Although Windows users could also wish to run Linux software, Linux users frequently desire to run Windows applications on Linux. You can use Linux applications without leaving Windows, whether you're searching for an improved development environment or strong command-line tools. There are several alternatives to purchasing a new laptop to run the
5 min read
How to Run Multiple Virtual Machines Windows and Linux Inside VirtualBox?
Virtual Machines are the software applications/files which emulate the physical computers. This process of emulating a physical computer and making able to run instances of it on a single physical machine is called Virtualization. A Virtual Machine (VM) allows us to run multiple or different Operating systems on a single physical machine and share
11 min read
Run commands as root with sudo
Introduction - Linux follows the very tough permission model. A root user can do anything but normal user has no permissions. To run any command, they need to ask for permissions from the superuser. The easy and common way to grant administrative privileges to non-root users is, a user can use su command and temporarily become the root but users mu
3 min read
Article Tags :
Practice Tags :