Tiny Instruction Manual for the Undergraduate Mathematics Unix Laboratory

Similar documents
Tutorial 1: Unix Basics

Introduction to Unix - Lab Exercise 0

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

Windows XP. A Quick Tour of Windows XP Features

Getting Started with UNIX

CMSC 201 Spring 2018 Lab 01 Hello World

Using the Zoo Workstations

Practical Session 0 Introduction to Linux

CMSC 201 Spring 2017 Lab 01 Hello World

Linux File System and Basic Commands

Unix Tutorial Haverford Astronomy 2014/2015

Getting Started With UNIX Lab Exercises

STA 303 / 1002 Using SAS on CQUEST

Lab Assignment #1. University of Pittsburgh Department of Electrical and Computer Engineering

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

Computer Basics Written by Brian O'Rooney. Copyright 2000 Nanaimo Literacy Association All rights reserved

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

CS CS Tutorial 2 2 Winter 2018

Lab 1 1 Due Wed., 2 Sept. 2015

There are six main steps in creating web pages in FrontPage98:

Part I. Introduction to Linux

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

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Parallel Programming Pre-Assignment. Setting up the Software Environment

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

Laboratory 1: Eclipse and Karel the Robot

UNLV Computer Science Department CS 135 Lab Manual

AN INTRODUCTION TO UNIX

Introduction to Linux. Fundamentals of Computer Science

Guided Tour (Version 3.3) By Steven Castellucci as Modified by Brandon Haworth

CSE115 Lab exercises for week 1 of recitations Spring 2011

Introduction. File System. Note. Achtung!

Get comfortable using computers

Acrobat X Professional

CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse

To start Kidspiration on a Macintosh: Open the Kidspiration 3 folder and double-click the Kidspiration icon.

The Directory Structure

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

EXCEL BASICS: MICROSOFT OFFICE 2007

Getting Started (1.8.7) 9/2/2009

Basics of Stata, Statistics 220 Last modified December 10, 1999.

Part 1: Understanding Windows XP Basics

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

Refresher workshop in programming for polytechnic graduates General Java Program Compilation Guide

ENCM 339 Fall 2017: Editing and Running Programs in the Lab

The first time you open Word

You should see something like this, called the prompt :

Mills HPC Tutorial Series. Linux Basics I

Introduction to Personal Computing

Guided Tour (Version 3.4) By Steven Castellucci

Physics REU Unix Tutorial

EXCEL BASICS: MICROSOFT OFFICE 2010

Introduction to Unix and Matlab

ORF 201 Computer Methods in Problem Solving. Lab 2: My House, My Home (Page)

Oxford University Computing Services. Getting Started with Unix

Instructions PLEASE READ (notice bold and underlined phrases)

Introduction to Microsoft Windows

CHEM5302 Fall 2015: Introduction to Maestro and the command line

Helpful Tips for Labs. CS140, Spring 2015

EDTE 330A/B. Educational Technology in the Classroom: Applications and Integrations

CENG393 Computer Networks Labwork 1

Introduction to Unix and Linux. Workshop 1: Directories and Files

FACULTY AND STAFF COMPUTER FOOTHILL-DE ANZA

RAM JAYAM VIDYAA MANDIR MATRIC HR SEC SCHOOL. Cumbum. Theni district. 1 D.EASWARAN M.Sc B.Ed Computer Instructor RJMS_SCHOOL.

FILE MAINTENANCE COMMANDS

Matlab = Matrix Laboratory. It is designed to be great at handling matrices.

UNLV Computer Science Department CS 135 Lab Manual

Introduction. SSH Secure Shell Client 1

Google Docs: Access, create, edit, and print

5. A small dialog window appears; enter a new password twice (this is different from Dori!) and hit Go.

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

Session 1: Accessing MUGrid and Command Line Basics

Chapter-3. Introduction to Unix: Fundamental Commands

Touring the Mac. S e s s i o n 3 : U S E A N APPLICATION

CS 1110 SPRING 2016: GETTING STARTED (Jan 27-28) First Name: Last Name: NetID:

DEPARTMENT OF MATHEMATICS. RAMLab User Guide. An Introduction to the Ryerson Applied Mathematics Laboratory

Linux hep.wisc.edu

AMS 200: Working on Linux/Unix Machines

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

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]

SolidWorks Intro Part 1b

Introduction to Linux Spring 2014, Section 02, Lecture 3 Jason Tang

SolidWorks 2½D Parts

Intro to Microsoft Word

Figure 1: My Blocks are blue in color, and they appear in the Custom palette in NXT-G.

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

User Guide Version 2.0

WORD PROCESSING FOR SALE. By Shel Silverstein

The Mathcad Workspace 7

Unit 10. Linux Operating System

Outline. Structure of a UNIX command

FACULTY AND STAFF COMPUTER FOOTHILL-DE ANZA. Office Graphics

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Introduction to MS Word XP 2002: An Overview

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

Easy Windows Working with Disks, Folders, - and Files

Windows 10: Part 2. Updated: May 2018 Price: $1.80

Getting Started With Linux and Fortran Part 2

Introduction to Linux

Essential Linux Shell Commands

Transcription:

Tiny Instruction Manual for the Undergraduate Mathematics Unix Laboratory 1 Logging In When you sit down at a terminal and jiggle the mouse to turn off the screen saver, you will be confronted with a window that lists the available hosts. At the present time they are abacus, alto and plato. Click on one of them to select it (it will turn black) and then click on OK. After a short while the login screen will appear. This screen has a white box titled Welcome to UBC Mathematics containing two fields for data login and Password. The cursor (a vertical bar) should be just after the word login. If it isn t, hit the Return key once or twice until it is. To log in 1. Type your login id (the one that resembles your name) and hit Return. 2. The cursor should now be in the next field, Password. Type your password here and hit Return. (The cursor will not move while you type your password - this helps keep it a secret!) 3. If all went well, the login screen will disappear, and several seconds later a small clock and a tool bar will appear on your screen. If this doesn t happen, you probably made a mistake when you typed your login id or password in and you will see Login incorrect at the bottom of the entry box. Just return to step 1 and continue the login procedure. Be sure that the Caps Lock light is not on! If it is, press the Caps Lock key to turn it off. Be sure to look at section 5 to see how to change your initial password to one that you can remember. 2 Logging out Once you have logged in, you need to know how to leave. If you don t log out properly, your account can be accessed by unscrupulous people who could erase your files or otherwise make your life miserable. To leave: 1. Click the quit button on the tool bar. 2. Wait and make sure that the default hosts screen from section 1 appears. 3 X Windows in a Hurry The windowing environment used in the laboratory is called X Windows. It works similarly to other windowing environments such as Windows on PC s and the Macintosh user interface. However, X Windows is less consistent than these other systems and takes some getting used to. Every window is surrounded by a frame. The frame is used to move, resize and otherwise manipulated the window. The frame itself is divided into different components: the buttons, the title bar, and the edges.

The title bar is the section in the upper centre that contains a label for the window, in this case xterm. There is one button on the left containing a rectangle, and two buttons on the right, one with a small square and one with a large square. The rest of the frame is the edge, which is itself divided as you can see into corner sections and side sections. To move a window, click the left mouse button down on the title bar, drag the mouse to the new location, and lift up on the left mouse button. To resize the window, click the left mouse button down on any edge, drag the mouse to the desired size for the window, and release the left mouse button. If you resize using a corner section you will be able to make any size you want, whereas if you use a side section, you will be able to resize in one direction only. To get windows out of the way, you can iconify them. By pressing the button with the small square with the left mouse button, the window will disappear and be replaced by a small icon on the screen like this: You can restore the icon to the original window by double clicking on the icon with the left mouse button. You will see a couple of windows already iconified when you log in. To close a window, double click on the left title bar button with the left mouse button. Since the windowing system allows several windows to be open at once, there has to be a way to select what window is the one currently being used. To do this, just click on the window s title bar with the left mouse button. The colour of the frame will change to let you know that this is the active window, and everything you type will now be sent to this window. 4 The UNIX Command Line One way to give instructions to the computer is through a text window interface to UNIX. You can create such a window by clicking on the xterm button on the tool bar. This window is something like a MS-DOS shell, inasmuch as a bacterium is something like a human being. From here you will be able to manipulate the file system and start programs.

Files in UNIX are organized into containers called directories. Every user has their own personal (home) directory to store files in. What is more, you can organize your files by creating directories within your home directory and storing files in them. At any given time there is a directory, called the current directory, that your UNIX commands apply to. This is best explained with an example. You can see what files you have in the current directory by typing ls (the equivalent of the MS-DOS command dir) at the command prompt, like this (this is just an example, your files will be different): (maxwell@alto.151) ls total 6 -rw-r--r-- 1 grad 924 Aug 26 1996 lab1a.class -rw------- 1 grad 887 Aug 26 1996 lab1a.java drwx------ 2 grad 512 Aug 26 1996 source/ (maxwell@alto.152) Here we see two files, lab1a.class and lab1a.java, and a directory called source. You can tell directories from files because they end in a slash, /, and because the line in the output from ls starts with a d. The current directory starts as your home directory. You can change the current directory by using the command cd. For example, if you wanted to see the contents of the source directory, you could make it you current directory by typing cd source. Ifyoutypedls now, you would see a list of the contents of source. There are two special directories in every directory called. (pronounced dot) and.. (pronounced dot-dot). The first one refers to the current directory, and the second to the parent directory. So if you were in the directory source, typing cd.. would place you in your home directory. You will find some other useful commands in the table below. Command What You Type What it Does cd cd dirname moves you into the directory dirname ls ls lists the files in the current directory cp cp file1 file2 makes a copy of file1 and puts it in file2 mv mv file1 file2 renames (MoVes) file1 to file2 rm rm file1 deletes (ReMoves) file1 mkdir mkdir newdir makes a new directory called newdir rmdir rmdir dirname deletes the directory dirname, which must be empty You can specify files not in your current directory by prepending the name with the directories you would have to go through to get to the file. For example, if the directory source contained the file garbage, you could delete it while in your home directory by typing rm source/garbage. Notice the forward slash character / which is used to separate directory names. (MS-DOS users: this is different from the backslash (\ ) used in MS-DOS.) You can start programs from the command line by typing the program name followed by any arguments the command takes. For example, to compile the Java program lab1a.java, you would type javac lab1a.java. Here javac is the name of the program that compiles Java programs, and lab1a.java is filename of the Java program to be compiled. When the program finishes, you will see another command line. If the program is one that runs in a window, such as Netscape and nedit that you will see later in this document, you will want to end the line with an ampersand (&) character. This gives you your command line back without waiting for the program you started to end. So if you wanted to start Netscape from the command line, you would type netscape &.

5 Changing Your Password Your initial password is virtually impossible to remember and consequently is not secure. You will need to change it soon after you log in. To do this, 1. Invent a new password. The password must contain at least six characters, of which at least two are alphabetic and two are numeric or special. One way to construct a password is to make up a sentence you can remember and include the first character of each word in the sentence and all of the punctuation in your password. 2. Click the changepasswd button on the toolbar. 3. At the prompt Enter login password: type in your old password, and hit Return. 4. At the prompt New password: type in your new password. The system may reject your password because it is too short or easy to guess. If this happens, just think of a new password and type it in. 5. At the prompt Retype new password:, type your new password in again. This is a check to make sure you haven t made any typos. 6. You will now get either the error message Password unchanged if you made a mistake, or a message saying your new password is in effect. Hit Return and the password changing window will disappear. If your attempt to change your password failed, return to step 1. 6 Netscape You have probably heard of Netscape before. This product, which also exists on the Mac and PC and is free for students, is an all-purpose slicing dicing tool for the net. We use it in the lab for viewing course notes, help files, and running Java applets. You may start Netscape by clicking the Netscape button on the tool bar. A short while later Netscape will appear, displaying the Math department home page. The program is easy to use. When it displays a document, some sections of text might be underlined. If you click on the text with the left mouse button, Netscape will send you to a document connected to this text. To go back to where you came from (or forward if you have gone backwards), you can click on the backward and forward buttons on the tool bar: Unfortunately, life isn t always this simple. In the Undergraduate Online Help system, which you will be able to access with Netscape (see section 10), the screen is divided into regions called frames. There is a main frame that contains documents and two other small frames containing useful links to help you navigate the system. If you want to go back in this system, the Back button won t work since Netscape isn t sure if you want to see an earlier document within one of the frames, or even which frame you want to go back in. To go back in a frame, hold the right mouse key down within the frame to make a menu containing the items Back in Frame and Forward in Frame appear. Move the cursor onto your choice and release the right mouse button. If you want to leave the Undergraduate Online Help system, use the Back button.

7 Editing files: nedit You will probably want to modify various source files. These files are usually stored in a text-file format which can be modified using a tool called a text-editor. Our text-editor, nedit, may be started by clicking the Nedit button on the tool bar. Nedit is an easy to use, mouse based, text editor. In this primer, I will describe how to load and save files, and how to cut and paste text. To load a file, select Open... from the File menu. The following file selection dialog will appear: The files in the dialog correspond with those in the example in section 4 above again, yours will be different. To move to a directory, double click on the directory you want on the left side of the dialog. To move up a directory, double click on the the.. selection (remember,.. means the parent directory). When you see the file you want on the right side of the dialog (you might have to use the scroll bar if there are more files than there is room in the dialog), double click on it and nedit will load it. If you are already editing a file, nedit will open a new window for the file you just loaded. By the way, you can also start a copy of nedit that already contains a specified file. Just type nedit myfile &, wheremyfile is the name of the file you want to edit, at a UNIX prompt. Cutting and pasting works just like on Windows or Macintosh computers. You select a region of text by pushing the left mouse button down at the beginning of the text, dragging the cursor to the end of the text, and releasing the mouse button. This will highlight the text you will now be able to use the Copy and Cut options from the Edit menu. To paste the text, position the text cursor at the spot where you want your copied or cut text to appear, and select Paste from the Edit menu. To save a file you are working on, just select Save from the File menu. You will notice that for all of these commands, the menu lists next to the menu option the name of some keys. For example, the Open... menu item has Ctrl+O listednexttoit. IfyouholddownControl and type O, this has the same effect as selecting Open... from the menu. For the other commands, Ins stands for the Insert key and Del stands for the the Delete key. You can exit nedit by selecting Exit from the File menu.

8 Printing To print a file named, for example, myfile issue the command lpr myfile in an xterm. It will be printed on the default printer for the Unix lab, which is the hp printer in Math 201. If you want to print on the lexmark printer in the Math/Stat Resource Centre, you would use lpr -Plexmark myfile instead. Note, however, that lexmark is a postscript printer. Plain text files are not printed unless they are first fed through an ascii to postscript converter. So, DO NOT print any email or text files on the lexmark. 9 Email Your account may both send and receive email. Just click the email button on the tool bar. Your email address is <loginname>@ugrad.math.ubc.ca,where<loginname> is the login id that you use when you log in. However, because your account will be destroyed at the end of term, it is not a good idea to use it for general email correspondence. You should use your interchange account instead. 10 Getting Help Now you know just enough to get started. There are some other good places to find help once you are up and running: Online help The Mathematics Undergraduate Lab has a nice online help system you can access from Netscape. Type http://gamba.math.ubc.ca/localdoc/ into Netscape s Location window and hit Return. The system covers topics such as the UNIX command line, X Windows, Maple, Java and more. netscape The browser netscape has an online manual that you can access by pressing the Handbook button in the row of buttons just above the document display area. nedit Then nedit text editor has an online help system under the Help menu. man pages The UNIX online help manual is cryptic but comprehensive. If you want information on, say, the ls command, you can type man ls at the UNIX prompt and you will see a scrolling text page about the ls command. If you want to find information about removing files, but don t know the name of the UNIX command that does it, try man -k remove which will produce a list of topics you could look at (the -k stands for keyword). Good luck!