Cygwin Installation Notes

1. Get Cygwin and apt-cyg
Required packages for apt-cyg


Recommended extra packages

inetutils (telnet,ftp client)
util-linux (for script command)
openssh (for ssh server)
tftp (tftp client)
tcp-wrappers (for xinetd)
xinetd (for ftp,telnet,tftp server)
luit (for character encoding)

Install apt-cyg. If the command below fails just save
and place it under /usr/bin and make it executable.

svn –force export /bin/
chmod +x /bin/apt-cyg

2. Configuration for Japanese Windows.
vi .inputrc

set kanji- sjis
set convert-meta off
set meta- on
set output-meta on

3. Configure Windows environment variables to use cygwin commands in Windows Powershell.
Right-click Computer, properties, Advanced system setting, environment variable
edit PATH and append the below. With Powershell, you don’t have to worry about character encodings.

4. Tuning to my preference.

vi /etc/bash.bashrc
PS1='[\u@\h \W]\$ '
alias explorer=/cygdrive/c/Windows/explorer.exe

To clear banner on ssh, ftp, telnet login, do…
echo '' > /etc/motd
echo '' > /etc/defaults/etc/motd

To make blue coloured text visible on black background, do…
echo 'Blue=127,127,255' >> ~/.minttyrc
echo 'BoldBlue=191,191,255' >> ~/.minttyrc

Cygwin vim does not set vimrc by default, so place vimrc under home directory and edit to your liking.
cp /usr/share/vim/vim74/vimrc_example.vim ~/.vimrc

To install ssh on Cygwin, do below.
cygrunsrv.exe -S sshd

To activate ftp, tftp, telnet server, do below.
vi /etc/xinetd.d/ftpd
vi /etc/xinetd.d/tfppd
vi /etc/xinetd.d/telnet
disable = no
user = username

Cygwin does not accept from outside by default, so edit below and comment all to accept from all.
vi /etc/hosts.deny
cygrunsrv -S xinetd

5. Whenever you have errors like “child info fork abort”, stop all cygwin related service and start ash.exe under bin directory, annd run /bin/rebaseall -v

6. In order to uninstall cygwin, stop and remove all cygwin services, and open regedit and search for keyword cyg and remove them. There are something like Cygnus Solution ~, and Cygwin totalling to four.