1. Linux Chris Plaintail June 16, 2016 1 / 39
1 Cygwin Cygwin 2 3 4 Cygwin 5 2 / 39
Uinux Unix OS Micorsoft Windows Cygwin Cygwin 3 / 39
Cygwin 4 / 39
Cygwin...is it? a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows. a DLL (cygwin1.dll) which provides substantail POSIX API functionality.... isn t it? a way to run native Linux apps on Windows. You must rebuild your application from source if you want it to run on Windows. a way to magically make native Windows apps aware of UNIX R functionalty like signals, ptys, etc. Again, you need to build your apps form source if you want to take advantage of Cygwin functionality....form www.cygwin.com 5 / 39
Cygwin setup-86.exe (setup-86 64.exe) 6 / 39
[ ]-[ (P)]-[ ] -[Cygwin]-[Cygwin Bash Shell] HOME.bash_profile 7 / 39
8 / 39
[...]$ [...]$ pwd [...]$ [...]$ date date -u --help [...]$ date -d"2011-09-21 9:52:00" +%s [...]$ [...]$ echo echo Hello -n Hello 9 / 39
[...]$ clear [...]$ whoami 10 / 39
[...]$ man j [return] k f [space] b p q 1 1 1 1 11 / 39
(CTRL-p) (CTRL-n) (CTRL-b) (CTRL-f) Del (CTRL-d) TAB TAB 12 / 39
pwd date echo man clear whoami 13 / 39
14 / 39
( ) ( ) cat CTRL-d 15 / 39
date > date >> cat < cat cat < > 16 / 39
cat << EOF filename.txt cat << EOF > filename.txt cat > filename.txt 17 / 39
printenv wc -l printenv less printenv head -5 printenv grep HOME printenv grep -v HOME head -5 /etc/services tail -3 18 / 39
printenv less printenv > filename.txt less < filename.txt A B C... 19 / 39
1 1 printenv 10-15 2 printenv 3 printenv HOME daito 4 printenv HOME daito 5 printenv HOME daito 6 printenv HOME daito 7 20 / 39
cat head tail less wc grep printenv 21 / 39
Cygwin 22 / 39
(/) cygwin C:\cygwin C:\daito\apps\cygwin (~) C:\cygwin\home\ Z:\ /cygdrive C: /cygdrive/c Z: /cygdrive/z 23 / 39
(cygwin) C: Z: cygwin (/) etc home cygdrive c z Users 24 / 39
pwd cd cd.. / 25 / 39
ls ls [ ] [ ] ls -l ls -a ls -d ls / ls /etc 26 / 39
ls -l /etc total 1344 -r--r----- 1 root wheel 237 2 17 19:53 RsLicense drwxr-xr-x 3 root wheel 102 10 31 2004 X11 -rw-r--r-- 1 root wheel 515 10 26 2013 afpovertcp.cfg lrwxr-xr-x 1 root wheel 15 10 26 2013 aliases -> postfix/aliases -rw-r----- 1 root wheel 16384 10 26 2013 aliases.db drwxr-xr-x 11 root wheel 374 3 29 01:05 apache2 drwxr-xr-x 18 root wheel 612 5 16 20:40 asl -rw-r--r-- 1 root wheel 975 10 26 2013 asl.conf -rw-r--r-- 1 root wheel 377737 9 21 2013 authorization.deprecated -rw-r--r-- 1 root wheel 1935 10 26 2013 autofs.conf -r--r--r-- 1 root wheel 745 10 26 2013 bashrc -rw-r--r-- 1 root wheel 189 10 26 2013 csh.cshrc -rw-r--r-- 1 root wheel 121 10 26 2013 csh.login -rw-r--r-- 1 root wheel 39 10 26 2013 csh.logout drwxr-xr-x 3 root wheel 102 9 11 2013 defaults ( owner group ) 27 / 39
-r--r----- 1 root wheel 237 2 17 19:53 RsLicense drwxr-xr-x 3 root wheel 102 10 31 2004 X11 -rw-r--r-- 1 root wheel 515 10 26 2013 afpovertcp.cfg lrwxr-xr-x 1 root wheel 15 10 26 2013 aliases -> postfix/aliases -rw-r----- 1 root wheel 16384 10 26 2013 aliases.db drwxr-xr-x 11 root wheel 374 3 29 01:05 apache2 -rw-r--r-- 1 root wheel 975 10 26 2013 asl.conf -r--r--r-- 1 root wheel 745 10 26 2013 bashrc 1 d : l : - : 2-10 2-4 :, 5-7 :, 8-10 : r : w : x : 28 / 39
cp mv rm mkdir rmdir wc head tail less 29 / 39
? 1 * 0 [...] [...] 1 ls /e?? ls -l /e??/[ah]* ls -l -d /e??/[ah]* 2 1 cp /etc/hosts*./ 2 cp /etc/hosts.allow./hosts.1 3 ls -ld /etc/* grep "^-" ^ 30 / 39
pwd cd ls cp mkdir mv rm wc which 31 / 39
32 / 39
/etc/bashrc ~/.bashrc ~/.bash_profile bash HOME.bash profile cd /cygdrive/z/cs-a echo "cd /cygdrive/z/cs-a" >.bash_profile 33 / 39
PS1 HOME PATH... = export 34 / 39
printenv HOME=/home/... LANG=ja_JP.UTF-8 PATH=/bin:/usr/bin:... SHELL=/usr/bin/bash... echo $PS1 echo $PATH 35 / 39
PS1 PS1="[\u@\h]$ " \u \h \d \t \w \! \# \n export export PS1 export PS1="[\u@\h]$ " 36 / 39
PATH PATH=/cygdrive/z/CS-A:$PATH export export PATH export PATH=/cygdrive/z/CS-A:$PATH 37 / 39
.bash profile.bash profile cd /cygdrive/z/cs-a PATH=/cygdrive/z/CS-A:$PATH export PATH export PS1="[\u@\h]$ "... 38 / 39
export printenv echo 39 / 39