2 1. Ubuntu 1.1 OS OS OS ( OS ) OS ( OS ) VMware Player VMware Player jp/download/player/ URL VMware Plaeyr VMware

Similar documents
PowerPoint プレゼンテーション

bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows ˆ Windows10 64bit Wi

第5回お試しアカウント付き並列プログラミング講習会

PowerPoint プレゼンテーション

untitled

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

I 2 tutimura/ I 2 p.1/??

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

ex01.dvi

Java updated

ex01.dvi

3.2 Linux root vi(vim) vi emacs emacs 4 Linux Kernel Linux Git 4.1 Git Git Linux Linux Linus Fedora root yum install global(debian Ubuntu apt-get inst

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

(2 Linux Mozilla [ ] [ ] [ ] [ ] URL 2 qkc, nkc ~/.cshrc (emacs 2 set path=($path /usr/meiji/pub/linux/bin tcsh b


273? C

double float


Microsoft Word - keisankigairon.ch doc


3 Java 3.1 Hello World! Hello World public class HelloWorld { public static void main(string[] args) { System.out.println("Hello World");

Microsoft Word - C.....u.K...doc

3 Ubuntu Linux Ubuntu Linux Debian Linux DistroWatch.com 1 Debian Ubuntu Linux 1 Debian CD(4.1 ) Knoppix Debian CentOS Linux CentOS 1 Ubuntu L

UNIX

A

新・明解Java入門

2 Windows 10 *1 3 Linux 3.1 Windows Bash on Ubuntu on Windows cygwin MacOS Linux OS Ubuntu OS Linux OS 1 GUI Windows Explorer Mac Finder 1 GUI

Ubuntu Linux PC Ubuntu Linux (14.04 LTS, Trusty Tahr) 32bit CD 64bit CD 2. 32bit CPU 64bit 32bit PC CPU 32bit 64bit Windows 64bit 64bit. 32bit Core 64

GNU Emacs GNU Emacs

LAN Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License

ÆþÌçGTK+

K227 Java 2

X Window System X X &

slide5.pptx

Add-onアプリケーション開発 - 環境構築マニュアル -

UNIX

2008 IIA (program) pro(before)+gram(write) (artificial language) (programming languege) (programming) (machine language) (assembly language) ( )

MathLibre KNOPPIX (next generation) 2012 KNOPPIX/Math MathLibre KNOPPIX , KNOPPIX 6.0, next generation. KNOPPIX/Math KDE,

大統一Debian勉強会 gdb+python拡張を使ったデバッグ手法

unix.dvi

E2 Spider 2018/08/03 Intel NUC Core i7 PC 2.5 /M.2 SSD BOXNUC7I7BNH PC DDR4-2133(PC ) 8GBX2 260pin 1.2V CL15 SP016GBSFU213B22 WD SSD M /51

DCL intro Manual for Ubuntu11.10

tebiki00.dvi

情報処理概論(第二日目)

r1.dvi

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡

C

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

C C UNIX C ( ) 4 1 HTML 1

情報処理概論(第二日目)

8 / 0 1 i++ i 1 i-- i C !!! C 2

/

ohp.mgp

debian_install.dvi

Linux XScreenSaver T020074

オンラインマニュアル

: : : TSTank 2

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

1.ppt

51 Debian


エラー処理・分割コンパイル・コマンドライン引数

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

para02-2.dvi

a0postercls? Gerlinde Kettl, Matthias Weiser T E Xmacro wwwctanorg/tex-archive/macros/latex/contrib/a0poster LAT E X

LiveCode初心者開発入門サンプル

r08.dvi

r07.dvi

( ) 1 Windows HTML ( ) ( ) ( ) WWW 10 ( )

ohp07.dvi

20 H8/3069LAN H. Fukura

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y

情報処理概論(第二日目)

情報の分析 1. Linux ツールの活用

Condition DAQ condition condition 2 3 XML key value


Unix * 3 PC 2 Linux, Mac *4 Windows Cygwin Cygwin gnuplot Cygwin unix emulator online gnuplot *5 matplotlib *6 SuperMongo *7 gnuplot gnuplot OS *8 Uni

memo

ohp08.dvi

本 日 の 授 業 内 容 最 低 限 覚 えるべきUNIXコマンド pwd, ls, mkdir, cd, cp, rm, mv テキストエディタの 簡 単 な 使 い 方 テキストエディット, Jedit X,Emacs C 言 語 プログラミングの 初 歩 hello, world を 画 面

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

Java (5) 1 Lesson 3: x 2 +4x +5 f(x) =x 2 +4x +5 x f(10) x Java , 3.0,..., 10.0, 1.0, 2.0,... flow rate (m**3/s) "flow

WinHPC ppt

OpenAM 13 インストールガイド

Baud Rate 9600 Parity NONE Number of Data Bits 8 Number of Stop Bits 1 Flow Control NONE 1 RS232C 200mm 2,000mm DIMM ( ) Telescope East/West LX200 * 1

明解Java入門編

haskell.gby

2002 awk Aho,Weinberger,Kernighan DFA awk Brian Kernighan DFA GNU awk Arnold Robbins DFA NFA MKS awk Mortice Kern Systems POSIX NFA mawk Mike Brennan

本チュートリアルについて 14 部構成 比較的簡単なトピックから 各回 プログラミング言語 任意 チュートリアルで 新しい内容 宿題 プログラミング演習 次の週 結果について発表 もしくは話し合いをする スライドは Python で Python, C++, Java, Perl についての質問い答

B 20 Web

Microsoft PowerPoint _2.プログラミングの基礎_final.pptx

¥ƥ­¥¹¥ȥ¨¥ǥ£¥¿¤λȤ¤˽

2 1 Web Java Android Java 1.2 6) Java Java 7) 6) Java Java (Swing, JavaFX) (JDBC) 7) OS 1.3 Java Java

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 新装版 1 刷発行時のものです.

10/8 Finder,, 1 1. Finder MAC OS X 2. ( ) MAC OS X Java ( ) 3. MAC OS X Java ( ) / 10

Microsoft PowerPoint _2.プログラミングの基礎_final

Transcription:

1 2010 k-okada@jsk.t.u-tokyo.ac.jp http://www.jsk.t.u-tokyo.ac.jp/~k-okada/lecture/ 2010 4 5 Linux 1 Ubuntu Ubuntu Linux 1 Ubuntu Ubuntu 3 1. 1 Ubuntu 2. OS Ubuntu OS 3. OS Ubuntu https://wiki.ubuntulinux.jp/ubuntutips/install/installdualboot OS http://www.ubuntulinux.jp/products/ JA-Localized/vmware Windows PC 1 Linux GNU OS GNU/Linux

2 1. Ubuntu 1.1 OS OS OS ( OS ) OS ( OS ) 2 1.2 VMware Player VMware Player http://www.vmware.com/ jp/download/player/ URL VMware Plaeyr 3.0.1 VMware Player for Windows 32-bit and 64-bit Registor or Login Continue 2,Windows7 WindowsXP, WindowsXP

1.2. VMware Player 3 I agree to the terms and conditions ontlined in Evaluation End User License Agreement Registor VMWare Activate your VMware Player Download Activate Evaluation Now VMware Need to resend your activation email? clink heare 15 (VMWare-player-3.0.1-227600.exe) (N)

4 1. Ubuntu 1.3 VMware Ubuntu VMWare Ubuntu ( OS http://www.ubuntulinux.jp/products/ JA-Localized/vmware ubuntu-ja-8.04-vmware-i386. zip Ubuntu Ubuntu.vmx Ubuntu Ubuntu VMware Tools Linux Ubuntu 1.4 Ubuntu 1.4.1

1.4. Ubuntu 5 1.4.2 k-okada@ubuntu-vm:~$ sudo apt-get update sudo k-okada@ubuntu-vm:~$ sudo apt-get upgrade Ubuntu 1.4.3 Ctrl+Space emacs Ctrl+\ SCIM SCIM Ctrl+\ anthy ON/OFF

6 2. Linux 1.4.4 emacs Ctrl Ctrl Caps Ctrl Ctrl CapsLock 2 Linux 2.1 shell shell

2.2. Unix 7 k-okada@ubuntu-vm:~$ mkdir work k-okada@ubuntu-vm:~$ cd work k-okada@ubuntu-vm:~/work$ mkdir soft2 k-okada@ubuntu-vm:~/work$ ls soft2 k-okada@ubuntu-vm:~/work$ ls -al 12 drwxr-xr-x 3 k-okada k-okada 4096 2010-04-03 18:02. drwxr-xr-x 27 k-okada k-okada 4096 2010-04-03 18:02.. drwxr-xr-x 3 k-okada k-okada 4096 2010-04-03 18:02 soft2 k-okada@ubuntu-vm:~/work$ cd soft2 k-okada@ubuntu-vm:~/work/soft2$ ls UNIX k-okada@ubuntu-vm:~/work$ cd ~ k-okada@ubuntu-vm:~$ (/home/k-okada) 2.2 Unix Unix ( ) http://kanji. zinbun.kyoto-u.ac.jp/~yasuoka/publications/dareuni/ k-okada@ubuntu-vm:~$ mkdir doc k-okada@ubuntu-vm:~$ cd doc k-okada@ubuntu-vm:~/doc $ wget -nh --cut-dirs=4 -np -r http://www.kanji.zinbun.kyoto-u.ac.jp/~yasuoka/publications/dareuni/ index.html k-okada@ubuntu-vm:~$ gnome-open index.html

8 3. Ubuntu #/bin/sh Unix 1 3 4 2.3 PrtSc Alt PrtSc 3 Ubuntu Ubuntu deb emacs 3.1 emacs k-okada@ubuntu-vm:~$ emacs -nw emacs : * emacs21-nox * emacs22 * emacs-snapshot * e3 * emacs-snapshot-nox * emacs22-gtk * emacs21 * emacs22-nox * jove : sudo apt-get install < > bash: emacs: command not found emacs

3.2. 9 emacs k-okada@ubuntu-vm:~$ apt-get search emacs emacs 3.2 k-okada@ubuntu-vm:~$ sudo sudo apt-get install emacs22...... : emacs22-bin-common emacs22-common emacsen-common libgif4 liblockfile1 xaw3dg : emacs22-el : emacs22 emacs22-bin-common emacs22-common emacsen-common libgif4 liblockfile1 xaw3dg : 0 : 7 : 0 : 406 20.9MB 65.5MB [Y/n]? Y emacs 3.3 https://wiki.ubuntulinux.jp/ https://wiki.ubuntulinux. jp/ubuntutips Tips. http://ubuntuforums.org/ 4 Emacs Emacs k-okada@ubuntu-vm:~$ emacs -nw

10 4. Emacs C-z shell C-z Ctrl z fg Emacs 4.1.emacs ~/.emacs Emacs Emacs ~/.emacs Emacs EmacsLisp Lisp Emacs C-x C-f (Ctrl x Ctrl f Ctrl ) Find file: ~/.emacs ~/.emacs C-g ~/.emacs ;;; M-x g goto-line ;;; (global-set-key "\M-g" goto-line) Emacs ~/.emacs M-g ESC g (global-set-key "\C-h" backward-delete-char) C-h 4.2 Emacs emacs C-f C-b C-p C-n C-a C-e

4.3. Emacs shell 11 C-x 2 C-x 3 C-x o C-x 1 C-x C-s C-x C-f C-x C-w Emacs C-x C-c Emacs C-d C-s C-k C-y C-k Emacs Beginner s HOWTO (http://www.linux.or.jp/jf/jfdocs/emacs-beginner- HOWTO.html) 2.3 (http://www.linux.or.jp/jf/jfdocs/emacs- Beginner-HOWTO-2.html#ss2.3) GNU Emacs (http://www.bookshelf.jp/texi/emacs- 20.6-man-jp/emacs.html) (http://www.bookshelf.jp/texi/emacs-20.6-manjp/emacs 10.html) 4.3 Emacs shell Emacs bash Emacs M-x shell ESC x shell shell Emacs shell shell

12 5. test0.c test0.c( ) test0.s cat, more, less test0.o hexdump test0.o UNIX hexdump test0.o less $ ls /* test0.c */ #include <stdio.h> test0.c $ gcc -S test0.c int test(int i, int j) { return (i * j); $ cat test0.s $ gcc -c test0.c int main(int argc, char *argv) { int i,j,k; i = 3; j = 2; k = test(i,j); if (k > 5) printf(">5\n"); else printf("<=5\n"); return 0; $ objdump -d test0.o $ gcc -o test0 test0.o $ nm test0.o $ nm test0 $ ls test0.c test0test0.o test0.s $./test0 1 gcc -S gcc -c gcc -o gcc nm objdump -d 5 k-okada-soft2@jsk.t.u-tokyo.ac.jp 1-3 Mac emacs

13 2 add.sh ps aux 1 Mac ifconfig 2,3 #/bin/sh 3 k-okada@k-okada-laptop:~/doc/soft2/2010$ ps-by-user.sh uniq -c sort -nr 123 root 69 k-okada 5 www-data 2 daemon 2 avahi 2 111 1 syslog 1 statd 1 ntp 1 gdm 1 canna 1 120 1 108

14 5. k-okada-soft2@jsk.t.u-tokyo.ac.jp http://www.google.com/ 3!!! Linux man Linux 4 man gcc man make man ar man objdump man man, man ps, man uniq, man sort, man cut Makefile Makefile ( ) Makefile Makefile : make ( ) Tab Tab 5 Emacs C-b C-f 3 you can google it 4 gnome 5 0x0a Tab 0x09

15 test1 main.c hello.c goodbye.c Makefile test1: main.c hello.c goodbye.c gcc -o test1 main.c hello.c goodbye.c make make Makefile % ls Makefile main.c hello.c goodbye.c % make test1 gcc -o test1 main.c hello.c goodbye.c 1 Makefile make test1 /* main.c */ #include <stdio.h> int main() { printf("main.\n"); hello(); goodbye(); return 0; /* hello.c */ #include <stdio.h> void hello(void) { printf("hello!!\n"); /* goodbye.c */ #include <stdio.h> void goodbye(void) { printf("goodbye!!\n"); hello.c main.c goodbye.c main.c main.o, hello.c hello.o, goodbye.c goodbye.o Makefile test2 hello.o goodbye.o main.o hello.c make test2 hello.c main.c goodbye.c

16 5. test2: main.o hello.o goodbye.o gcc -o test2 main.o hello.o goodbye.o main.o: main.c gcc -o main.o -c main.c hello.o: hello.c gcc -o hello.o -c hello.c goodbye.o: goodbye.c gcc -o goodbye.o -c goodbye.c test3: main.o hello.o goodbye.o gcc -o $@ $^ main.o: main.c gcc -o $@ -c $^ hello.o: hello.c gcc -o $@ -c $^ goodbye.o: goodbye.c gcc -o $@ -c $^ $@ $^ Makefile $% $ $? $ $+ Makefile $*.c.o %.o: %.c gcc -o $@ -c $< Makefile

17 test4: main.o hello.o goodbye.o gcc -o $@ $^ %.o: %.c gcc -o $@ -c $< Makefile 6 google 6 (BK) (http://0xcc.net/misc/badknowhow.html) BK

18 5. C Java Java Java 1995 javac.class java. class ( Windows Linux) java Java Web Java javac,java k-okada@ubuntu-vm:~$ sudo apt-get install sun-java6-jdk DJL $ cat test0.java class test0 { public static int test(int i, int j) { return ( i * j ); public static void main(string args[]) { int i, j, k; i = 3; j = 2; k = test(i,j); if ( k > 5 ) { else { $ javac test0.java $ ls > 5 System.out.println(">5"); System.out.println("<=5"); test0.class test0.java $ java test0

19 Perl Perl Larry Wall 1987 Larry Wall patch Perl C web CGI Perl $ cat test0.pl sub test { ($i, $j) = @_; return ( $i * $j ); sub main { $i = 3; $j = 2; $k = &test($i,$j); if ( $k > 5 ) { print ">5\n"; else { print "<=5\n"; & main(); $ perl test0.pl Python Python 1995 Guido van Rossum 7 C Google Yahoo! 7 C Java javac java class Java

20 5. $ cat test0.py def test(i,j): return ( i * j) def main(): i = 3 j = 2 k = test(i,j) if k > 5: print ">5"; else: print "<=5"; main() $ python test0.py python if Python python >5 $ python >>> execfile("test0.py") test0.py test def test(i,j): print "i = " + repr(i) + ", j = " + repr(j); return ( i * j) $ python >>> execfile("test0.py") i = 3, j = 2 > 5 12 >>> test(3,4) i = 3, j = 4