Download presentation
Presentation is loading. Please wait.
Published byBruno Bryan Modified over 9 years ago
1
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 1Winter Quarter Introduction to UNIX Lecture 4
2
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 2Winter Quarter Computing Environment PC vs. UNIX –Many PCs use a version of the Microsoft Windows operating system (perhaps 98/ME or more likely 2000/XP). –This year, the C How To Program book has a CD with Visual C++ Version 6.0 – More later –UNIX is an operating system used primarily on workstations. There are versions for Personal Computers. LINUX is a version of UNIX. Each UNIX has its versions of C and C++ languages.
3
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 3Winter Quarter UNIX Originally written by programmers for programmers at Bell Labs. Often is the operating system of choice for high- performance 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.
4
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 4Winter Quarter 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. The emulator runs on the PC and makes the PC system act like an "X-Windows" terminal and is called XWin32 (OSU site licensed). Simple Secure-Shell terminal emulation can also be used (also site licensed).
5
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 5Winter Quarter Some Simple UNIX Commands
6
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 6Winter Quarter Your Computer Accounts Each student actually has two separate computer system accounts for ENG H192: –One for the personal computers –One for the UNIX system (Linux) Each account is established only for the duration of the current quarter (i.e., the files stored under your Au Quarter's H191 account(s) may be gone) Each account has a separate, distinct password for logon. Changing the password on one system (PC) does NOT change on it the other system (UNIX).
7
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 7Winter Quarter Your User ID and Default Password The User ID for both of your computer accounts is simply your OSU email ID (name.#) 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
8
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 8Winter Quarter 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
9
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 9Winter Quarter Logging On to a PC in HI 324 Windows XP Logon Press “Ctrl - Alt - Del”, if so instructed Fill in the logon window with –Your User ID –Your Password (watch case of text) –The Domain (ENGR1)
10
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 10Winter Quarter Logging On to the PC
11
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 11Winter Quarter Changing Your Password on the PC (Press Ctrl -- Alt -- Del)
12
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 12Winter Quarter Changing Your Password on the PC
13
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 13Winter Quarter Logging On to the Linux (UNIX) System After logging onto the PC: –Click on “Start”, Then Point “All Programs” menu, –Then point to “X-Win32” and Click »Then when prompted, enter your User ID and your UNIX system password
14
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 14Winter Quarter Enter Your User ID & UNIX Password
15
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 15Winter Quarter Red Hat Linux desk top Click on the Red Hat to display menu Select ‘System Tools’ – Then select ‘Terminal’
16
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 16Winter Quarter Linux desk top with two Terminal Windows
17
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 17Winter Quarter Accessing the LINUX System From Outside the Classroom There are three convenient ways to access the Linux system from outside this classroom: –Use the computers in the open computer lab, Hitchcock Hall 324 –Download and install the X-Win32 X Windows terminal emulator on your machine –Download and install the Secure Shell (SSH) Client terminal emulator (a more “secure” TELNET-like kind of connection) Any OSU site-licensed software package can be downloaded from: http://osusls.osu.edu
18
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 18Winter Quarter Logging On to the UNIX System with SSH With the Secure Shell Client installed on a PC: –Click on “Start”, then point to “All Programs” menu, –Then point to “Secure Shell Client” and click –When SSH window appears, click on “Quick Connect” in upper left part of window –Enter “Host Name” as: r1rhl.eng.ohio-state.edu –Enter your “User Name” and click –Enter your “Password” when prompted
19
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 19Winter Quarter Connecting with the SSH Client First, click on “Quick Connect” Then, type in “Host Name” & “User Name” r1rhl.eng.ohio-state.edu Finally, “Connect”
20
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 20Winter Quarter Using SSH When logging on for the first time, you may be prompted to save a “host public key”. With the SSH Client: –You can have more than one command line “window” to the UNIX system –You will not be able to use any UNIX programs which require the “X Windows” environment without losing capability. This would include full screen editors like “emacs”. –vi is the recommended editor for Secure Shell
21
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 21Winter Quarter Today's Assignment – G03 In assignment G03, 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: –vi (either SSH or X Win32) –emacs (X Win32 only) We will be using the C++ compiler so the file extension must be.cpp To compile the program use g++ -o g03.out g03.cpp
22
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 22Winter Quarter Dual Boot Computers The computers in the classrooms are dual boot. This means that they can run Microsoft Windows XP or Red Hat Linux OSU V1.0 The default operating system is Windows XP To run Red Hat Linux the machine needs to be restarted or turned off and started again. When it is booting, there will be a point where you can select Linux rather than XP.
23
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 23Winter Quarter Dual Boot Computers You will see two lines printed as follows: Microsoft Windows XP Red Hat Linux OSU V 1.0 Use the down arrow to highlight Red Hat Microsoft Windows XP Red Hat Linux OSU V 1.0 Then press Enter
24
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 24Winter Quarter Dual Boot Computers The login information is similar to the previous slides.
25
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 25Winter Quarter Dual Boot Computers You will see this image after the login as the computer continues to boot.
26
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 26Winter Quarter Dual Boot Computers To log out, click on the Red Hat and then Logout
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.