> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 4 Ways to Run Linux Commands in Windows
- URL: https://itsfoss.com/run-linux-commands-in-windows/
- Published: 2019-05-25T13:00:05.000Z
- Updated: 2023-01-15T05:44:20.000Z
- Description: Want to use Linux commands but don’t want to leave Windows? Here are several ways to run Linux bash commands in Windows.
- Author: Abhishek Prakash
- Tags: List 📋

If you are learning Shell scripting probably as a part of your course curriculum, you need to use Linux commands to practice the commands and scripting.

Your school lab might have Linux installed but you don’t have a [Linux laptop](https://itsfoss.com/get-linux-laptops/) but a regular Windows computer like everyone else. Your homework needs to run Linux commands and you wonder how to run Bash commands and scripts on Windows.

You can [install Linux alongside Windows in dual boot mode](https://itsfoss.com/guide-install-linux-mint-16-dual-boot-windows/). This method allows you to choose either Linux or Windows when you start your computer. But taking all the trouble to mess with partitions for the sole purpose of running Linux commands may not be for everyone.

You can also [use Linux terminals online](https://itsfoss.com/online-linux-terminals/) but your work won’t be saved here.

The good news is that there are several ways you can run Linux commands inside Windows, like any regular application. Isn’t it cool?

## Using Linux commands inside Windows

![Run Linux Commands In Windows](https://itsfoss.com/content/images/wordpress/2019/05/run-linux-commands-in-windows-800x450.png)

As an ardent Linux user and promoter, I would like to see more and more people using ‘real’ Linux but I understand that at times, that’s not the priority. If you are just looking to practice Linux to pass your exams, you can use one method to run Bash commands on Windows.

### 1\. Use Linux Bash Shell on Windows 10 with WSL

Did you know that you can run a Linux distribution inside Windows 10? The [Windows Subsystem for Linux (WSL)](https://itsfoss.com/bash-on-windows/) allows you to run Linux inside Windows. The upcoming version of WSL will be using the real Linux kernel inside Windows.

This WSL, also called Bash on Windows, gives you a Linux distribution in command-line mode running as a regular Windows application. Don’t be scared with the command line mode because your purpose is to run Linux commands. That’s all you need.

![Using Bash on Windows 10](https://itsfoss.com/content/images/wordpress/2016/08/install-ubuntu-windows-10-linux-subsystem-10-800x268.jpeg)

Ubuntu Linux inside Windows

You can find some popular Linux distributions like Ubuntu, Kali Linux, openSUSE etc in Windows Store. You just have to download and install it like any other Windows application. Once installed, you can run all the Linux commands you want.

![Install Windows Subsyetm for Linux](https://itsfoss.com/content/images/wordpress/2016/08/install-ubuntu-windows-10-linux-subsystem-4-800x632.jpeg)

Linux distributions in Windows 10 Store

Please refer to this tutorial about [installing Linux bash shell on Windows](https://itsfoss.com/install-bash-on-windows/).

[How to Install Linux Bash Shell on Windows \[Step-by-Step Guide\]Step-by-step screenshot guide to show you how to install bash on Windows 11 and 10.![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/2023/01/install-bash-in-windows-1.png)](https://itsfoss.com/install-bash-on-windows/)

### 2\. Use Git Bash to run Bash commands on Windows

You probably know what [Git](https://itsfoss.com/basic-git-commands-cheat-sheet/) is. It’s a version control system developed by [Linux creator Linus Torvalds](https://itsfoss.com/linus-torvalds-facts/).

[Git for Windows](https://gitforwindows.org/?ref=itsfoss.com) is a set of tools that allows you to use Git in both command line and graphical interfaces. One of the tools included in Git for Windows is Git Bash.

Git Bash application provides and emulation layer for Git command line. Apart from Git commands, Git Bash also supports many Bash utilities such as ssh, scp, cat, find etc.

![Git Bash](https://itsfoss.com/content/images/wordpress/2019/05/git-bash.png)

Git Bash

In other words, you can run many common Linux/Bash commands using the Git Bash application.

You can install Git Bash in Windows by downloading and installing the Git for Windows tool for free from its website.

[Download Git for Windows](https://gitforwindows.org/?ref=itsfoss.com)

### 3\. Using Linux commands in Windows with Cygwin

If you want to run Linux commands in Windows, Cygwin is a recommended tool. Cygwin was created in 1995 to provide a POSIX-compatible environment that runs natively on Windows. Cygwin is a free and open source software maintained by Red Hat employees and many other volunteers.

For two decades, Windows users use Cygwin for running and practicing Linux/Bash commands. Even I used Cygwin to learn Linux commands more than a decade ago.

![Cygwin Shell](https://itsfoss.com/content/images/wordpress/2019/05/cygwin-shell.jpg)

Cygwin | [Image Credit](http://www.es.ele.tue.nl/education/5JJ55-65/mmips-lab/cygwin.php?ref=itsfoss.com)

You can download Cygwin from its official website below. I also advise you to refer to this [Cygwin cheat sheet](http://www.voxforge.org/home/docs/cygwin-cheat-sheet?ref=itsfoss.com) to get started with it.

[Download Cygwin](https://www.cygwin.com/?ref=itsfoss.com)

### 4\. Use Linux in a virtual machine

Another way is to use virtualization software and install Linux in it. This way, you install a Linux distribution (with a graphical interface) inside Windows and run it like a regular Windows application.

This method requires that your system has a good amount of RAM, at least 4 GB but better if you have over 8 GB of RAM. The good thing here is that you get the real feel of using a desktop Linux. If you like the interface, you may later decide to [switch to Linux](https://itsfoss.com/reasons-switch-linux-windows-xp/) completely.

![Ubuntu Running In Virtual Machine Inside Windows](https://itsfoss.com/content/images/wordpress/2019/05/ubuntu-running-in-virtual-machine-inside-windows-800x450.jpeg)

Ubuntu Running in Virtual Machine Inside Windows

There are two popular tools for creating virtual machines on Windows, Oracle VirtualBox and VMware Workstation Player. You can use either of the two. Personally, I prefer VirtualBox.

You can follow [this tutorial to learn how to install Linux in VirtualBox](https://itsfoss.com/install-linux-in-virtualbox/).

[Install Linux Inside Windows Using VirtualBox \[Step by Step Guide\]Brief: Using Linux in a virtual machine gives you the option to try Linux within Windows. This step-by-step guide shows you how to install Linux inside Windows using VirtualBox. There are several ways to install Linux. You can clean everything from your system and install Linux. You can dual bo…![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/wordpress/2018/03/install-linux-inside-windows-featured.jpg)](https://itsfoss.com/install-linux-in-virtualbox/)

## Conclusion

The best way to run Linux commands is to use Linux. When installing Linux is not an option, these tools allow you to run Linux commands on Windows. Give them a try and see which method is best suited for you.