Linux Tools On Windows? Linux is well known for its powerful command-line utilities–but what isn’t well known is that you can install the same powerful tools on Windows in just minutes.
Linux Tools On Windows–The Official Windows Version
Microsoft has long recognized the value of Linux and Unix–Microsoft was even planning to replace Windows with its own version of Unix, called Xenix, back in the late 1980s. Alas, Microsoft signed a deal with IBM to develop OS/2, parts of which evolved into Windows NT and the current versions of Windows.
After stopping support on Xenix, Microsoft produced an official package called Windows Services for Unix. For Windows Vista and Windows 7, the package was renamed Subsystem for Unix-based Applications (SUA). It includes over 350 Unix applications, plus libraries that allow Windows to talk to Unix.
Unfortunately, two things prevent us from recommending you install SUA today. First, it requires either the Enterprise or Ultimate editions of Windows, so most users can’t use it. Second, many of the Linux utilities it includes are years out of date, depriving users of some of the best features.
Linux Tools on Windows Using Cygwin
Begun in 1995, Cygwin is by far the most popular way to run Linux tools on Windows. Contributing to its popularity is the fact that it’s free and it supports a dizzying array of Linux tools–a full installation of Linux tools can take up over 4 GB of disk space, although you don’t need that much to get started.
The great thing about Cygwin is that it makes all of its tools available to the regular Windows command line, yet if you choose to use one of the Linux command lines, you can still use all of the Windows tools. This means there’s no trade off–you get powerful Linux tools without giving up anything (except a bit of disk space).
Installing Linux Tools on Windows
Installing Cygwin is a breeze. Go to cygwin.com, click the Install Cygwin link, and download and run setup.exe. Cygwin will open a window that lets you choose what you want to install–by default only a minimal set of Linux tools are installed.
After choosing which programs you want to install, Cygwin’s setup.exe will automatically download all the necessary files. This step may take a while, particularly if you have a slow Internet connection or you selected a lot of packages. After downloading all the files, Cygwin will install them and offer to create an icon for you on your desktop and Start menu to launch the Bash shell. I highly suggest you accept, for you can use copies of this launcher to create your own launchers to your favorite Linux tools.
After installation, Cygwin runs a few post-installation scripts. Sometimes these scripts pop up windows which disappear after a moment. Don’t be alarmed–this is a quirk in Windows and you won’t see it again until you upgrade Cygwin.
Using Linux Tools On Windows
After your installation finishes, I suggest you dive right in to Cygwin. Double-click the Bash Shell icon on your desktop, which will open the default Windows terminal and the Linux Bash shell.
A shell, in Linux jargon, is a program which loads other programs. It can also be used to create shell scripts, which are very similar to Windows batch files. Linux shells almost always end with the letters sh (for SHell); there are a number of other shells you can choose from in Cygwin, but Bash is the best for learning about Linux.
After launching Bash, you may discover that it uses different filenames than what you expect. In Windows, all full filenames start with a drive prefix, for example
C:Program Files. In Cygwin applications, all full filenames start with a single forward slash,
/. Unfortunately this means filenames are different in Cygwin and Windows; here’s how to find your files no matter where you are:
- In Windows all of your Cygwin files are in the
C:cygwinfolder. Most files will be in your Cygwin user directory, which is
C:cygwinhome*username*(where username is your Windows username).
- In Cygwin all of your Windows drives can be found in the
/cygdrivefolder. Files in your Documents folder will be in
You can see all of the files in the current directory in Cygwin by typing
ls. You can change directory by typing
cd followed by the directory name you want to move visit. These are the same commands you would type in a Windows command line.
Learning To Use Linux Tools on Windows
Hundreds, maybe thousands, of books have been written about learning Linux, so I don’t expect to teach you everything you want to know about using Linux tools on Windows in this one article. But I can leave you with a few hints on how to find more information:
- Most Linux programs come with a manual page. You can read the manual page by typing
manbefore the name of the program. For example, try running
man bashright now.
- Try doing in Bash anything you would usually do on the Windows command line. In most cases, Windows and Linux use programs with the same names, so switching is easy.
About the author:
David A. Harding is a Linux Professional Institute certified system administrator and freelance writer with over 10 years experience working with Linux. He’s been published in over a dozen magazines and has given over 50 presentations about Linux–including two Software Freedom Day keynotes. Dave always loves to hear from readers and can be reached at firstname.lastname@example.org.
Borrow from your local library a copy of Linux Administration: A Beginner’s Guide (Fifth Edition) by Wale Soyinka. The book focuses on teaching Linux to experienced Windows users, so it makes an excellent introduction to Linux tools on Windows.
Get Linux For Free!
Linux is a bulletproof operating system to replace Windoze on your PC or laptop. Linux is fast, stable, and immune to viruses and spyware. Very easy to install and so simple, grandma can use it. Linux rocks!
Linux For The Home PC
So simple grandma can use it. Immune to viruses & spyware. Best of all, it is FREE!
Linux for the desktop PC is here! Best of all, you can get Linux for free! Linux is loaded with software and games to give you the greatest computing experience. Our guide is written for the novice user and will help you get started. Linux is ultra reliable and immune to spyware and viruses. Try it now!