Cygwin Linux for Windows Desktop Paul Stuyvesant.

Slides:



Advertisements
Similar presentations
Using Commands Introduction to Linux June 16, 2009 Papeete, French Polynesia Hervey Allen.
Advertisements

© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming Preparation for working in the CSIL Basic LINUX operations.
Linux+ Guide to Linux Certification, Second Edition
Basic linux shell commands and Makefiles. Log on to engsoft.rutgers.edu Open SSH Secure Shell – Quick Connect Hostname: engsoft.rutgers.edu Username/password:
1 Introduction: Unix Software Project – Autumn 2008/2009.
Unix Workshop Aug What is Unix Multitasking, multiuser operating system Often the OS of choice for large servers, large clusters.
CS0007: Introduction to Computer Programming Setting Up Java.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
A crash course in njit’s Afs
Linux Commands LINUX COMMANDS.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
The Unix Environment and Compiling. Getting Set Up Your programs will be compiled and tested on the Departmental server ‘linprog’ The linprog servers.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Agenda What is Computer Programming? The Programming Process
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
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 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
Unix Basics Chapter 4.
– Introduction to the Shell 10/1/2015 Introduction to the Shell – Session Introduction to the Shell – Session 2 · Permissions · Users.
CENT 305 Information Systems Security Linux Introduction.
Intro to Linux/Unix (user commands) Box. What is Linux? Open Source Operating system Developed by Linus Trovaldsa the U. of Helsinki in Finland since.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 6.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
CSC 215 : Procedural Programming with C C Compilers.
Linux+ Guide to Linux Certification, Third Edition
QT - a C++ based GUI QT’s Designer and Assistant.
Cygwin Linux for Windows Desktop Paul Stuyvesant.
Week 3 Exploring Linux Filesystems. Objectives  Understand and navigate the Linux directory structure using relative and absolute pathnames  Describe.
1 Programming in C Hello World! Soon I will control the world! Soon I will control the world!
Next Unix Topics Tuesday, 2/11 & 18/2014. Change Password (by 2/14/14) ssh to account on – faclinux.cse.ohio-state.edu – stdlinux.cse.ohio-state.edu passwd.
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
Setting up Cygwin Computer Organization I 1 May 2010 ©2010 McQuain Cygwin: getting the setup tool Free, almost complete UNIX environment emulation.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Created by Harry H. Cheng,  2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Chapter 2: Getting Started.
Introduction to Programming Using C An Introduction to Operating Systems.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
CPS120: Introduction to Computer Science Compiling a C++ Program From The Command Line.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
THE C PROGRAMMING ENVIRONMENT. Four parts of C environment  Main menu  Editor status line and edit window  Compiler message window  “Hot Keys” quick.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
Object Oriented Programming COP3330 / CGS5409.  Compiling with g++  Using Makefiles  Debugging.
L071 Introduction to C Topics Compilation Using the gcc Compiler The Anatomy of a C Program Reading Sections
Learning Unix/Linux Based on slides from: Eric Bishop.
 CSC 215 : Procedural Programming with C C Compilers.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
University of Kansas Department of Electrical Engineering and Computer Science Dr. Susan Gauch April 21, 2005 I T T C Introduction to Web Technologies.
Cygwin: getting the setup tool
CSC 215 : Procedural Programming with C
How to Program.
ENEE150 Discussion 01 Section 0101 Adam Wang.
Class Projects and Environment
SEEM3460 Tutorial Unix Introduction.
How to Start Programming in Linux Environment
Andy Wang Object Oriented Programming in C++ COP 3330
The Linux Operating System
Introduction to Programming the WWW I
Introduction to C Topics Compilation Using the gcc Compiler
Lab 00 Discussion Linux Basics
Introduction Paul Flynn
Command line.
Video Notes.
Cygwin: getting the setup tool
Presentation transcript:

Cygwin Linux for Windows Desktop Paul Stuyvesant

Introduction Various tools available to work with Linux –Knoppix - boot from CD –Dual Boot PC –Download a full distro from a vendor Cygwin requires no financial investment –No impact on existing system –Free!

Introduction Will give developers a ‘heads up’ to Linux Familiarise them with: –File structure –Simple Commands –gcc and g++

Icon created on the desktop Linux file structure created on disk Directories holding ‘mirror’ information Click on icon to start Cygwin Using Cygwin

Running Cygwin

No concept of filetypes in Linux –Can make it confusing initially Developer can use.c and.cpp if they wish It is a good idea to set standards –Enforce the standards company wide Overview

List directory contents ls ls -a ls -l ls -la Filenames that being. are ‘hidden’ Each user has ‘home’ directory –Indicated by ~ on display Basic Commands

Create a new directory mkdir progs mkdir ~/progs2 Change directory cd progsChange to progs directory cd ~Change to home directory cd /Change to root directory cd ~/progsChange to progs via home Basic Commands

Not usually downloaded by default. Go back to Cygwin website and rerun setup. Choose gcc/g++ from the various packages –Can sometimes be difficult to find –Can download both executable and source –Usually some dependencies Installing gcc/g++

Standard Linux/Unix tools are terrible emacs vi vim Get hold of a decent text editor My recommendation is Textpad Editing Files

Try before you buy Relatively cheap Files saved as either DOS or Unix format Built in macros, or create your own Excellent search facility in the tool Active user community on the net Infinitely customisable Textpad

Part of the GNU toolchain Portable compiler that runs on most platforms available Can produce output for many types of processors Can be used as a cross compiler –Generates executable for different system gcc

No concept of filetypes in Linux Developer can use.c and.cpp if they wish –It is a good idea to set standards at the outset By default gcc creates an executable file –Called a.out or a.exe –Someone thought it was a good idea –Various options to override default name gcc

gcc first.c –Compiles and links first.c –Creates an executable called a.out or a.exe gcc –Wall first.c –Compile/link first.c with common warnings –Recommended you always use this option gcc –Wall first.c –o first –Creates executable called first or first.exe Compile and Link

gcc –Wall –c first.c –Create object file called first.o –Does not link or create executable gcc –Wall –c first.c hello.c –Create object file for each source file –first.o and hello.o Compile

gcc first.o hello.o –o paulprog –Create executable file called paulprog.exe –Inputs are first.o and hello.o gcc first.o../Paulobj/hello.o –o paulprog –Use object file in different directory –Build program from a variety of object Link

User written headers should be in quotes Specify where the header is located –#include “paul.h” Current Dir –#include "Hdrs/paul.h“Specified Dir Can create Paths so directory is not required –C_INCLUDE_PATH=~/C_Progs/Hdrs –export C_INCLUDE_PATH –CPLUS_INCLUDE_PATH=~/CPP_Progs/Hdrs –export CPLUS_INCLUDE_PATH Headers

Used to compile C++ code Most parameters the same as gcc Code checking is tighter than gcc –Program compiled OK in gcc may get errors with g++ Nearly all C programs are valid C++ programs –Simply recompile using g++ g++

If you want to use Linux read up about –File and Directory Permissions –Aliases –Shell and Environment Variables –Startup files –Pipes –Makefiles Further Topics

g++/gcc are part of powerful toolset –Free download, easy to install –Quick and (relatively) easy to work with Large amount of help on www –Sometimes too much Get ahead of the game – try it now Summary

THE END Thanks for staying awake Enjoy the rest of the conference A copy of presentation will be available at Any questions drop me a line at