Cygwin + Windows Terminal
Cygwin is a collection of open source tools that are commonly found on GNU/Linux systems but not found on Windows systems. It includes a library for x86_64 Windows systems that provides some POSIX API functionality.
Installing Cygwin
If you set up Windows 10 per my previous post, you already have this utility installed. If not, I recommend using Chocolatey to install and maintain this software.
|
|
If you install Cygwin via chocolatey, the binary will be located in:
C:\ProgramData\chocolatey\bin\Cygwin.exe
Add Cygwin to Windows Terminal
In my aforementioned post, I installed the Windows Terminal via Chocolatey also. I highly recommend using this as your terminal on Windows 10 systems. It is GPU accelerated and supports adding multiple “tabs” making terminals easier to organize. This terminal is included on Windows 11 Systems.
Windows Terminal config
Open the terminal and access the settings by pressing [ Ctrl ] + [ , ]
On the left-hand bar of the terminal, navigate to the + icon to create a new Profile. Alternatively, press the Gear at the bottom of the left-hand bar and that will open the settings JSON file. I have the example profile in JSON in the next section.
Name the profile Cygwin
or whatever you prefer and enter the location of the Cygwin binary as the Command line. You can adjust the appearance in the next tab.
Windows Terminal JSON config profile
|
|
The important settings here are “name” and “commandline”, the rest is a silly theme that makes the terminal look like it is on a CRT monitor.
Opening the new profile
Press the + on the top bar and select “Cygwin” to open your new profile.
This will open a new terminal tab with the Cygwin bash shell. Entering the command help
will display information about the shell.
|
|
Notable commands and directories
When using Cygwin, you can use bash
utilities for browsing files on your computer.
clear
: will clear the output in the terminal window.ls
: list directory contentsls -a
: option added to show hidden files (files that start with “.”)
pwd
: display the current directory path in the file system.man [command]
: open the manual page for specified command in the current terminal window.
Windows drive letters
Windows will assign drive letters to partitions. In Cygwin, these are mounted as /cygdrive/N
. For example, if you are looking for folder D:\videos
in Cygwin it would be under /cygdrive/d/videos