One of the biggest problems I have when switching back and forth between Linux and Windows is the command line. I hate the way the Windows command line is set up; there is no global PATH to set, the command syntax is foreign, and numerous commands that I depend upon daily that are missing.
That's why I was so happy to come across Gnu On Windows (Gow). This incredibly handy tool will make the Linux admin (or anyone who is more comfortable on the Linux/UNIX command line) feel a bit more at home on the Windows command. But even better is that Gow expands the Windows command line with nearly 130 useful Gnu commands.
These are just a fraction of the commands that come with Gow upon installation:
- Shell scripting: bash, zsh
- Compression: gzip, zip, bzip2, compress
- SSH: putty, psftp, pscp, pageant, plink
- Download/upload: cURL, wget
- FTP: NcFTP
- Editing: vim
- Text search/view: grep, agrep, less, cat, tail, head
- File system: mv, cp, du, ls, pwd, rmdir, whereis
- Development: make, diff, diff3, sleep, cvs, dos2unix, unix2dos
To install Gow, you simply download the latest version and run the installation binary. When the installation is complete, in the Start | Gow menu, you'll find a Readme file, an Uninstall executable, and a folder containing the licensing information. You won't find an executable for any of the tools installed by Gow because the applications installed are part of the Gnu Utilities, so these are command line only tools.
But certainly one would have to figure out a way to set a $PATH directive so the commands are global, right? Wrong. The installation takes care of this for you. One thing I like about the Linux/UNIX command line is that the thousands of core commands are global, so they can be run from within any place in the folder hierarchy.
Testing GowNow that Gow is installed, let's run a test. Open the command prompt (click Start and then enter cmd in the run field) and issue the command gow - -list (no space between the dashes). You will see all of the available commands waiting for your input (Figure A). Figure A
Each command you see is available as a global command.
Running a commandLet's say you want to create a text-based configuration file or edit a file such as the hosts file. There's no need to open Notepad when you have access to vim. To open vim, just issue the command vim, and the text editor will be at your disposal (Figure B). If you want to open a previously created file for editing (say C:\test.txt), the command would be vim C:\test.txt. Make sure you know how to use vim before you plunge into this action, or else you'll drive yourself crazy trying to figure out this incredibly powerful editor. Figure B
That is not a Windows 7 theme on a Linux box, but rather full-blown vim running on Windows 7.
The rest of the commands will vary in their usage. You won't find man pages for the commands (as you would in Linux/UNIX), but you can issue the command like so: command - -help (no spaces between the dashes and where "command" is the actual command you want to run). This command structure will list out the command syntax as well as the options available for the command.
If you're looking for a way to make the Windows command prompt more powerful without spending cash or jumping through too many hoops, the handy Gow application is just what you need. Give it a go, and see if you don't find your Windows machine better suited to your Linux/UNIX admin background.
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.