Engineering H192 - Computer Programming Introduction to UNIX Lecture 4 Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 1 Engineering H192 - Computer Programming Computing Environment • PC vs. UNIX – Many PCs use a version of the Microsoft Windows operating system (either 95/98/ME or NT/2000/XP). – UNIX is an operating system used primarily on workstations. There are versions for Personal Computers. LINUX is a version of UNIX. Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 2 Engineering H192 - Computer Programming UNIX • Originally written by programmers for programmers at Bell Labs. • Often is the operating system of choice for highperformance engineering workstations. • Original (and still common) user interface is the "UNIX command line", although graphic user interfaces (GUIs) are available. • Names of UNIX commands tend to be a little cryptic or strange. Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 3 Engineering H192 - Computer Programming UNIX Command Line Interface • We will use the "UNIX command line" user interface for much of the work in this class. • The availability of some limited graphic user interface capabilities is provided by special terminal emulation software. • Emulator runs on the PC and makes the PC system act like an "X-Windows" terminal. • Simple Secure-Shell terminal emulation can also be used. Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 4 Engineering H192 - Computer Programming Some Simple UNIX Commands Simple Command UNIX MS/DOS List files in directory ls dir Delete a file rm file del file Display contents of cat file type file file on screen Display contents of more file more < file file on screen Print working pwd pwd directory Change directory cd /path/new cd \path\new Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 5 Engineering H192 - Computer Programming Your Computer Accounts • Each student actually has two separate computer system accounts: – One for the personal computers (in HI 324) – One for the UNIX system (SGI IRIX) • Each account is established only for the duration of the current quarter (i.e., the files stored under your Autumn Quarter's account(s) are gone) Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 6 Engineering H192 - Computer Programming Your User ID and Default Password • The User ID for both of your computer accounts is simply your OSU email ID. • The default password for both accounts is: – The first letter of your last name – The first three digits of your SSN in reversed order – Your entire first name • Written as one "word" in all lowercase Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 7 Engineering H192 - Computer Programming Figuring out Your ID & Default Password • So, as an example of a User ID and a default password, let's suppose: – Your name is "Woody Hayes" – Your SSN is 987-65-4321 – Your OSU email address is hayes.1@osu.edu • Then, Wayne Woodrow "Woody" Hayes would logon as: – User ID: hayes.1 – Password: h789wayne Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 8 Engineering H192 - Computer Programming Default Logon for PC Systems in HI 324 • Your UNIX "default" password: – The first letter of your last name – The first three digits of your SSN in reversed order – Your entire first name • Another possible default password: – Just your University ID (your 9-digit SSN) • Attempt both of these methods and if neither work speak to the lab facilitator at the desk in 324 or your instructor. Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 9 Engineering H192 - Computer Programming Logging On to a PC in HI 324 Windows XP Logon • Press “Ctrl - Alt - Del”, if so instructed • Fill in the new window with – Your User ID – Your Password (watch case) – The Domain (ENGR1) Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 10 Engineering H192 - Computer Programming Logging On to the PC User Name Password Domain Winter Quarter hayes.1 h789wayne ENGR1 Gateway Engineering Education Coalition Lect 4 P. 11 Engineering H192 - Computer Programming Changing Your Password on the PC (Press Ctrl -- Alt -- Del) Windows XP Security Login Information Log Off Change Password Winter Quarter Cancel Gateway Engineering Education Coalition Lect 4 P. 12 Engineering H192 - Computer Programming Changing Your Password on the PC Change Password User Name Domain Old Password New Password Confirm New Password Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 13 Engineering H192 - Computer Programming Logging On to the SGI UNIX System • On the PC -– Click on Start • Go to Programs Submenu – Then go to Exceed Submenu » Then go to Exceed (Task) and Click Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 14 Engineering H192 - Computer Programming Today's Assignment – E3 • In assignment E3, you are asked to logon on to the UNIX system and try a few commands. • In Part A, write down the command you typed for each of the seven steps. • In Part B, choose an editor program and type in the given computer program. • UNIX editor choices include: – vedit (or vi) – pico – emacs (X only) Winter Quarter Gateway Engineering Education Coalition Lect 4 P. 15