comp 1402
play

Comp 1402 Winter 2008 Tutorial #1 Tutorial 1 The objectives of - PDF document

Comp 1402 Winter 2008 Tutorial #1 Tutorial 1 The objectives of this tutorial will be: Create and access your Linux account. Become familiar with the Linux terminal. Become familiar with the vi text editor. Compile a


  1. Comp 1402 Winter 2008 Tutorial #1 Tutorial 1 • The objectives of this tutorial will be: – Create and access your Linux account. – Become familiar with the Linux terminal. – Become familiar with the vi text editor. – Compile a simple C program. 1

  2. Part I: Creating SCS Account Linux Account • To create a new account – Login as newacct with no password. • Creating a linux account – http://www.scs.carleton.ca/nethelp/zeta/zeta.s html#ACCOUNT Updating Your Account 2

  3. Part II: Login To Linux • Select SCS Linux Network • Select a Linux Host (Zeta0 … Zeta15) • Login to Linux System – You will be required to re-enter your SCS username and password. • Start Terminal in Linux Starting Linux Terminal • You will do most of your work this term in the Linux terminal (command line) • From the main menu (Federa ‘f’) select: • Accessories -> Terminal • For those of you familiar with UNIX/Linux sorry this will all be review for you ... 3

  4. Basic Shell Commands (Covered in this tutorial) • ls – List all files in the current directory (folder ) • pwd – Show the path to the current directory. • cd – Change directories • mkdir – Create a new directory Basic Shell Commands (Continued) • rm – Remove files or directories • rmdir – Remove a directory • more – List contents of a (text) file • man – help for commands 4

  5. Part II VI Text Editor The VI Text Editor • Vi (“vee eye”) is a basic but powerful screen based (no fancy GUI) text editor. • One of many available, but you will get to use it for your first tutorial! • Vi is a screen based editor which operates in one of two modes: – Command Mode – Text Entry Mode 5

  6. Command Mode • vi has no GUI so all operations are performed from keyboard. • Commands are typed from keyboard, for example: – dw – deletes the word at the cursor – dl – deletes the current line – :wq – save file and quit. • You cannot type text while in Command Mode. Text Entry Mode • Whatever you type while in Text Entry Mode appears in your document. • To switch to text input mode you use: – i - will switch to text mode and allow typing at cursor. – a – will switch to text mode and allow typing at character immediately after cursor. • You can use arrows keys to navigate while in text entry mode. • The ‘Esc’ key will return you to Command Mode. 6

  7. Part III: GCC Compile Introduction to GCC • For this tutorial you will be compiling a very simple C program. • GCC takes one (or more) C source files and generates an executable program that you can execute from the terminal. • For the tutorial you will be expected to generate a program the prints “Hello World”. 7

  8. Have Fun 8

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend