User Tools

Site Tools


cygwin

This is an old revision of the document!


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
  • netcat
  • rsync
  • zip
  • unzip
  • vim
  • chere - Creates "open a shell here" context menu entry for arbitrary shells & terminal emulators
  • openssh
  • screen
  • Development:
    • gcc4-core
    • gcc4-g++
    • gdb
    • make

Cheat command if using apt-cyg as noted below:

$ apt-cyg install lynx links nano wget netcat rsync zip unzip vim chere openssh screen gcc4-core gcc4-g++ gdb make

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

I think this doesn't work any more :-(

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://apt-cyg.googlecode.com/svn/trunk/apt-cyg
chmod +x apt-cyg
mv apt-cyg /usr/local/bin/

To use:

apt-cyg install chere

A shorter version of this very verbose HOWTO.

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).

$ chmod a+r /etc/passwd /etc/group
$ chmod 777 /var
$ ssh-host-config  -y

Start it up:

$ net start sshd

If the service fails to start, try:

$ chown system /etc/ssh*
$ chown system /var/empty

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
cygwin.1430164513.txt.gz · Last modified: 2015/04/27 12:55 by tkbletsc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki