220 likes | 393 Views
Quick Start & Linux C heat Sheet. Chien - Chih Huang , Department of Mathematics, National Taiwan University 2011/07/1. Outline. Quick Start SSH Secure Shell (on Windows) Editor and Programming Language Run a Program in Background Linux Cheat Sheet File Command Process Management SSH
E N D
Quick Start & Linux Cheat Sheet Chien-Chih Huang, Department of Mathematics, National Taiwan University2011/07/1
Outline • Quick Start • SSH Secure Shell (on Windows) • Editor and ProgrammingLanguage • Run a Program in Background • Linux Cheat Sheet • File Command • Process Management • SSH • System Info • Compression • X window • Xming (X Window for Windows) • Configuring and Running Xming and SSH • Reference
Quick Start Quick Start & Linux Cheat Sheet
SSH Secure Shell (on Windows) • Download: • www.math.ntu.edu.tw/~wwang/cola_lab/knowledge/download/Bootcamp/SSHSecureShellClient.exe • Install “SSH Secure Shell” • Open “SSH Secure Shell” • Quick connect • Input • Host name: annarbor • User name: guest10## • Password: cssd2011 IP:140.112.51.206 Quick Start & Linux Cheat Sheet
SSH Secure Shell (on Windows) • Change Password • yppasswd [guest1037@annarbor ~]$ yppasswd Changing NIS account information for guest1037 on moma.math.ntu.edu.tw. Please enter old password: Changing NIS password for guest1037 on moma.math.ntu.edu.tw. Please enter new password: Please retype new password: The NIS password has been changed on moma.math.ntu.edu.tw. [guest1037@annarbor ~]$ Quick Start & Linux Cheat Sheet
SSH Secure Shell (on Windows) • File Transfer Quick Start & Linux Cheat Sheet
Editor and ProgrammingLanguage • Editor • vi • emacs (gui) • gedit (gui) Quick Start & Linux Cheat Sheet
Editor and ProgrammingLanguage • ProgrammingLanguage • Matlab: • C/C++: gcc, icc • Fortran 95:ifort Quick Start & Linux Cheat Sheet
MATLAB • Graphic User Interface(GUI) • $ ssh –X username@host • $ matlab • NO GUI(X window) • $ sshusername@host • $ matlab -nojvm Quick Start & Linux Cheat Sheet
GCC • gcc: C and C++ compiler E.g. • $ gcchello.c –o hello compile • $ ./hello execute // hello.c #include <stdio.h> int main(){ printf(“Hello World!!\n”); return 0; } Quick Start & Linux Cheat Sheet
Fortran • Edit “hello.f90” • Compile: • $ ifort hello.f90 • Run: • $ ./a.out hello.f90 Program Hello Implicit none write (*,*) ‘Hello, World.’ end Quick Start & Linux Cheat Sheet
Run a program in background • $ ./a.out>log_a& • $ more log_a • $ ./hello >log_hello& • $ more log_hello • $ nohupmatlab–nodisplay <code.m>log_m& • $ more log_m Quick Start & Linux Cheat Sheet
Linux Cheat Sheet Quick Start & Linux Cheat Sheet
Linux Cheat Sheet Quick Start & Linux Cheat Sheet
Linux Cheat Sheet Quick Start & Linux Cheat Sheet
Linux Cheat Sheet Quick Start & Linux Cheat Sheet
Linux Cheat Sheet Quick Start & Linux Cheat Sheet
X Window Quick Start & Linux Cheat Sheet
X Window • A basis for graphical user interfaces(GUI) for networked computer • Unix-like: • Unix • Linux • Mac OS X • $sshusername@host-X Quick Start & Linux Cheat Sheet
Xming (X Window for Windows) • Download • http://sourceforge.net/projects/xming/files/Xming/6.9.0.31/Xming-6-9-0-31-setup.exe/download • Install “Xming-6-9-0-31-setup.exe” • Open “Xming” Quick Start & Linux Cheat Sheet
Configuring and Running Xming and SSH • Start the Secure Shell Client by clicking on Start/Programs/SSH Secure Shell/Secure Shell • In the Secure Shell Client click on Edit/Settings. • In the Settings window on the left-hand side click on the + next to Profile Settings. • Click on Tunneling. • On the right-hand side of the window, make sure there is a check next to the words Tunnel X11 Connections • On the left-hand side of the window, click on Authentication. Make sure there is a check next to the words "Enable for SSH2 Connections.“ • Click OK. • Click File/Save Settings. Quick Start & Linux Cheat Sheet
Reference • http://www.math.ntu.edu.tw/~wwang/cola_lab/knowledge/kb_tools/ • Linux (a) MSI Unix Tutorial; (b) Basic Commands; (c) 鳥哥的私房菜:計算機概論,Linux是什麼, 程序管理,正規表示法與文件格式化處理 (含 sed, awk) • http://www2.cs.purdue.edu/help/SSH/ssh.htm • http://files.fosswire.com/2007/08/fwunixref.pdf Quick Start & Linux Cheat Sheet