Anda di halaman 1dari 2

1-Go to the website www.cygwin.com2- Click on "Install Now"3- Save the setup.

file, then execute it.4- Choose "Install from internet", then click Next.5- Root
Directory "C:/cygwin" (It is not recommended to choose a different directory,
especially if it contains spaces). If prompted for "Default Text File Type", choose
UNIX (not DOS). Then click Next.6- Select Internet Connection: put the proxy
settings or select "use IE settings". Then click Next.7- Choose a Download Site.
The site is recommended.8- Select Packages: Add
the following packages:- under "Archive", select "zip" and "unzip"- under "Perl",
select "perl"- under net, select "inetutils", "openssh", "openssl"- under shells,
select "rxvt"- under "Editors" select "vim" (optional)9- Click Next. Install will
start. Wait for installation to complete.10- Download the file to C:/Cygwin .11- Click
on Start --> Run. In the "Run" window, type: cmd , then press "enter".A DOS window
opens. At the DOS prompt, execute the following commands:c:cd cygwinbin\perl
cygwin_install.txtThis will create the following files: c:/cygwin/etc/profile,
c:/cygwin/cygwin.bat, c:/cygwin/home/youruserid/.bashrc,
c:/cygwin/home/youruserid/.Xdefaults, c:/cygwin/home/youruserid/.inputrc. If those
files already exist, they are automatically moved to the folder
c:/cygwin/tmp/installbackup.12- Open a cygwin terminal window by double-clicking on
the cygwin icon in the start menu or on the file c:/cygwin/cygwin.bat. The window
should be black with white text and the prompt should like this: [~]$If not, then
go through all the steps again and make sure you haven't missed out anything.13-
Moshell installation:In the directory C:\Cygwin ,double-click on the file
cygwin.bat. This will startup theCygwin window and create some files. Now close the
Cygwin window.Open an editor and edit the file cygwin.batDelete the line: bash
--login -i. At the end of the file add the following (replacexxxx with your user
id):set USER=xxxxset HOME=/home/xxxxset SHELL=/bin/bashrxvt -sl 65000 -e /bin/bash
--login -iIMPORTANT: Make sure that there are no spaces at the end of the lines
otherwise thewindows environment variables don�t get set correctly and your
.Xdefaults file will not beread (meaning that rxvt looks horrible!).10. Open the
file C:\Cygwin\etc\profile in a text editor and add the following 6 lines at theend
of the file (replace xxx with your user id!):export USER=xxxxexport
HOME=/home/xxxxexport SHELL=/bin/bashmkdir -p $HOMEcd $HOME

source $HOME/.bashrc11. Edit the file C:/Cygwin/etc/passwd in a text editor and

make sure that there is a row withyour username and home directory. If the home
directory (found towards the end of theline) looks like /cygdrive/h then replace
this with /home/youruserid (replace youruseridwith your user id!!). This is needed
for ssh to function properly.12. Start a Cygwin Terminal window by clicking on the
icon in start menu or on desktop, thenrun the following commands:Create the
following 3 files in your /home/youruserid directory: .bashrc, .inputrc,
and.Xdefaults This can be done with the commands:touch .bashrctouch
.inputrctouch .Xdefaults13. Go to the directory C:\Cygwin\home\youruserid (from
windows explorer) and open thefollowing 3 files in a text editor:In the .bashrc
file, put the following lines:unset PROMPT_COMMANDexport PS1="\[\033[1m\][\w]\\$\
[\033[0m\] "alias ls=�ls -FX�set -o notifyset -o ignoreeofshopt -s cdspellshopt -s
cdable_varsshopt -s checkhashshopt -s checkwinsizeshopt -s sourcepathshopt -s
histappendexport PATH=$PATH:/home/yourid/moshellThe last line appends the moshell
directory to your $PATH. This will enable you to callmoshell from any directory.In
the .inputrc file, put the following lines:set bell-style visibleset convert-meta
Offset output-meta Onset input-meta Onset completion-ignore-case onset completion-
query-items 150set mark-directories onset visible-stats Onset show-all-if-ambiguous
Onset expand-tilde On"\e[D": backward-char"\e[C": forward-char"\e[A": history-
search-backward"\e[B": history-search-forward"\e[7~": beginning-of-line"\e[8~":
end-of-line"\e[1~": beginning-of-line"\e[4~": end-of-line"\e[3~": delete-
char"\e[2~": menu-complete"\M-[2~": paste-from-clipboard # Insert"\M-q": menu-
complete"\C-d": delete-char"\C-l": clear-screen"\C-xdf": dump-functions"\C-xdv":
"\C-xdm": dump-macros(Type man bash if you want to get more information about what
these lines do)In the .Xdefaults file, put the following lines:Rxvt*background:
BlackRxvt*foreground: WhiteRxvt*saveLines: 65535Rxvt*termName: xtermRxvt*geometry:
143x64+0+0Rxvt*loginShell: trueRxvt*font: "Lucida Console-11"Rxvt*cutchars:
�"�&()*,;<=>? []{|}These are just examples of terminal properties, you can change
them to fit your needs.Type man rxvt to view all available properties.14. Open a
new cygwin terminal window. The window should be black with white text andthe
prompt should like this: [~]$If not, then go through the last 4 steps again and
make sure you haven�t missed outanything.15. Moshell installationFollows these
steps if you already have a working Cygwin environment.� Put the
file in c:\cygwin\tmp� Open the cygwin shell and go the /tmp directory. Run the
following:unzip -o moshellxxx.zipbash moshell_install