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!
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.
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.
Introduction to Linux Operating System Tutorial 1
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,
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Cmsc 312 Operating Systems. UNIX? DOS – PC? VAX/VMS - mainframe Unix – PC, workstation, mainframe 1970 bell Lab For computer scientist? Why popular? Free.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Introduction to UNIX Geraint Vaughan. What is UNIX? Command-line operating system (not point- and click) Designed for ‘experts’ Lots of different variants.
Introduction to C Programming Lecture 2. C Tutor Schedule / 3rd Floor Lab b The lab and tutor schedule is available at the following URL:
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: whereis, which, whoami, finger, passwd, cal, date Working with Files: cat, more, less.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
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.
A gentle introduction to LINUX at the command prompt.
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.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
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.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
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.
Introduction to UNIX and Linux.  Written by Dennis Ritchie and Ken Thomsom at Bell Labs in 1969  Initially written in assembly language and a high-level.
Dr. Sajib Datta Jan 16,  The website is up.  Course lectures will be uploaded there ◦ Check regularly for assignments and update.
CMSC 104, Version 8/061L03OperatingSystems.ppt Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux.
Agenda The Linux File System (chapter 4 in text) Directory Structures / Navigation Terminology File Naming Rules Relative vs Absolute pathnames Unix Commands:
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.
UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals.
Tutorial Six Linux Basics CompSci Semester Two 2016.
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.
CS1010: Intro Workshop.
Getting started with CentOS Linux
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
Andy Wang Object Oriented Programming in C++ COP 3330
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
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems Lecture 5.
Lab 00 Discussion Linux Basics
Andy Wang Object Oriented Programming in C++ COP 3330
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 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

13 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

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

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