---
title: "Use ‘Unix’ Commands on Windows – UnxUtils"
date: 2011-12-10
author: "Rajesh Namase"
featured_image: "https://www.techlila.com/wp-content/uploads/windows-command-prompt.jpg"
categories:
  - name: "Windows"
    url: "/topics/computer/windows.md"
---

# Use ‘Unix’ Commands on Windows – UnxUtils

Many people use both operating systems – Linux and Windows in their daily life. If you are one of those people who often keep switching between different operating systems in their work environment, you may have encountered scenarios when you have run Linux commands, such as ‘ls’ and ‘cd’ while working on the Windows command line. This can often happen with people who spend most of their time in server environments (typically ‘Unix’), and switch to the Windows environment (‘non Unix’), once in a while.

In such cases, the message *‘ls (or any Unix or Linux command that you entered on a Windows command prompt) is not recognized as an internal or external command, operable program or batch file.’* gets displayed at the command line as soon as you run a Linux command.

![Windows Command Prompt](https://www.techlila.com/wp-content/uploads/windows-command-prompt.jpg "windows-command-prompt")

Now, here is an easy tip to work around this. There is a utility called **‘\*UnxUtils\*’** (Read as ‘Unix Utils’), which is a Windows compatible utility or library of commands used ‘Unix’ commands.

**Note:** Remember, the utility does not have all Windows-Linux compatibility commands, but only the most commonly used ones.

You can download binary file from one of the following links:

- <a rel="noopener" target="_blank href=">http://unxutils.sourceforge.net/</a>
- [http://www.weihenstephan.de/~syring/win32/UnxUtils.zip](http://www.weihenstephan.de/~syring/win32/UnxUtils.zip "Download UnxUtils")

It contains *GNU utilities* for Win 32, which is dependent on the **‘msvcrt.dll’** file in the Windows Operating System.

Download the binary (‘.zip’) file and extract it on your computer. For example, ‘C:\\UnxUtils’ indicates that the file is saved in the ‘C:’ drive.

Now, add the environment variable in the User variables:  
**Variable name:** Path  
**Variable value:** C:\\unxutils\\bin\\;C:\\unxutils\\usr\\local\\wbin\\

[![Environment Variables](https://www.techlila.com/wp-content/uploads/environment-variables.jpg "environment-variables")](https://www.techlila.com/wp-content/uploads/environment-variables.jpg)

If you don’t know how to change environment variable then read this tutorial. You can then open a new command prompt and type cd, ls, pwd, cat, or any of your favorite ‘Unix’ command. You can even run shell scripts.

[![Use Unix Commands on Windows](https://www.techlila.com/wp-content/uploads/use-unix-commands-on-windows.jpg "use-unix-commands-on-windows")](https://www.techlila.com/wp-content/uploads/use-unix-commands-on-windows.jpg)

**Note:** If you already had a Command Line window opened then close it and open it again, as the PATH changes doesn’t apply to already running applications. If you want to use which command then add the windows extension .exe in its argument. For example, which which.exe.

Checkout this [Wikipedia page](http://en.wikipedia.org/wiki/UnxUtils "Unx Utils") for **list of commands** available through ‘UnxUtils’ in Windows. List is limited to commands included in C:\\unxutils\\usr\\local\\wbin\\.

**Additional Tools:** Install **Emacs** and/or **MinGW** to get a more UNIX-like development environment on your Windows operating system.