1 / 35

網路與工作站

網路與工作站. 報告人:邱耀霆 ( sothat ). 網路資源. World Wide Web BBS 台大計中 電機系計中. World Wide Web. 教務處的 Info http://info.ntu.edu.tw 系學會網頁 http://www.ee.ntu.edu.tw/~academic/ 電機系網頁 http://www.ee.ntu.edu.tw. BBS. ABC - PC 室三寶 什麼是 BBS ? BBS : Bulletin Board System 電子佈告欄系統

bette
Download Presentation

網路與工作站

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 網路與工作站 報告人:邱耀霆 ( sothat )

  2. 網路資源 • World Wide Web • BBS • 台大計中 • 電機系計中

  3. World Wide Web • 教務處的 Info http://info.ntu.edu.tw • 系學會網頁 http://www.ee.ntu.edu.tw/~academic/ • 電機系網頁 http://www.ee.ntu.edu.tw

  4. BBS • ABC - PC室三寶 • 什麼是 BBS ? BBS : Bulletin Board System 電子佈告欄系統 • 我們最常用到的是以 telnet 通訊協定為基礎的 BBS 站,像 Maxwell ,不良牛,PTT 皆是。 • Maxwell: bbs.ee.ntu.edu.tw

  5. BBS How-To • 常用的 BBS 軟體: NetTerm / MultiTerm / KKMan 等皆是 Netterm: http://www.netterm.com MultiTerm: KKMan: http://www.kkman.com.tw

  6. 其他的電腦資源 • 計中一樓 PC 室 • 計中三樓工作站室(24h) • 電機系 128室

  7. 網路的基本概念 • TCP/IP • 簡單的 IP 分層 • Domain Name • Telnet

  8. 網路通訊協定 • TCP/IP TCP/IP 是網路通訊協定的簡稱 • IP -> Internet Protocol 將每台電腦定出獨一無二的位址 如 140.112.2.100 • TCP -> Transmission Control Protocol 控制資料傳輸的正確性 / 傳輸的速度

  9. 簡單的 IP 分層 IP 由四個 8bit 的數字組成 例如 140.112.18.33 140.112 代表的是台大的網段 140.112.18-21 這部份屬於台大電機 140.113 是交大

  10. Domain Name • IP 以數字代表位址比較不好記,而 domain name 則是以英文的簡寫代表主機位址。 例如:www.ntu.edu.tw代表 WWW . 台大 . 教育 . 台灣 不良牛 zoo.ee.ntu.edu.tw

  11. Telnet • telnet 是一個利用 TCP/IP 來連線到遠端的程式。 • 除了用來上 BBS 站,我們可以拿他來進入我們系上的工作站主機。

  12. 工作站介紹 • Unix like 作業系統 • Shell 介紹 • Unix File System • 簡單的操作

  13. Unix • Unix 的歷史:http://www.csie.nctu.edu.tw/document/unixfaq/node64.html Unix 原先是由 Bell lab 開發的一套由 c 寫成的多人多工作業,接下來有很多的作業系統從 unix 發展出來,但主要的介面是類似的,很多指令都相通。我們統稱 unix like 的作業系統。

  14. 常見的unix like 作業系統 目前比較常見的 unix like 作業系統有: • linux 做 kernel 的 Redhat/Debian/SuSE • Sun 的 Solaris/SunOS • BSD 系列的BSD4.4,FreeBSD,OpenBSD,NetBSD 等。 • 新的蘋果電腦的 Mac OS/X 也是 base 在 FreeBSD 的 kernel 上。

  15. 電機系的工作站 • 我們系上的工作站主要是 linux 工作站 包括 home.ee.ntu.edu.tw , ccws1-8.ee.ntu.edu.tw • 工作站的好處是很方便遠端的操作。 • 我們可以從自己的電腦用 telnet 或 ssh 連到系上的工作站利用工作站幫我們做一些事情。

  16. Shell ( 殼 ?) • 雖然圖型介面作業系統相當的方便,在 unix 大部份的工作還是要靠打指令來完成。而解讀我們指令,將指令下給 kernel 的程式我們就叫做 shell • 在 unix 上: 人 <-> Shell <-> kernel • 常見的 shell 有 sh/csh/bash/tcsh/zsh

  17. Unix file system • Unix 的檔案結構如下 • 我們用 .. 代表父目錄,如 home 就是 b8901115的父目錄

  18. 常用的指令 ls - list directory contents cd - change dir mkdir - make dir rmdir - remove dir rm - rm file(s) more - 分頁讀檔

  19. 常用的指令 • man -> 男人 .. manual 的縮寫,查指令用 如 man man , man ls • find -> 找檔案 ex: find . -name "blah*" 找以 blah 開頭的檔案 • locate -> 找檔案 不過是用定期做的資料庫 ex: locate libc.a

  20. 進階的指令 • grep -> 尋找檔案的內容 • tail -> 看檔案的結尾 • head -> 看檔案的開頭 • du -> 目錄的使用大小 • df -> 硬碟的使用 • ln -> 連結檔案 • clear -> 清除螢幕 • chmod-> 改變檔案屬性

  21. 檔案的權限 當我們打 ls -la 會出現像這樣的結果 drwx------ 2 b8901115 b88 4096 Sep 14 2000 pro/ -rw-r--r-- 1 b8901115 b88 15 May 10 02:35 result 型式/權限 使用者 群組 大小 建立日期 檔名 前面的這一串代表的是 d 檔案類別 ( - 一般 , d目錄 , l連結 ) r:可讀,w:可寫,x:可執行 (或者可進入) -uuugggooo u:user g:group o:other

  22. 改變權限 • 我們用 chmod 來改變檔案的權限 Ex: chmod [auog][op][perm] files chmod o+r file chmod 755 file chmod a+rwx,o-w file

  23. 系統資訊 w -> 工作站的使用者資訊 who -> 誰在站上 whoami -> 我是誰? yppasswd-> 換密碼 ypchsh -> 換 shell cal -> 日曆 date -> 時間 nslookup -> 向 name server查hostname或ip

  24. PIPE • pipe 將輸入輸出轉向 • | 將左邊輸出當成右邊的輸入 Ex: ls –al | less locate | grep libc • < 將右邊的檔案當成輸入 > 將左邊的輸出導到檔案 Ex: find . –name “blah*” > result

  25. Foreground , Background • fg ; bg 把程式丟到前景;丟到背景 • 在指令的最後面加上 & 即可把程式丟到背景執行。 • 在執行時按下 Ctrl-Z 然後用 bg 丟到背景 Ex: find . –name “foo?bar*” & • Jobs 看目前正在執行的檔案

  26. 其他的指令 • zip / unzip -> 壓縮/解壓縮 • alias -> 別名 Ex: alias c clear • tar -> 將多個檔案包在一起 Ex: tar zcf cfile.tgz *.c

  27. 常見的 Editor • joe -> Joe's Own Editor • Pico -> PIne's message COmposition editor • vi -> VIsual editor • Vim -> Vi IMproved • emacs->Editing MACroS • vi/emacs 則在 unix 上比較常見

  28. 工作站的資源 • email • www • ftp • OpenWebMail

  29. Email • 系上的 email 格式為學號去掉最前面一個數字 Ex: 學號 B90901115 email: b0901115@ee.ntu.edu.tw 收信主機可以設為 mail.ee.ntu.edu.tw

  30. WWW • 系上的工作站可以放置個人網頁 • 在home directory 下開一個目錄public_html 並把網頁放在裡面即可用 http://www.ee.ntu.edu.tw/~b0901115/ 來讀網頁

  31. FTP • ftp • 用一般 windows 上的 ftp client 如 cuteftp 連到 (home|ccws[1-8]).ee.ntu.edu.tw

  32. OpenWebmail • OpenWebmail 是一套以 web 為介面的收信軟體。 • 使用: 用一般的 browser 連到 http://www.ee.ntu.edu.tw/mail/

  33. 程式設計 • Compiler : cc , c++ • Makefile: make

  34. CC / C++ • 在 linux 工作站上的 compiler 一般是 GNU C/C++ ,簡稱 gcc • GNU –GNU is Not Unix –www.gnu.org • -c compile , -o outputfile , -l library Ex: gcc –c hw.c gcc hw.o –o hw 執行: ./hw

  35. Make • Make: maintain program dependencies • Makefile example all:abc.o gcc abc.o –o abc abc.o:abc.c gcc –c abc.c • 使用方法 make target

More Related