Bringing Unix commands to a Windows world

You can make your life a little easier and more productive by adding some Unix power to your Windows system.


For a fairly extensive collection of Unix tools -- including most of the essentials like less, tail, awk and grep, mv, dd, bzip2 and bunzip2 -- on your Windows box, install cygwin. Cygwin is a collection of tools that provide Unix commands on a Windows system. These commands can be as useful on the Windows command line (i.e., within the command prompt window) or within scripts (e.g., .bat files) as they are on Unix.

To get cygwin, browse your way over to You will find a setup.exe file that you can download and run. If you don't have administrator access on your Windows system, try renaming the setup.exe file to cygwin.exe or something like that before
double clicking on it. That might get you around any installation problems.

Clicking on the setup.exe (or cygwin.exe) file will open a GUI that allows you to look through a list of the tools that will be installed by default. Click on the + sign to the left of a software category to list its contents. You will then see version numbers next to the tools that will are to be installed. Click on the "Skip" marker if you want to add a tool to the installation rather than have it skipped.

          Skip      n/a   n/a   418k  gcc-tools.epoch1-automake (gcc-special) a tool for ...
          Skip      n/a   n/a   578k  gcc-tools-epoch2-automake (gcc-special) a tool for ...

Once the installation is complete, open a cygwin terminal by clicking on the link added to your desktop or the item (Cygwin Terminal) in our start menu. You should find
yourself sitting in your home directory (e.g., /home/myself) and if you type pwd, it will tell you just that. Try some Unix commands such as date, ls -la and man bash. Go ahead and cd .. and ls /usr. How about cat /etc/passwd? You might even start thinking you're working on a Unix system -- at least until you come across a command that's missing -- like clear (although there are other ways to accomplish the same thing).

Go ahead and cd over to /usr/bin and try ls and ls | wc -l commands. You're going to see a lot of files, some with .exe extensions, some without.

Join us:






Operating SystemsWhite Papers & Webcasts

See more White Papers | Webcasts

Answers - Powered by ITworld

Ask a Question