Unix Workshop Aug 2014

Similar documents
Introduction to the Linux Command Line

Mills HPC Tutorial Series. Linux Basics I

Linux/Cygwin Practice Computer Architecture

AN INTRODUCTION TO UNIX

CSCI 2132 Software Development. Lecture 4: Files and Directories

MTU Computer Structure

Linux Command Line Primer. By: Scott Marshall

Chapter-3. Introduction to Unix: Fundamental Commands

CS CS Tutorial 2 2 Winter 2018

commandname flags arguments

Introduction to Unix: Fundamental Commands

Perl and R Scripting for Biologists

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

Introduction: What is Unix?

UNIX Quick Reference

Getting Started with UNIX

Introduction of Linux

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

A Brief Introduction to Unix

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

UNIX Quick Reference

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Computer Systems and Architecture

Session 1: Accessing MUGrid and Command Line Basics

Files

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

CS Fundamentals of Programming II Fall Very Basic UNIX

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

Introduction to Linux Environment. Yun-Wen Chen

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

CS4350 Unix Programming. Outline

Practical Session 0 Introduction to Linux

Files and Directories

CISC 220 fall 2011, set 1: Linux basics

Introduction to Linux

CS370 Operating Systems

Common UNIX Commands. Unix. User Interfaces. Unix Commands Winter COMP 1270 Computer Usage II 9-1. Using UNIX. Unix has a command line interface

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011)

Crash Course in Unix. For more info check out the Unix man pages -orhttp:// -or- Unix in a Nutshell (an O Reilly book).

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

Oxford University Computing Services. Getting Started with Unix

CHAPTER 1 UNIX FOR NONPROGRAMMERS

Introduction to Linux

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

Introduction to UNIX I: Command Line 1 / 21

Introduction to Linux Workshop 1

Linux Bootcamp Fall 2015

INTRODUCTION TO BIOINFORMATICS

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18

IMPORTANT: Logging Off LOGGING IN

Unix Essentials. BaRC Hot Topics Bioinformatics and Research Computing Whitehead Institute October 12 th

Introduction to Linux

CSCE 212H, Spring 2008, Matthews Lab Assignment 1: Representation of Integers Assigned: January 17 Due: January 22

Working With Unix. Scott A. Handley* September 15, *Adapted from UNIX introduction material created by Dr. Julian Catchen

An Introduction to Unix

CSE 390a Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

Computer Systems and Architecture

Getting Started With UNIX Lab Exercises

Introduction To Linux. Rob Thomas - ACRC

Introduction to Linux

Outline. Structure of a UNIX command

Laboratory 1 Semester 1 11/12

Chap2: Operating-System Structures

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

Linux Introduction Martin Dahlö Valentin Georgiev

Introduction to the UNIX command line

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

CENG 334 Computer Networks. Laboratory I Linux Tutorial

CS 261 Recitation 1 Compiling C on UNIX

Introduction to Linux

Introduction to Linux

User Guide Version 2.0

Unix Basics. Benjamin S. Skrainka University College London. July 17, 2010

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Introduction to Linux

Linux Tutorial. Ken-ichi Nomura. 3 rd Magics Materials Software Workshop. Gaithersburg Marriott Washingtonian Center November 11-13, 2018

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Using WestGrid from the desktop Oct on Access Grid

The Unix Shell & Shell Scripts

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Linux at the Command Line Don Johnson of BU IS&T

CSC209. Software Tools and Systems Programming.

STA 303 / 1002 Using SAS on CQUEST

ACS Unix (Winter Term, ) Page 92

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

Basic Shell Commands

Linux Introduction Martin Dahlö

Introduction to Linux

Transcription:

Unix Workshop 2014 5 Aug 2014

What is Unix Multitasking, multiuser operating system Often the OS of choice for large servers, large clusters

Unix Around You You re probably familiar with these: Linux Solaris Mac OS X (roots from FreeBSD and NetBSD) Many websites run on Unix

What is SunFire? In 2001: Full-sized rack Today: A solaris zone in a blade of a chassis quarter-size of a rack! 2m Virtual Machine

Activity: Login to NUSNET 1. Press Ctrl-Alt-Delete 2. Type in your NUSNET user name, password, and select the NUSSTU domain 3. Click the OK button

Activity: Create Your SoC Account https://mysoc.nus.edu.sg/~newacct Login using your NUSNET user name and password

Activity: Connecting to SunFire 1. From the desktop, launch the SSH Secure Shell Client application 2. Click on Quick Connect Host Name: sunfire.comp.nus.edu.sg User Name: Your SoC user name 3. Click on Connect 4. Click on Yes at the Host identification dialog 5. Enter your SoC password in the password dialog

The Shell This is a CLI

Unix Directory Tree / (root) bin dev home tmp usr a b bin sbin ahkow

Activity: Working With Directories

Working With Files Command cp <file1> <file2> mv <file1> <file2> mv <file> ~/<dir>/ rm <file> mkdir <dir> rmdir <dir> rm r <dir> Description Copy a file Move or rename a file Move file into a subdirectory Remove (delete) a file Create a subdirectory Remove (delete) a subdirectory Recursively remove subdirectory and its contents

Directory Contents -rw-r--r-- 1 sadm sadmg 2478 Jun 9 2009 test drwxr-xr-x 5 sadm sadmg 5 Jan 5 2011 work ^^^^^^^^^^ other group user type

Viewing Files Command cat <file> more <file> less <file> head <file> tail <file> Description Print out contents of file Print out contents of file page at a time Like above, but can go back and forth Show first few lines of file Show last few lines of file

Editing Files Several editors are available: pico / nano vi / vim Emacs Interactive vi/vim tutorial: http://www.openvim.com/tutorial.html

Shell Features Command history Filename completion Wildcards

Spying Around Command who w w <userid> last last <userid> last -3 <userid> Description See who are currently logged in See what programs users are running See what program this user is running Get login history of users Get login history of this user Get last 3 login records of this user

Getting Help Hel p man and apropos

Activity: Get Sample Files Run this in your shell: $ mkdir workshop $ cd workshop $ cp /tmp/uw/uw.zip. $ unzip uw.zip Check you got the samples: $ ls l gcd.c index.html wordlist.txt

Programming Workflow Edit Test Compile Run

Activity: Compiling and Running 1. C programs are compiled using the gcc compiler $ gcc gcd.c 2. To run a program, you must add./ in front of its name; the default name used by gcc is a.out 3. Run the GCD program $./a.out 4. Type in a pair of integers followed by the Enter key, for example: 58 24 5. Repeat step 4 as many times as you like 6. To quit the program, press Ctrl-D

Activity: Logging Out $ logout Logging out is important! To change your SoC password, go to: https://mysoc.nus.edu.sg/~myacct/resetpass.cgi

Printing SoC printers accessed via network Usually through client desktop or notebook (Windows, Mac, Linux, etc) Also central Unix servers Print queue management only possible through central Unix servers Command lpq P<printer> lprm P<printer> <id> pusage Description Check print queue of specified printer Remove job id from specified printer Check print quota

Processes and Disk Usage Command quota du du s * find chmod ps kill Description Check disk quota Check disk usage in each subdirectory Like above, but summarize at specified directories Find files Modify file permissions List processes Kill process

Pipes and Redirection Redirection: $ sort < wordlist.txt > sorted.txt Pipes: $ cat wordlist.txt sort less

Shell Initialization File ~/.profile ~/.bashrc Description Executed for login shells Executed for interactive non-login shells Used to setup the shell environment Examples: Setting of $PATH Setting command aliases

Activity: Setup Your Webpage Create public_html: $ mkdir ~/public_html Set the right permissions: $ chmod 711 ~ ~/public_html Put up a default index.html: $ cp index.html ~/public_html $ chmod 644 ~/public_html/index.html

Learning Unix on Your Own www.ubuntu.com

Unix on a Mac OS X is every bit Unix. Development tools in Xcode.

Useful Websites Secure SSH https://docs.comp.nus.edu.sg/sites/default/files/sshsecure ShellClient-3.2.9.exe Putty, SSH client: http://www.chiark.greenend.org.uk/~sgtatham/putty/ KiTTY, another SSH client for Windows: http://www.9bis.net/kitty/ Cygwin, UNIX-like environment for Windows: http://www.cygwin.com/ Description of computing facilities in SoC: https://docs.comp.nus.edu.sg/cf MySoC, intranet portal: https://mysoc.nus.edu.sg http://goo.gl/usydr4

Q&A Download slides: http://goo.gl/bnbhlb

Challenge Activity Look at the wordlist.txt file. Find: Determine the most frequently occurring word(s). How many times and what is/are the word(s)?

Thanks for attending Acad Day! Do give us your feedback at: http://tinyurl.com/otqt2ee