City Cluster Quickstart
Lien-Chi Lai, COLA Lab, Department of Mathematics, NTU2010/05/11
To Login “City Cluster”
City Cluster Quickstart2
On Mac: Launch “終端機”
$ ssh [email protected] $ ssh –X [email protected]
(to enable X11 forwarding)
To Transfer Files
City Cluster Quickstart3
$ sftp [email protected] download files:
get filename mget foo*.c
upload files: put foo1 mput foo*.c
scp secure remote file copy program $ scp [email protected]:~/filepath .
SSH Secure Shell (on Windows) : to Login
City Cluster Quickstart4
Download and install “SSH Secure Shell” http://www.colorado.edu/its/security/SSHSecureSHellClient.exe
SSH Secure Shell: to transfer files
City Cluster Quickstart5
SSH Secure Shell: to transfer files
City Cluster Quickstart6
Basic Linux Commands
City Cluster Quickstart7
pwd print current working directory man on-line reference manuals
e.g. $ man pwd mkdir make directories
e.g. $ mkdir dir_name ls list directory contents
e.g. $ ls or ls dir_name/ cd change directory
e.g. $ cd dir_name/ rm remove files or directories
e.g. $ rm -r dir_name/ cp copy files and directories
e.g. $ cp file_scr file_dst
MATLAB
City Cluster Quickstart8
Graphic User Interface (GUI) $ ssh -X [email protected] $ matlab
No GUI ssh [email protected] $ matlab -nojvm
Editors
City Cluster Quickstart9
vi a programmers text editor $ vi filename
emacs a programmers text editor $ emacs filename
gedit simple text editor for GNOME $ gedit or gedit filename
GCC
City Cluster Quickstart10
gcc C and C++ compiler e.g. $ gcc hello.c -o hello (compile test.c) $ ./hello (execute hello)
// C programming for Hello World#include <stdio.h>
int main(){
printf(“Hello World!!\n”);
return 0;}
FORTRAN
City Cluster Quickstart11
Edit “hello.f90” Compile:
$ ifort hello.f90 Run
$ ./a.out
Program Hello
implicit none
write (*,*) ‘Hello, World.’
end
Virtual Network Computing (VNC)
City Cluster Quickstart12
VNC 可將遠端平台的畫面顯示至本地端,並可遙控操作。
遠端與本地端的平台作業系統無須相同, Linux, Windows,… 等皆可。
參考網址: http://www.uk.research.att.com/vnc/ http://www.realvnc.org/ http://www.vnc.org/
VNC
City Cluster Quickstart13
On server side (e.g. city.math.ntu.edu.tw) vncserver :2 launch VNC server with port 5802 vncpasswd change VNC password vncserver -kill :2 close VNC server at port
5802
On local side Go to http://city.math.ntu.edu.tw:5802 Use VNC Viewer to connect city.math.ntu.edu.tw:5802
Reference
City Cluster Quickstart14
http://linux.vbird.org/