Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Cygwin: Linux for Windows


1. Cygwin: Linux for Windows
This is a collection of notes on Cygwin that was updated on 2020-03-13. Cygwin is used in the classroom in KEC 119 for CS 101 and CS 496.

See also:


Cygwin
Cygwin is a Linux-like environment for use with the Windows operating system.

Some would say that Cygwin is a pretend Linux that one can use instead of a real Linux system (virtual machine or physical machine). But there are times when one might need a Linux-like environment on Windows.

Below are some notes on using Cygwin in a Windows environment. General comments that apply to any Linux environment are not covered here unless necessary.

2. Lab in KEC 119
Cygwin in the lab is on the C: drive in KEC 119. Every computer in the lab has a different C: drive. When you move to another computer, your work is on the other computer you were using.

Any portable hard drive or flash drive connected to the computers in KEC 119 show up as drive D:.

The network drive that follows you around campus (on wired Windows computers, not wireless) is drive H:.

Your Google drive also can be used to transfer files.

3. Paths
After opening a Cygwin terminal session, use the pwd command to "print working directory" to see the path to your home directory.

On my computer, I installed Cygwin to D:\cygwin64. For my user, ROBIN, the home directory is as follows.
D:\cygwin64\home\ROBIN

Remember, upper and lower case differences are important in Linux but not in Windows.

4. CS101 folder
One way to make the CS101 folder in the home directory is as follows. Type each command and press Enter.
cd ~ mkdir CS101 cd CS101 pwd


5. CS101 folders
The CS101 folder is then as follows, using back slashes for Windows paths.
D:\cygwin64\home\ROBIN\CS101

But in Cygwin, the path appears as follows, using forward slashes for Linux (and Cygwin) paths.
/home/Robin/CS101

The Windows and Linux (Cygwin) paths become important when one downloads zip files for class, since they need to be unzipped to the CS101 folder for everything to work properly.

For example, if one uses Notepad++ to edit program text files, one must know the Windows path to the folder and files.

6. Case sensitivity
Note that Linux is case sensitive for file names, etc. However, Cygwin, as it runs under Windows, may or may not be case sensitive for file names, etc., depending on how Cygwin and Windows is set up.

7. Home directory
If Cygwin is installed to D:\cygwin64 and the user is ROBIN then the following is the home directory.

From the Cygwin prompt:
/home/ROBIN /~

From the Windows prompt:
D:\cygwin64\home\ROBIN


8. End of page