26
1 Intro to Linux - getting around HPC systems QuickTime™ and a TIFF (Uncompressed) decompressor are needed to see this picture. Himanshu Chhetri

1 Intro to Linux - getting around HPC systems Himanshu Chhetri

Embed Size (px)

Citation preview

Page 1: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

1

Intro to Linux - getting around HPC systems

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Himanshu Chhetri

Page 2: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

2

Introduction to Linux

In 1990, Linus Trovalds, a Finnish Computer Science student developed Linux.

He created the kernel but most of the supporting utilities was made by the GNU project of the Free Software Foundation.

He was inspired by Minix, a classroom teaching tool which closely resembled the Unix OS.

Linux is the result of the combined effort of many developers worldwide.

Page 3: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

3

HPCI Clusters

• HPCI maintains two clusters based on Linux distributions:

1.AZULazul.hpci.latech.edu (head node)138.47.102.117

2.ITANIUMitanium.hpci.latech.edu (head node)138.47.102.161

Page 4: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

4

Connecting to HPCI Cluster

From Windows 9x / 2003 Server / 2000 / XP / Vista:• PuTTY is a free software SSH, Telnet, rlogin, and

raw TCP client :

Page 5: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

5

Connecting to HPCI Cluster

From Linux/ Mac Os:• Open the terminal and use the command line

based ssh client:

Page 6: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

6

Accessing user files remotely:

From Windows 9x / 2003 Server / 2000 / XP / Vista:• WinSCP is an open source free SFTP client for

Windows using SSH.

Page 7: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

7

Accessing user files remotely:

From Linux/ Mac Os:• Open the terminal and use the command line

based scp client:

Page 8: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

8

Filesystem

• You are automatically placed in your home directory after logging in.

i.e. /home/user_name

Page 9: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

9

Directories

• Listing files/directories:

$ls

• Creating new directory and changing to it:

$mkdir dir_name

$cd dir_name

• Removing directory and all the files/subdirectories:

$rm -rf dir_name

Page 10: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

10

Working with permissions

• Display the permissions of current directory content:

$ls -la

• Safely changing permissions to allow read,write and execution of file:

$chmod 700 name_of_file

• Change permissions recursively:

$chmod -R dir_name

Page 11: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

11

File archiving : tar

• tar can save multiple files in a single file or do the vice versa

• Archiving a directory recursively:

$ tar cvf name_of_archive.tar directory_name/

• Extracting a tar archive contents:

$tar xvf name_of_archive.tar

Page 12: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

12

File Compression : gzip

• gzip is frequently used together with tar to archive and compress files:

$gzip name_of_archive.tar

name_of_archive.tar.gz is the resultant file

• Uncompressing “.tar.gz” files:

$tar xzvf name_of_archive.tar.gz

• gunzip command uncompresses “.gz” files.

Page 13: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

13

Text Editors:

The systems have different kinds of text editors for editing source code,configuration files or plain text:

• vim : improved version of vi. Widely used.• nano : enhanced version of pico editor.• emacs : advanced text editor that offers additional

features like sending/receiving emails and lisp interpreter

• ed : It is a simple line-oriented text editor

Page 14: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

14

Managing processes : ps

• report a snapshot of all the current processes:

$ps -ef| more

• show processes only run by certain user. Eg: show all processes being run by user hch018

Page 15: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

15

Managing processes : top

• top command displays real time view of running processes and other related information:

• $top -u user_name

Page 16: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

16

Managing processes : kill

• kill command terminates a process• Process need to terminated in situations like if it

cannot terminate normally. Eg : $kill -9 PID

Page 17: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

17

User security : password

• passwd command can be used to change the user's password:

• Compromise of a user account can be prevented to a great extent with a strong password.

Page 18: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

18

User Security : permissions

• chmod can be used to prevent other users from accessing files/directories owned by a rightful user.

• In above example chmod recursively gives appropriate permission only to user : hch018

Page 19: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

19

User security : file integrity

• md5sum command generates a unique 128 bit checksum for a file. This is useful in verifying file integrity.

• Many open source projects provide md5 checksum for their packages.

Page 20: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

20

Help/Documentation : man

• man command displays the manual page for a particular command/utility. Eg:

Page 21: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

21

Network utilities : ping

• ping is a useful utility to check network connectivity.

Page 22: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

22

Available compilers:

• gcc (GNU C Compiler):

This is used to compile C programs

• g++(GNU C++ Compiler):

This is used to compile C++ programs

• as / ld

These are used to assemble and link assembly programs.

Page 23: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

23

Available Interpreters / Scripting:

• python

Compiler for the high level programming language.

• perl

Compiler for the dynamic,interpreted high level language.

• gawk

Compiler for awk : designed to process text data.

Page 24: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

24

Resources :

• Official HPCI website:

http://hpci.latech.edu

• Official HPCI mailing list:

http://hpci.latech.edu/mailman/listinfo/hpc_users

• Alphabetical Directory of Linux Commands

http://www.linuxdevcenter.com/linux/cmd/

Page 25: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

25

Downloads:

• Putty

http://www.chiark.greenend.org.uk/~sgtatham/putty/

• Winscp

http://winscp.net/eng/download.php

• Linux FAQs, Guides and HOWTOs

http://tldp.org/

Page 26: 1 Intro to Linux - getting around HPC systems Himanshu Chhetri

March 12, 2007

26

END

Demo Of HPCI website and

account request