1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.

Slides:



Advertisements
Similar presentations
Introduction to the Omega Server CSE Overview Intro to Omega Basic Unix Command Files Directories Printing C and C++ compilers GNU Debugger.
Advertisements

CSE1222: Unix IntroThe Ohio State University1. Common Directory Commands  lsList directory contents  cd {dir}Change working directory to {dir}  pwdPrint.
Linux Orientation Computer Systems Lab Computer Sciences Department Room 2350.
Pre-Assessment Questions
ENEE150: Discussion 1 Section 0104 Please Sit Down at a Computer and Login!
Jump to first page Unix Commands Monica Stoica Jump to first page Introduction to Unix n Unix was born in 1969 at Bell Laboratories, a research subdivision.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
Using Pine to send your ICS111 homework First Log in into UNIX using SSH either from home (If you have previously installed SSH or from the Lab. Once in.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
CS 110 Intro to Computer Science I Sami Rollins Fall 2006.
Linux & Applications Sean GavinWayne State University multi-user environment -- log in: user name and password -- you never turn the computer on or off.
Basic linux shell commands and Makefiles. Log on to engsoft.rutgers.edu Open SSH Secure Shell – Quick Connect Hostname: engsoft.rutgers.edu Username/password:
CS 202 Computer Science II Lab Fall 2009 August 27.
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
Unix Basics. Systems Programming: Unix Basics 2 Unix Basics  Unix directories  Important Unix file commands  File and Directory Access Rights through.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
What is Unix? A multi-user networked operating system –“Operating System” Handles files, running other programs, input/output Looks like DOS…but more powerful.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
Notes Assignment #1 is due next Friday by 11:59 pm via Test #1 will be held Thursday February 18 at the start of class (one period long) Format:
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Lesson 1. PC vs. Multi-user System  Personal Computer – each user gets his/her own processor (or multicore processor).  Multi-user system – The processor,
Unix Basics Chapter 4.
Cmsc 312 Operating Systems. UNIX? DOS – PC? VAX/VMS - mainframe Unix – PC, workstation, mainframe 1970 bell Lab For computer scientist? Why popular? Free.
1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions.
Introduction to UNIX Geraint Vaughan. What is UNIX? Command-line operating system (not point- and click) Designed for ‘experts’ Lots of different variants.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Introduction to Programming Using C An Introduction to Operating Systems.
COP3502: Introduction to Computer Science Yashas Shankar Lecture #2.
Intro. To Unix commands For those who’ve never used Unix before Quick tutorial to let you move around your Unix Accounts No discussion of inner workings.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
ENEE150: Discussion 1 Section 0104/0105 Please Sit Down at a Computer and Login!
Basic Unix Commands & GCC Saurav Karmakar Spring 2007.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  There are many different.
What is Unix? A multi-user networked operating system –“Operating System” Handles files, running other programs, input/output Just like DOS or Windows.
CMSC 104, Version 8/061L03OperatingSystems.ppt Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux.
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals.
Tutorial Six Linux Basics CompSci Semester Two 2016.
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
ENEE150 Discussion 01 Section 0101 Adam Wang.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
First Day in Lab Making a C++ program
CS1010: Intro Workshop.
Introducing the UNIX Operating System.
Getting started with CentOS Linux
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
UNIX The Basics Source:
Andy Wang Object Oriented Programming in C++ COP 3330
Some Linux Commands.
The Command Prompt Commands are the way to “do things” in Unix
Welcome to CSCI 230! Problem Solving using C
Introduction to UNIX UNIX developed at Bell Labs in 70s
Welcome to CSCI 230! Problem Solving using C
Unix : Introduction and Commands
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems Lecture 5.
Lab 00 Discussion Linux Basics
Getting started with CentOS Linux
Module 6 Working with Files and Directories
Lab 2: Terminal Basics.
Presentation transcript:

1 N305 C Programming

2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience leveraging basic data structures ä Get an understanding of simple algorithms

3 Agenda ä Environment setup ä Login to Pegasus ä ä Introduction to UNIX ä UNIX files and directory structure ä Basic UNIX commands

4 Agenda ä How to use a text editor ä emacs editor -- basic commands ä Create and compiler your first C program! ä “Hello world” program ä Compile using “gcc” compiler ä Execute

5 Login to UNIX ä User Name ä Oncourse username ä Password ä Oncourse password

6 Login (Cont’d) ä ä UNIX is case-sensitive! ä lower-case ä The username and the password are in lower-case ä ä If you are NOT able to logon then: ä ä Contact a Lab Instructor or Course Instructor ä ä Once you login for the first time, the system will prompt you to change the password…create a new password and remember it

7 Introduction to UNIX ä UNIX is a multitasking operating system that manages the resources of a computer and provides a user interface. ä UNIX is case sensitive, which means, upper and lower case characters are treated as different characters. ä The UNIX machine for which you are given an account is: pegasus.cs.iupui.edu

8 ä A directory is a location to store information. ä UNIX starts with a root directory / /etc /home /usr /bin /jsmith /tjones /local The UNIX Directory Structure

9 The UNIX Prompt login: jsmith Password: Last login: Mon Aug 22 08:42:33 from gatekeep.usagrou Sun Microsystems Inc. SunOS 5.8 Generic February 2000 pegasus{jsmith}1: Machine name User name Command number

10 Essential UNIX Commands ä ls- list files in present working directory ä pwd- display present working directory ä cd- change directory ä cd.. Backup one directory level ä lp (or lpr) - print file to printer: Printer in SL251! ä rm- remove a file ä cp- copy a file ä mv- move or rename a file ä mkdir- make a directory ä rmdir- remove a directory

11 ä All correspondence should take place through Oncourse.

12 Class Subscription ä Subscribe to the class to receive mail sent to the entire class by instructors and other classmates ä Send mail to: ä Subject: blank ä Body of Message: subscribe n305

13 Pine ä ä You can practice subscribing from unix, but you should subscribe from whatever account you use most during the day or the you want to receive emergency notifications. ä pine ä From the unix prompt type pine ä ä The system will indicate the welcome message for the first time ä ä Type c to compose a mail ä ä Write in the To field ä ä Leave the Subject field blank ä ä Type subscribe n305 below Message Text ä ä Type control x to send the mail ä ä Type q to quit

14 How to Use Emacs pegasus{jsmith}1:emacs filename ä There is a Tutorial listing the major emacs commands. I suggest you use the Tutorial. ä To use the tutorial, type emacs at the prompt and then type h t. This starts the tutorial. ä Quick Access Card – Linux

15 How to Compile A Program pegasus{jsmith}1: gcc first1.c ä C programs end in the “.c” extension ä The executable file is called a.out pegasus{jsmith}1: gcc first1.c

16 How to Execute Your Program pegasus{jsmith}1:./a.out ä Type the name of the executable file at the prompt to run your program

17 Your First C Program # include # include main(void){ printf(“Hello, CSCI 230!\n”); } Try it!