Win-Win with Cygwin

Customization

You might realize that you need to install another package or more sometime after this initial installation. If so, you need to run setup.exe again from where you saved it or directly from the website.

Step through the wizard, accepting the defaults. (The defaults should reflect your earlier selections.) When the wizard displays the list of Cygwin packages, select the category and the package you require. If you don’t know the category under which your package exists, you can search for it with the Search field (upper left corner of the Select Packages window) (Figure 6).

Figure 6: Searching for a specific package (SSH).

Once you’ve selected the package or packages you want, click on through the wizard normally until package installation completes. You can select more than a single package from a category or from multiple categories during a rerun of the setup wizard. If you want to uninstall a package, click the Keep link until it reads Uninstall and proceed through the wizard.

When selecting a package for installation, you might notice the two checkboxes. Selecting the left checkbox installs the binary package (executable and supporting libraries and dependencies) and selecting the right checkbox installs the package source code. You do not need the source code, but you might decide to install it for your own use.

Setting the Path

To add Cygwin to your PATH , open a CMD prompt on your Windows system, type PATH , and press Enter. Your response should look something like this:

C:\Users\Administrator>PATH
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Citrix\System32\

To use Cygwin effectively, you need to add E:\Cygwin\bin to your PATH environment variable. Of course, use the location of your installation’s bin folder. To do so, right-click Computer | Properties | Advanced System Settings | Environment Variables | System Variables , scroll down until you see Path (Figure 7), and click the Edit button. Enter a semicolon after the last entry and the full path to your Cygwin bin directory (Figure 8).

Figure 7: Editing the system variable PATH.
Figure 8: Adding the Cygwin\bin folder to the PATH variable.

Now, when you open a CMD prompt or use the Cygwin Terminal, the Cygwin binaries will be in your PATH. Close and re-open any CMD windows to use the new environment variable.

Related content

  • Hands-on test of Windows Subsystem for Linux
    If you don't want to do without the main advantages of Linux on the Windows platform, the Windows Subsystem for Linux offers another option. We delve the depths of the Linux underworld and explain how you can optimize the subsystem.
  • MobaXterm: Unix for Windows

    MobaXterm, a portable X server for Windows, bundles built-in Unix/Posix tools into a single portable EXE file, letting you use a Linux command line and tools on the Windows desktop.

  • Eat. Pray. Script.

    Lazy … er, smart … administrators are hard at work in the background via scripts, cascading scripts, and cron jobs.

  • My Five Favorite Sys Admin Tools
    I've written hundreds of articles over the past two decades, and I always seem to come back to a single theme: sys admin tools. I have five favorite tools that have not only stood the test of time but have also served me well in every job I've held, including when I ran my own computer consulting company.
  • SSH on Windows

    For Linux admins, SSH is one the most important tools of remote administration. SSH also works in Windows, with tools such as PuTTY or WinSSH, MobaXterm, WinSCP, or Swish.

comments powered by Disqus