How to Install Common Unix Command Line Utilities in Windows

When I’m working in Windows I often find it hard to do things at the command line that are so simple to do in Unix/Linux.  Things like searching for a string in a long list of output, or paging through a log file can be difficult.  What if you could add your favorite *nix utilities to windows?  Well the good news is that you can!

Click here to download a pack of many common Unix utilities that have been compiled to run in a native win32 environment.

The pack includes over a hundred binaries, some of my favorites are listed below.

  • grep
  • cat
  • more/less
  • tail/head
  • du

I suggest creating a directory such as c:\bin and extracting the contents of usr/local/wbin (found in the archive you downloaded) into it.  In order to make these utilities readily available you should add c:\bin to your path.

Steps to update your path on Windows 7

  1. Right click on Computer, click on properties.
  2. Click on Advanced system settings
  3. On the Advanced tab click ‘Environment Variables’
  4. Under ‘System variables’ select ‘Path’ and click Edit.
  5. At the end of the path line add a semicolon followed by c:\bin

To verify your new path setting open up a new command prompt and type ‘echo %path%’ You should see c:\bin at the end of the output, make sure there is a semicolon separating it from the previous statement.  You should now be able to run the utilities no matter which directory you are in.

If you know of any useful command line tricks for windows please comment.

Sam Kear

Sam graduated from the University of Missouri - Kansas City with a bachelors degree in Information Technology. Currently he works as a network analyst for an algorithmic trading firm. Sam enjoys the challenge of troubleshooting complex problems and is constantly experimenting with new technologies.

Leave a Reply

Your email address will not be published.