Introduction to Cygwin Operating Environment

Similar documents
Overview of Unix / Linux operating systems

Introduction to Linux

EE516: Embedded Software Project 1. Setting Up Environment for Projects

UNIX Kernel. UNIX History

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

Unix to Linux. CS 3113 Fall 2018 Dr. Christan Grant

Introduction to Linux. Fundamentals of Computer Science

Unix Handouts. Shantanu N Kulkarni

CS246 Spring14 Programming Paradigm Notes on Linux

Linux & Shell Programming 2014

Perl and R Scripting for Biologists

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

Lecture 01: welcome and intro what LSD and Unix have in common

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Linux/Cygwin Practice Computer Architecture

Lecture 3. Unix. Question? b. The world s best restaurant. c. Being in the top three happiest countries in the world.

Introduction to the UNIX command line

Introduction to Linux

Unix/Linux: History and Philosophy

Introduction to Linux

CISC 220 fall 2011, set 1: Linux basics

Systems Programming. The Unix/Linux Operating System

History. Terminology. Opening a Terminal. Introduction to the Unix command line GNOME

Mills HPC Tutorial Series. Linux Basics I

Introduction: What is Unix?

EL2310 Scientific Programming

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter

Unix Introduction to UNIX

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

EECS2301. Lab 1 Winter 2016

CNT 5605, Fall 2009: Introduction

UNIX Concepts COMPSCI 386

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Contents. * All rights reserved, Tei-Wei Kuo, National Taiwan University, 2003.

Introduction to Linux Basics

Version Control with Git

Welcome to Linux. Lecture 1.1

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Introduction of Linux. Huang Cheng-Chao Dept. of Comput. Sci. & Tech. East China Normal University

Projects and Environment Introduction

Operating System Labs. Yuanbin Wu

CNT 4603, Spring 2009: Introduction

Getting started with Hugs on Linux

Prof. Navrati Saxena TA: R. Sachan

CS CS Tutorial 2 2 Winter 2018

UNIX/Linux Fundamentals Lecture 1. Nick Stiffler Philip Conrad

CSCI 2132 Software Development. Lecture 2: Introduction to UNIX and Unix-like Operating Systems

Introduction of Linux

CSC209: Software Tools and Systems Programming. Richard Krueger Office hours: BA 3234

Introduction to Linux Overview and Some History

System Administration

Introduction to Linux Environment. Yun-Wen Chen

CS Fundamentals of Programming II Fall Very Basic UNIX

Underlying computer system = hardware + software

Linux File System and Basic Commands

Operating systems. Lecture 2

Introduction to Unix. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Outline. Structure of a UNIX command

Unix Workshop Aug 2014

Introduction and Overview Getting Started

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze

System Programming. Introduction to Unix

Linux for Beginners. Windows users should download putty or bitvise:

UNIX 2 OPERATING SYSTEM

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

Lec 1 add-on: Linux Intro

Lab 3a Using the vi editor

2. UDP Client, UDP Server

Chapter 1 An Introduction to C++, Unix, SSH and Komodo Edit

Computer System Management - Unix/Linux

EL2310 Scientific Programming

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Using the Unix system. UNIX Introduction

Linux Shell Script. J. K. Mandal

Getting started with Hugs on Linux

Chapter-3. Introduction to Unix: Fundamental Commands

Introduction to Linux

INF322 Operating Systems

CHE3935. Lecture 1. Introduction to Linux

Introduction to Shell Scripting

Unix Linux Fundamentals And Shell Scripting

Introduction to the basics of UNIX

15-122: Principles of Imperative Computation

CSC 112 Lab 1: Introduction to Unix and C++ Fall 2009

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Unix System Architecture, File System, and Shell Commands

INTRODUCTION TO BIOINFORMATICS

CSE 391 Lecture 1. introduction to Linux/Unix environment

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

Module 10: Unix Primer

Linux at the Command Line Don Johnson of BU IS&T

An Introduction to Unix Power Tools

Transcription:

Introduction to Cygwin Operating Environment ICT 106 Fundamentals of Computer Systems Eric Li ICT106_Pract_week 1 1

What s Cygwin? Emulates Unix/Linux environment on a Windows Operating System; A collection of open-source tools and utilities, ported from Unix/Linux; Cygwin/X is an implementation of X Window Server: Unix/Linux graphical applications can be run on Windows. ICT106_Pract_week 1 2

Brief history of Unix: 1960s and 1970s Originally developed by Ken Thompson and Dennis Ritchie in 1960s at AT&T Bell Labs; A time-sharing OS for portability, multitask, and multi-user; Unix was first written in DEC PDP-7 assembly language and re-written in C programming language in 1973; ICT106_Pract_week 1 3

1980s AT&T continued development of commercial Unix: System III and V; TCP/IP network code was first introduced to Unix kernel; Bill Joy, developer of BSD Unix, founded Sun Microsystems and started development of SunOS (now Solaris); In 1984, Microsoft announced its first Unix OS for 16-bit microprocessor - Xenix; ICT106_Pract_week 1 4

1990s Unix wars - between Open Software Foundation and AT&T to set the standard for Unix; AT&T sold Unix to Novell and later Novell sold Unix trademark to X/Open Consortium (now Open Group); Single Unix Specification was drawn by the Open Group in 1998; Development of GNU Linux - a free Unix-like OS; ICT106_Pract_week 1 5

Unix Family [http://en.wikipedia.org/wiki/image:unix.png]

Impacts The most important operating system you may never use Concept of hierarchical file system: arbitrarily nested subdirectory; C programming language; The theory of software modularity and reuse, and so on. ICT106_Pract_week 1 7

The following tutorials of Cygwin are adapted from: http://cplus.about.com/od/compilersandides/l/aa061204a.htm ICT106_Pract_week 1 8

Getting started! Go to Cygwin homepage: www.cygwin.com Click on one of the install Cygwin now icons and download setup.exe ICT106_Pract_week 1 9

Downloading Cygwin Double click setup.exe after download finished

Select installation option Select install from Local Directory

Root install directory

Local package directory

Select packages

Essential packages Make sure the following packages are included: Bash shell: command interpreter gcc: ANSI C compiler gcc-core: C compiler Vi - Unix plain text editor ICT106_Pract_week 1 15

Optional packages GNUmake: programming build tools; CVS: concurrent version system; Emacs: text editor ICT106_Pract_week 1 16

Using Cygwin Double clicking on the icon, or Go to start menu: Programs->Cygwin->Cygwin Bash Shell

Testing the installation

Unix shell Command line for Unix operating systems; Hides the details of the underlying operating system; Use echo $SHELL to determine the current shell. Note that Unix is case sensitive; Command shells: Bourne shell (sh): default Unix shell; Bourne- Again shell (bash): provides a superset of Bourne shell funtionality; C shell (csh): uses similar syntax as the C programming language ICT106_Pract_week 1 19

Basic commands ls mkdir rmdir rm cd chmod gcc show directory create a directory or sub-directory remove directory remove files change current directory changes permissions on file compiles C source files ICT106_Pract_week 1 20

Comparison of Cygwin and DOS commands dir mkdir cd del copy move DOS ls -l mkdir cd rm -iv cp -piv mv -iv Unix ICT106_Pract_week 1 21

Understanding files and directories Tree structure Root directory: /.. means parent directory and. refers to the current directory ICT106_Pract_week 1 22

Directory mapping between Cygwin and Windows Cygwin / /home /cygdrive/c /cygdrive/d /cygdrive/c/program Files /cygdrive/c/program\ Files Windows C:\Cygwin C:\Cygwin\home C: D: C:\Program Files C:\Program Files ICT106_Pract_week 1 23

Managing files Demonstration ICT106_Pract_week 1 24

Programming with Cygwin Text editor: Vi Notepad Emacs ANSI-C compatible compiler; ICT106_Pract_week 1 25

Vi editor Three modes: edit, input and command line; Type i to move from the edit mode to input mode; Hit the escape key to move from input mode to edit mode; ICT106_Pract_week 1 26

Vi commands (1) Edit mode Command h j k l dd p Use move space to left move to next line move to previous line move space to right delete current line paste the copied line at the cursor ICT106_Pract_week 1 27

Vi commands (2) Command line mode Command Use :q quit :q! quit without saving :x save, then quit :w save ICT106_Pract_week 1 28

Example

Notepad Windows basic text editor; Note that a suffix.txt will be attached to the file name as default. Thus, to save a file with All Files file type

Compiling with gcc gcc: ANSI-C compatible; -o: give the name of the executable output

Run HelloWorld program