Getting Started with UNIX

Similar documents
Getting Started With UNIX Lab Exercises

Using the Zoo Workstations

Mills HPC Tutorial Series. Linux Basics I

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

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

Introduction to the UNIX command line

Introduction to the Linux Command Line

AN INTRODUCTION TO UNIX

CS Fundamentals of Programming II Fall Very Basic UNIX

Std: XI CHAPTER-3 LINUX

Oxford University Computing Services. Getting Started with Unix

Unix Workshop Aug 2014

Lab Working with Linux Command Line

Unix Tutorial Haverford Astronomy 2014/2015

CS CS Tutorial 2 2 Winter 2018

History. Terminology. Opening a Terminal. Introduction to the Unix command line GNOME

commandname flags arguments

CENG 334 Computer Networks. Laboratory I Linux Tutorial

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

Tiny Instruction Manual for the Undergraduate Mathematics Unix Laboratory

CISC 220 fall 2011, set 1: Linux basics

Part I. Introduction to Linux

Introduction to Linux Workshop 1

CSCI 2132 Software Development. Lecture 4: Files and Directories

Introduction to Linux. Fundamentals of Computer Science

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

Chapter-3. Introduction to Unix: Fundamental Commands

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

Practical Session 0 Introduction to Linux

LAB #5 Intro to Linux and Python on ENGR

Parallel Programming Pre-Assignment. Setting up the Software Environment

CS4350 Unix Programming. Outline

Outline. Structure of a UNIX command

Introduction: What is Unix?

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Tutorial 1: Unix Basics

Introduction to Unix: Fundamental Commands

Session 1: Accessing MUGrid and Command Line Basics

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

Introduction to Linux Environment. Yun-Wen Chen

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

CS 2400 Laboratory Assignment #1: Exercises in Compilation and the UNIX Programming Environment (100 pts.)

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

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

Linux/Cygwin Practice Computer Architecture

C++ Programming on Linux

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.

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Lab 1 1 Due Wed., 2 Sept. 2015

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based.

Intermediate Programming, Spring Misha Kazhdan

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Computer Systems and Architecture

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

Working with Basic Linux. Daniel Balagué

Table Of Contents. 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands

INTRODUCTION TO BIOINFORMATICS

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

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

Editors in Unix come in two general flavours:

Unix Filesystem. January 26 th, 2004 Class Meeting 2

STA 303 / 1002 Using SAS on CQUEST

Using the Unix system. UNIX Introduction

Linux hep.wisc.edu

Short Read Sequencing Analysis Workshop

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

Introduction. SSH Secure Shell Client 1

Introduction to Linux

Lab 1 Introduction to UNIX and C

Introduction to Linux for BlueBEAR. January

5/8/2012. Creating and Changing Directories Chapter 7

UNIX Quick Reference

Getting started with Hugs on Linux

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

Perl and R Scripting for Biologists

Introduction to Linux Basics

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

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

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

Operating Systems and Using Linux. Topics What is an Operating System? Linux Overview Frequently Used Linux Commands

AMS 200: Working on Linux/Unix Machines

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

h/w m/c Kernel shell Application s/w user

OFFICE OF INFORMATION TECHNOLOGY

Helsinki 19 Jan Practical course in genome bioinformatics DAY 0

Lab 1 Introduction to UNIX and C

Linux Command Line Primer. By: Scott Marshall

Using WestGrid from the desktop Oct on Access Grid

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

An Introductory Tutorial on UNIX

Getting started with Hugs on Linux

The Directory Structure

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie

Introduction to UNIX. SURF Research Boot Camp April Jeroen Engelberts Consultant Supercomputing

User Guide Version 2.0

The Unix Shell & Shell Scripts

An Introduction to Unix

Transcription:

Getting Started with UNIX What is UNIX? Boston University Information Services & Technology Course Number: 4000 Course Instructor: Kenny Burns Operating System Interface between a user and the computer hardware UNIX is to a workstation as DOS is to a PC AIX is a version of UNIX which runs on the ACS cluster (ACS1, ACS2, ACSRS1, etc.), IBM RS/6000 systems, Information Services & Technology s s primary computing platforms for academic use From ACS you can exchange electronic mail and data with other Internet sites Why use UNIX? Connecting to ACS Can support a large number of users, e.g. almost 50,000 accounts on ACS Provides access to many UNIX software packages and tools such as Interleaf, Mathematica,, SAS, etc. ACS can host your personal Web page You may need to use UNIX for some ACS account administration If you have your own computer and only want to use electronic mail and/or surf the Web, you probably don t need to use UNIX PuTTY is available for SSH connections on PCs in Information Technology computing labs PuTTY (PC) is available for download at www.bu.edu/tech/help/acs/software SSH is built into Mac OS X. X-Win32 The Host Menu X-Win32 is a PC-based X-Windows X emulator available in Information Services & Technology computing labs To run X-Win32 X on a lab PC first log into the PC and then double-click on the X-Win32 icon on the PC desktop X-Win32 is available for free download to members of the B.U. community at www.bu.edu/tech/help/acs/software ech/help/acs/software (Exact display may vary) Course 4000: Getting Started with UNIX Slides, August 25, 2009. Page 1

Entering the Username and Password The Kerberos Password (Note: The password will not be echoed to the screen) The primary safeguard for your account Case sensitive Must be ten to fifteen characters in length Must contain at least two changes in case Must contain at least one digit or punctuation character Cannot be a name or a word which appears in the dictionary You should not share your password with anyone The X-Windows X Environment Message of the Day (MOTD) Console Window Work Window Welcome to the ACS cluster: * ACS - an IBM RS/6000 F50 running 32-bit AIX 5.2.0 * ACS1 - an IBM RS/6000 F50 running 32-bit AIX 5.2.0 * ACS2 - an IBM RS/6000 F50 running 32-bit AIX 5.2.0 * ACS3 - an IBM RS/6000 43P running 32-bit AIX 4.3.3 * ACS4 - an IBM RS/6000 615 running 64-bit AIX 5.2.0 * ACS5 - an IBM RS/6000 43P running 32-bit AIX 4.3.3 * ACS6 - an IBM RS/6000 43P running 32-bit AIX 4.3.3 Type "clustat" to see the status of the ACS machines. Message of the Day text Notification of last login Setting terminal type Use of this machine is governed by the Boston University Conditions of Use and Policy on Computing Ethics; see www.bu.edu/computing/ethics or type "ethics" for details. Icon Manager MOTD Window See www.bu.edu/cc for an introduction to the ACS cluster as well as detailed information on many services and applications. Problems or questions? Send mail to "help". ------------------------------ System News ------------------------------- 1 unsuccessful login attempt since last login. Last unsuccessful login: Wed Aug 12 17:04:27 2009 on /dev/pts/65 from ACSRS1.BU.EDU Last login: Fri Aug 21 17:00:41 2009 on /dev/pts/24 from ACSRS3.BU.EDU TERM = (vt100) acs[tuta0]% Reading System Messages (msgs( msgs) Logging out of UNIX Public messages regarding system matters, e.g. new software, system downtime, etc. Not to be confused with reading your personal e-maile y Read message n Skip (flush) message q Postpone reading messages Messages longer than one screen are processed through the more program. Press space to see the next screen or type q to quit Type logout or exit or Ctrl-d Control sequences are typed by holding down the Ctrl key and pressing the second key In an X-Windows X connection, you must log out from the Console window in the upper left corner of your display Failure to properly log off the system may result in your account being compromised! Remember to log off a computing lab PC after exiting the X-Win32 program Course 4000: Getting Started with UNIX Slides, August 25, 2009. Page 2

Special UNIX Control Characters The UNIX File System / (root) Ctrl-s Ctrl-q Ctrl-u Ctrl-c Ctrl-l Interrupt (pause) output to the screen Resume output to the screen Delete text to the beginning of the line Interrupt or cancel a command Refresh the screen /u2/grad/fred (Home Directory) bin /u2/grad fred grad usr mary staff u2 /u2 fac myfile Other homework john business mary /u2/grad/fred/other/john project paper Absolute and Relative Path Names Directory Navigation Absolute Path Name Always begins with a / Fully and uniquely describes a point in the file system Relative Path Name Never begins with a / Describes a point in the file system relative to the current working directory pwd Display the name of the current working directory Change the current working directory.. Change the current working directory to the parent of the current directory Change the current working directory to the home directory Create a new directory cd directory cd.. cd mkdir directory rmdir directory Remove an empty directory ls ls a ls l ls F Examining Directory Contents List contents of the current working directory List all contents, including hidden dot files List contents in long format List contents, marking special files: A trailing / indicates a directory A trailing * indicates an executable file These markers are not part of the filename! Flags can be combined, e.g. ls -alf File Permissions - r w x r - x - - - File Type User Group Other r Read permission w Write (modify) permission x Execute permission - Permission Denied Course 4000: Getting Started with UNIX Slides, August 25, 2009. Page 3

Changing File Permissions Using the chmod Command Use the chmod command to change UNIX file permissions: u Change permissions for the owner g Change permissions for the group o Change permissions for other + Add a permission - Remove a permission r Read permission w Write permission x Execute permission Examples of using the chmod command: chmod o-rx filename (Remove read/execute permission for other) chmod u+rwx,go+rx filename (Add all for user, read/execute for group & other) (Note: no space after the comma!) chmod o+rx. (Add read/execute for other on current directory) Viewing Text (ASCII) Files Lab Exercise One less filename more filename Space Return View a text file, one page at a time Functions similar to less command Advance one screen Advance one line b Go back one screen q Quit Logging into ACS Using the File System Changing File Permissions Viewing Text Files Lab Exercise One Instructions Manipulating Files Connect to a machine in the ACS cluster. Type your tutorial login name at the login: login: prompt: login: tuta# (substitute the number on the front of your computer for #; don t t leave a space before the #) password: PASSWORD cp original-file new-file Make a copy of an existing file mv original-file new-file Move or rename an existing file On ACS, mv has been aliased to mv -i rm filename Remove (delete) a file rm i filename On ACS, rm rm r directory Interactive removal of a file rm -i Remove a directory and all of its contents rm has been aliased to rm Course 4000: Getting Started with UNIX Slides, August 25, 2009. Page 4

Some More Special Characters Printing Files TAB Fills in remaining characters after significant characters have been typed Cycle up through previous commands Cycle down (after using the up arrow) ~ References a home directory * Wildcard matches zero or more characters Pipe direct output to another application Treat filenames in quotes literally lpr filename lpr Pprinter filename Prints a file on the default printer Prints a file on a different printer www.bu.edu/myprint to After submitting a print job, visit www.bu.edu/myprint release the print job. To view a list of available printers visit www.bu.edu/tech/help/myprint Quotas Resources are limited and are shared by many people quota Displays disk quota and usage Quota usage may also be monitored on the Web at www.bu.edu/computing/myacs Mail quota usage is monitored via MyACS page Printer sheets may be monitored at www.bu.edu/myprint Emacs A Text Editor At the command prompt type: emacs filename Used to manipulate text in plain (ASCII) files You will lose your work if you start Emacs without specifying a filename and don t t explicitly save your work to a named file. To avoid this, always specify a filename to edit when starting Emacs. The Control and Meta Keys in Emacs Moving the Cursor in Emacs Used in conjunction with other keys to enter commands On most keyboards, the Meta key is the Escape (ESC) key C-x means hold down the Ctrl key and press x M-x means press and release the ESC key, then press x C-b or Backward C-f or Forward C-p or Previous line C-n or Next line C-a Beginning of the current line C-e End of the current line C-v Next screen M-v Previous screen M-< Top of file M-> Bottom of file Course 4000: Getting Started with UNIX Slides, August 25, 2009. Page 5

Using Emacs to Edit Text Saving Changes to a File in Emacs Inserting Text Deleting Text Position cursor and type Terminal backspace key Delete to end of line Undo changes C-k Delete to end of line C-x x u or C-_ C-g Cancel a command C-x x C-sC Save and continue editing Due to conflicts with the system s s interpretation of C-s as hold screen, on some terminals C-s has been remapped to C-\,, so the save and continue command on such terminals becomes C-x x C-\ C Exiting Emacs Help with Emacs C-x x C-cC Save and exit Emacs If changes have been made to the file since the last save, you will be asked if you want to save these changes. A notable exception: If you started Emacs without specifying a filename and haven t t saved your work to a named file, you will not be asked if you want to save changes and you will lose your work. To avoid this, always specify a filename when starting Emacs Emacs command list function: C-x x p Free handout: Getting Started with Emacs Online manual page: man emacs Emacs reference manuals and books Manual Pages Help Information on the Web man command apropos topic Read manual page about command List commands associated with topic General ACS help is available on the Web at: www.bu.edu/tech/help/acs Copies of many handouts are available at: www.bu.edu/t /tech/help/handouts Course 4000: Getting Started with UNIX Slides, August 25, 2009. Page 6

Getting Help in Person Getting Help Through E-mailE IT Help Center 533 Commonwealth Avenue 617/353-HELP (4357) IT Help Center @ Mugar Library Mugar Library, First Floor For UNIX help, send mail to help on most machines, e.g. help@acs.bu.edu for ACS support For PC and Mac help, send mail to ithelp@bu.edu Departmental Consultants Reference Books Department of Mathematics Timothy Kohl - MCS 235; 617/353-8203; tkohl@bu.edu Sargent College Barbara Passoff SAR 543; 617/353-0818; bpassoff@bu.edu Learning the UNIX Operating System (174 pages, O Reilly O & Associates, Inc.) UNIX in a Nutshell (906 pages, O Reilly O & Associates, Inc.) GNU Emacs Manual by Richard M. Stallman (644 pages, Free Software Foundation) Learning GNU Emacs (534 pages, O Reilly O & Associates, Inc.) Lab Exercise Two Getting Started with UNIX Manipulating Files Displaying Quotas Using Emacs Using Online Help Functions Please remember to log off and complete your evaluation Boston University Information Services & Technology Course Number: 4000 Course Instructor: Kenny Burns Thank you! Course 4000: Getting Started with UNIX Slides, August 25, 2009. Page 7