• 沒有找到結果。

Getting Start

N/A
N/A
Protected

Academic year: 2022

Share "Getting Start"

Copied!
12
0
0

加載中.... (立即查看全文)

全文

(1)

Getting Start

(2)

• For students does not have a login account or forgot your password, please check 217 TA

during office hours.

• We have 20 linux machines, and the host name is “linux1.csie.ntu.edu.tw”, 1 can be replaced with 2~20.

• Note that linux15 is reserved for daily use.

DO NOT RUN COMPUTING-INTENSIVE JOBS!

(3)

How to Login

• Pietty/Putty http://ntu.csie.org/~piaip/pietty/

(4)

How to Transmit Files

• FileZilla

– Port 22

• wget

– only for download

(5)

Linux Tips

• Tab is your good friend

• cd brings you home

• ./ means current directory

• ../ means parent directory

• / means root directory

• *

• http://mrtg.csie.ntu.edu.tw/status.html

• Network File System v.s Local File System

(6)

Basic Commands

• man Online manual

• cd Change directory

• pwd Present working directory

• ls List directory contents

• cp SOURCE DEST Copy files to directory

• mkdir

• mv SOURCE DEST Move or rename

(7)

• rm Remove(沒有資源回收桶,請小心)

• rmdir

• cat, more, head, tail Reading Files

• du Estimate file space usage

• passwd Change password

(8)

Running Jobs

• Process management:

– ps 顯示process 狀態

– top 類似 ps 但提供動態的資訊更新 – kill 刪掉正在執行的 process

– Ctrl + c 中斷目前的命令 – 背景執行 : ctrl + z , bg , &

• 按下 Ctrl + z 會暫停目前的命令

• bg [jobspec] 會將暫停的命令放到背景執行

• 輸入命令時在最後端補 & 符號,會直接在背景執行

• fg 把背景執行的命令拉回前景

(9)

Vi / Vim

• Vi 是 linux 下常用的編輯器

– 剛開檔時是指令模式

• 在任何模式下按 esc 可回到指令模式

• 按 v 可選取範圍,選完後按 y 是複製,c 是剪下,p 是貼上

• u 是復原

• 按:可輸入命令

– :q 不存檔離開

– :q! 強制不存檔離開 – :wq 存檔離開

– :w 存檔

– 按 i 進入插字模式

– 如果按到 ctrl-s ,按 ctrl-q 它就死而復生

(10)

Compile and Makefile

• gcc / g++

– Default output a.out, change by option “–o”

• Makefile/makefile

– make

– make run – make clean

(11)

檔案權限

• User, Group, Others

• Read(r), Write(w), Execution(x)

• Encoded as bit string.

– rwx-rwx-rwx(777) – rwx--wx---- (750) – rwx--- (700)

• Protect your homework form plagiarism is your responsibility

• chmod 700 filename

(12)

Learn More by Yourself

• http://linux.vbird.org/linux_basic/

• http://www.gnu.org/software/make/manual/

make.html

• http://www.cplusplus.com/reference/

參考文獻

相關文件

5、Log in Microsoft office o365 Account:XXXXXXXX( Student ID)@o365.ntou.edu.tw ( “o”is English alphabet ). password: the same as the password in school Academic

• Next, work with your group mates and design either a lesson plan or a longer term action plan for implementing RWaC..  You have approximately15 minutes to design

 Providing participants with opportunities to design appropriate tasks and activities to help students develop their skills in selecting, extracting, summarising and

The teacher needs to plant the seed for ideas by describing a conflict before asking the students to start writing the acrostic script.. Once the students have read and understood the

(A) think differently about when to start a family (B) do not find family as important as their parents did (C) want many different things when they start a family (D) have

Does your cat like water or milk?. It likes water./ It

If a teacher manager or alternate teacher manager vacancy arises (due to the expiry of term of office, resignation tendered by the manager during the term of office, or ceasing to

A12: Although regular School ExOs within the approved non-teaching staff establishment of aided schools are administrative staff of schools, the arrangements