Table of Contents
Install cygwin
Get setup.exe, run.
You can put cygwin in Program Files by asking it to install to "C:\Progra~1\cygwin" (to avoid spaces in the path).
I usually put the packages directory inside there: "C:\Progra~1\cygwin\INSTALL".
Useful cygwin packages
I like to install the stuff below. You can get an alphabetical package list by clicking the little View button for "Full" view, then using the search in the upper left to find each of these.
- lynx
- links
- nano
- wget
- nc (netcat)
- rsync
- zip
- unzip
- vim
- chere - Creates "open a shell here" context menu entry for arbitrary shells & terminal emulators
- openssh
- screen
- bash-completion
- git
- python3
- python3-imaging
- Development:
- gcc4-core
- gcc4-g++
- gdb
- make
Cheat command if using apt-cyg as noted below:
$ apt-cyg install lynx links nano wget nc rsync zip unzip vim chere openssh screen gcc-core gcc-g++ gdb make bash-completion git python3 python3-imaging
To get Tyler's operating environment (Tyler only), get and run kit.sh. Non-Tylers need not apply.
Bash prompt here context menu option
$ chere -i -t mintty
Command-line cygwin package installer
To install additional cygwin packages later on from the command line, you can use apt-cyg, which works like apt-get, but pulls its stuff from the normal cygwin repos. To install:
wget http://rawgit.com/transcode-open/apt-cyg/master/apt-cyg chmod +x apt-cyg mv apt-cyg /usr/local/bin/
Or as a one-liner:
wget http://rawgit.com/transcode-open/apt-cyg/master/apt-cyg && chmod +x apt-cyg && mv apt-cyg /usr/local/bin/
To use:
apt-cyg install chere
Cygwin SSH server
Prerequisites:
- All users MUST have passwords. Login as an administrator.
- The "openssh" package must be installed.
Environment variables
Right click My Computer, Properties, Advanced, Environment Variables.
Click the "New" new button to add a new entry to System variables:
CYGWIN=ntsec
Edit the global PATH environment variable to add the 'bin' directory under where you installed cygwin:
;c:\Program Files\cygwin\bin
Set up service
Open a cygwin shell – if on Vista/Win7, run the cygwin shell as administrator (right click, run as administrator).
$ ssh-host-config -y
Start it up:
$ net start sshd
Add firewall exception
If using Windows firewall, add a program rule that allows all connections to <CYGWIN_PATH>\usr\sbin\sshd.exe
.
Other notes
Tweak drive letter path
If you want your drive letters to be available as /c
instead of /cygdrive/c
, edit /etc/fstab and edit the commented-out cygdrive line so it reads:
none / cygdrive binary,posix=0,user 0 0
Then re-read the file with:
$ mount -a