Ever wanted to use Linux commands but stuck with your Windows OS? Not to worry. There are several ways that you can use Linux commands on your Windows without even needing to install Linux. In this article, we will show you a couple of ways you can go about this. So, let’s dive in.
1. Windows Subsystem for Linux (WSL)
The Windows Subsystem for Linux, or WSL for short, is an official Windows tool that allows you to run a full-fledged Linux environment directly on Windows, without the overhead of a virtual machine. You can choose your preferred Linux distro from the Microsoft Store.
To enable WSL, follow these steps:
1. Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
2. Enable ‘Virtual Machine Platform’ optional component:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
3. Restart your machine.
After restarting, the next step is to install a Linux distribution from the Microsoft Store. You can choose from popular distros such as Ubuntu, openSUSE and more.
Cygwin is a free and open-source software that provides a Unix-like environment and software toolset to users of any modern x86 32-bit and 64-bit versions of Microsoft Windows. It allows you to use most of the Linux commands right inside your Windows system.
Download the setup file from the official Cygwin website, run the installer, select the packages you want, and you’re good to go.
3. Git Bash
Git Bash is an application for Microsoft Windows environments which provides a bash emulation used to run Git from the command line. Like Cygwin, it also allows you to use most of the Linux commands.
To install Git Bash, download the latest Git for Windows installer from the official Git SCM website and follow the installation steps.
Using Linux commands on Windows is not as difficult as it might seem. Whether you prefer the official way via WSL, or third-party solutions like Cygwin or Git Bash, you have multiple options at your disposal. So go ahead and explore the power of Linux without leaving your Windows comfort zone!