ENCM 339 Fall 2017: Editing and Running Programs in the Lab

Size: px
Start display at page:

Download "ENCM 339 Fall 2017: Editing and Running Programs in the Lab"

Transcription

1 page 1 of 8 ENCM 339 Fall 2017: Editing and Running Programs in the Lab Steve Norman Department of Electrical & Computer Engineering University of Calgary September 2017 Introduction This document is a fairly brief introduction to getting things done in the ENCM 339 lab in the Fall 2017 term. It s aimed mainly at students in lecture section 01, but most of the material here will probably also be useful to students in lecture section Linux, Microsoft Windows, and Cygwin 1.1 Background For many years, the labs used for ENCM 339 had computers running various versions of the Linux operating system. Linux is generally regarded as less convenient than Microsoft Windows or Mac OS X for casual users, but is also seen by many engineers and computer scientists as more powerful, flexible and interesting than the Microsoft and Apple operating systems. Linux is a really important system, for big, expensive computers in server rooms, for small computers in inexpensive electronic devices, and for many other kinds of computers. For these reasons, instructors of ENCM 339 have felt it important to expose students to Linux. In the academic year, Linux won t be available in the ENCM 339 lab. The main reason is that it s expensive for system administrators to maintain more than one operating system, and many, many courses in the School of Engineering use software that runs only on Microsoft Windows. 1.2 Cygwin It s hard to give a short, precise summary of exactly what Cygwin is! For the purposes of ENCM 339, we can say that Cygwin is software that allows you to develop and test software on Microsoft Windows in very much the same way you would do it on Linux. Command-line skills developed in the ENCM 339 lab will definitely be helpful for later courses that use Linux, and for summer jobs or internships where those skills are useful. This is particularly important for Software Engineering students and for Electrical Engineering students considering the Computer Engineering Minor. To use Cygwin in the lab: Double-click on the Cygwin64 icon on the Windows desktop, or use the Windows Start button to search for Cygwin64 Terminal. If you succeed, you should see a window like the one shown in Figure 1, waiting for you to type in a command.

2 Editing and Running Programs in the ENCM 339 Lab page 2 of 8 Figure 1: Screenshot of a Cygwin Terminal window. This was taken on a machine running Windows 8.1 what you ll see in the lab on Windows 7 will be very similar but not exactly the same. 2 The file system: Boring but important details Attention: The details here are not very exciting but you need to know them well in order to find files quickly and to avoid accidental loss or destruction of your work! 2.1 Drive letters in the lab Microsoft Windows gives different drive letters to each of the file systems accessible to a computer. In our lab... Each computer has its own C: drive, a solid-state drive located within the computer s case. In general, you should not save your files to the C: drive, because those files will not be accessible from any other computers in the lab. You shouldn t count on always using the same computer every time you visit the lab! Each student has his or her own H: drive, which has the same content no matter which School of Engineering computer a student has logged into. (H: drive data is stored on a special-purpose computer called a file server.) Keeping your work on your H: drive is a reasonable choice, as you can log out and leave the lab, then return to the lab and resume work by logging into another computer. If you plug a USB thumb drive into a computer, it will likely appear as the E: drive (but perhaps it may get some other letter). Keeping your work on a thumb drive is another reasonable choice, as long as you are super-careful to always eject the drive safely and take it with you when you leave the lab!

3 Editing and Running Programs in the ENCM 339 Lab page 3 of Directory is another word for folder You should already be very familiar with the concept of a folder within a computer s file system. A folder can contain one or more regular files, and can also contain other folders. It s common for a computer user to have to navigate down through several layers of folders to find a particular file of interest. Directory is a term that means the same thing as folder. It s important to know this because commands and documentation belonging to command-line environments such as Cygwin tend to prefer directory to folder. 2.3 Slash and backslash This character is called slash: / And this one is called backslash: \ Make sure you remember the difference! In working with computers, bad things (or maybe just confusing things) will happen if you use one of these characters where the other is required. When working with Cygwin (or with Linux or Mac OS X), slash is the directory separator character. For example, this... /cygdrive/h/encm339/foo/bar.c... specifies the file called bar.c, which is in a folder called foo, which is in a folder called encm339, which is in a folder called h, which is in a folder called cygdrive. (Confusingly, the Microsoft Windows Command Prompt application uses backslash as the directory separator character. In Command Prompt, you would use H:\encm339\foo\bar.c to specify the file given in the earlier Cygwin example. If you ve never heard of Command Prompt, don t worry we won t use it for C programming in ENCM 339. When we do use Command Prompt to run Python scripts later in the course, you ll be given some information about how Command Prompt works.) 2.4 Navigating folders in Cygwin Terminal Inside Cygwin Terminal runs a program called bash. bash is an example of a shell, which is a program designed to accept command lines and run other programs in response to those commands. At any given moment bash has what is called the current working directory, or just the working directory. By default, commands will look for files and directories relative to the working directory. The bash command to identify the working directory is pwd for print working directory. Whenever you re not sure where bash has gone to in the file system, use the pwd command to find out. Cygwin is designed to allow use of a PC running Microsoft Windows as if it were running Linux (or some similar Unix-like operating system). In Linux, there is a root directory at the top of the file system, called simply / (In other words, the symbol for the root directory is just a single slash character.) Any directory or file can be accessed by starting at / and listing directories separated by / characters. For example, in Cygwin, /usr/include/stdio.h

4 Editing and Running Programs in the ENCM 339 Lab page 4 of 8 is a file called stdio.h, within the directory include, within the directory usr, within the root directory. Cygwin uses a special directory called cygdrive to provide access to all the various lettered drives of a Windows computer. This table of examples should make it obvious how that works: drive Cygwin name C: /cygdrive/c E: /cygdrive/e H: /cygdrive/h We ve seen the pwd command already. Two other useful commands are cd ( change directory ) and mkdir ( make directory ). Let s explain these with a series of examples. Imagine that Alice is a student, using Cygwin in the lab for the first time. When she starts up Cygwin Terminal, the working directory will be her home directory, which is a folder created by Cygwin somewhere on the C: drive. That s not a good place to do work, because the C: drive is only accessible from one computer. So Alice decides to work on her H: drive... cd /cygdrive/h She doesn t want to create a mess of files at the top level of her H: drive, so she makes a folder for ENCM 339: mkdir ENCM339 Note that there is no slash in front of ENCM339 this means that the new folder will be placed within /cygdrive/h rather than in the root directory. Alice s next command is cd ENCM339 now the working directory is /cygdrive/h/encm339. Alice realizes that she doesn t want to put all of her ENCM 339 files in one folder, so she makes a second folder mkdir lab1 then does cd lab1 and then does pwd to check that the working directory is what she expects. The output from pwd is /cygdrive/h/encm339/lab1 Alice is happy and starts downloading some files from D2L into her new lab1 folder. Let s skip all of Alice s work on Lab 1 and imagine her a week later, starting work on Lab 2. She already has an ENCM339 folder on her H: drive, so she doesn t have to make that folder again. But she does want to make a lab2 folder and make that new folder her working directory. Here s one way to do it, with three commands: cd /cygdrive/h/encm339 mkdir lab2 cd lab2

5 Editing and Running Programs in the ENCM 339 Lab page 5 of Special directories called. and.. A single dot refers to the current directory. We ll see an important use for that when running executable files we make from C code. Two dots side-by-side refer to the directory one level up from the current directory. So cd.. navigates one level up in the file system. Often it s useful to combine.. with a slash and a regular directory name. For example, suppose Bob has made two directories called exa and exb within his lab3 directory. He s in his exa directory, but wants to get to his exb directory. One way to do it is to use cd.. to get up to his lab3 directory, then cd exb to get down to his exb directory. But a faster way to do it is with one command: cd../exb 2.6 Effect of cd with no argument What happens if you enter the command cd without telling cd where you want to go? It turns out that this is a shortcut for changing to your home directory. That s often useful on Linux systems, but not so great for Cygwin in the ENCM 339 lab, because you probably don t want to work on the C: drive. 2.7 Learning more Click this link to a tutorial (or tell your Web browser to go to linuxcommand.org) to get a good introduction to the basics for working with the bash command line. Some of the information in the tutorial is specific to Linux, but most of the content applies perfectly to Cygwin as well. In particular, please find out how to use these commands: ls cp mv rm list contents of a directory copy files or directories move or rename files or directories delete (remove) files or directories 2.8 Feel free to use Windows Explorer Windows Explorer (sometimes called My Computer ) is a great tool for inspecting your folders and files, moving them around, giving them new names, and so on. It s completely reasonable to use both Windows Explorer and Cygwin Terminal while you re working on ENCM 339 exercises in the lab. 3 IDEs versus text editors 3.1 IDEs IDE stands for integrated development environment. Some important IDEs are: Microsoft Visual Studio, the most commonly used system for development of applications for Microsoft Windows; Apple s Xcode, used to develop applications for Mac OS X and ios;

6 Editing and Running Programs in the ENCM 339 Lab page 6 of 8 Eclipse, a cross-platform IDE, often used to develop applications in the Java programming language. An IDE provides a single, unified system for many of the tasks involved in developing an application. Here s an incomplete list of those tasks: organizing all of the source files belonging to a project; editing the source code within files; finding and correcting errors that prevent source code from being compiled; building executable files and running them to find out whether programs work as expected. 3.2 We won t use an IDE in the lab Good IDEs are often very powerful and convenient, and your instructors encourage you to learn how to use more than one IDE. However, IDEs tend to hide some of the details about programming that are really useful to know, such as: what kinds of files are involved in writing and testing a C program; what the relationship is between a program and a command you can use in a command-line environment; various ways to get commands to read input data files and write output data files. So what we ll do instead in the lab is: edit source code.c files,.cpp files, and.h files in a program called a text editor; build executable programs and test them using a program called a terminal window. As you work on programs in the lab, you will find yourself working with the terminal for a while, the working with the text editor, then with the terminal again, and so on. (From time to time, you ll need to work with a few other applications: a Web browser, for obvious reasons; Windows Explorer, for finding and managing files and folders; and a word processor for putting together post-lab reports.) 3.3 Geany Geany (pronounced like genie ) is the recommended text editor for work in the ENCM 339 lab. Geany is free, easy to install, available for Windows, Mac OS X and Linux, powerful, and designed to be used for writing code. Here are two handy ways to start Geany in the lab: When creating a brand new.c file, launch Geany by searching for it, starting with the Windows Start button. This will open Geany with a blank text file called untitled. Use Save As... from the File menu to choose a good name for the file and place it in an appropriate folder. Then type in whatever text you need, and save the file again. To edit a file that already exists, first use Windows Explorer to find the folder containing the file. Then right-click on the icon for the file, and choose Open with Geany from the pop-up menu.

7 Editing and Running Programs in the ENCM 339 Lab page 7 of 8 4 Building and running executable files 4.1 Executable files When you write code in C or C++, you can t ask a computer to simply do what is described in your.c or.cpp files! Instead, you first have to make a thing called an executable file, often called simply an executable. An executable file contains machine instructions, among other things. A machine instruction is a short sequence of 0 s and 1 s that represents a simple command for a computer processor chip. Here are two example instructions: Find a two numbers stored somewhere in the computer, add them together, and store the sum somewhere else. Copy a number from some location in RAM circuits to a spot inside the processor chip. The details of how instructions can be combined to make programs is a topic for ENCM 369, not ENCM Using Cygwin Terminal to create an executable Suppose you have edited and saved a C source file called myprog.c, and you want to build an executable and run it. Here are simple steps: In Cygwin Terminal, make sure the working directory is the same folder where you saved myprog.c. In Cygwin Terminal, try this command gcc -Wall myprog.c If the command is successful, there will be no error messages; in fact there will be no messages at all. If there are error messages from gcc, you will have to go back to your text editor to fix the errors. Don t forget to save your changes in the text editor before you return to the terminal to try gcc again! If gcc has succeeded, it will have created an executable called a.exe. To run the executable, use this command in Cygwin Terminal:./a.exe The./ in front of the file name is needed to tell bash, Look in the working directory for an executable file, and run that file as a command. Here are a couple of variations: To run the program, it s enough to use./a as a command. (That works in Cygwin but not in Linux!) You can use the -o option to choose a name different from a.exe for your executable. For example, gcc -Wall myprog.c -o myprog.exe will create an executable called myprog.exe (as long as gcc doesn t find any errors).

8 Editing and Running Programs in the ENCM 339 Lab page 8 of What does -Wall mean? It s not strictly necessary to use -Wall, but it s highly recommended. -Wall (pronounced minus W all by experienced gcc users) is an example of a command-line option. A command-line option starts with - (a minus sign), and modifies the behaviour of the command it is given to. In this case, W means warn and all means all of the patterns of C code that gcc realizes are almost certainly mistakes. By consistently using -Wall, you will find many problems in code that wouldn t be caught with plain gcc. 4.4 How to kill a running executable Sooner or later, you will write a buggy program that will go into an infinite loop, or get stuck looking for input that never gets provided. To kill such a program in Cygwin Terminal, use the Ctrl-C key combination hold down the Control key, and press the C key.

ENCM 339 Fall 2017: Cygwin Setup Help

ENCM 339 Fall 2017: Cygwin Setup Help page 1 of 6 ENCM 339 Fall 2017: Cygwin Setup Help Steve Norman Department of Electrical & Computer Engineering University of Calgary September 2017 Introduction This document is designed to help students

More information

Slide Set 1. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Slide Set 1. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary Slide Set 1 for ENCM 339 Fall 2016 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary September 2016 ENCM 339 Fall 2016 Slide Set 1 slide 2/43

More information

Lab: Supplying Inputs to Programs

Lab: Supplying Inputs to Programs Steven Zeil May 25, 2013 Contents 1 Running the Program 2 2 Supplying Standard Input 4 3 Command Line Parameters 4 1 In this lab, we will look at some of the different ways that basic I/O information can

More information

Slide Set 4. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

Slide Set 4. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng Slide Set 4 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary January 2018 ENCM 369 Winter 2018 Section

More information

ENCM 335 Fall 2018 Lab 2 for the Week of September 24

ENCM 335 Fall 2018 Lab 2 for the Week of September 24 page 1 of 8 ENCM 335 Fall 2018 Lab 2 for the Week of September 24 Steve Norman Department of Electrical & Computer Engineering University of Calgary September 2018 Lab instructions and other documents

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG 1 Notice Class Website http://www.cs.umb.edu/~jane/cs114/ Reading Assignment Chapter 1: Introduction to Java Programming

More information

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12) Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12) Objective: Learn some basic aspects of the UNIX operating system and how to use it. What is UNIX? UNIX is the operating system used by most computers

More information

Getting started with UNIX/Linux for G51PRG and G51CSA

Getting started with UNIX/Linux for G51PRG and G51CSA Getting started with UNIX/Linux for G51PRG and G51CSA David F. Brailsford Steven R. Bagley 1. Introduction These first exercises are very simple and are primarily to get you used to the systems we shall

More information

Getting Started with Command Prompts

Getting Started with Command Prompts Getting Started with Command Prompts Updated December, 2017 Some courses such as Java Programming will ask the student to perform tasks from a command prompt (Windows) or Terminal window (Mac OS). Many

More information

FILE ORGANIZATION. GETTING STARTED PAGE 02 Prerequisites What You Will Learn

FILE ORGANIZATION. GETTING STARTED PAGE 02 Prerequisites What You Will Learn FILE ORGANIZATION GETTING STARTED PAGE 02 Prerequisites What You Will Learn PRINCIPLES OF FILE ORGANIZATION PAGE 03 Organization Trees Creating Categories FILES AND FOLDERS PAGE 05 Creating Folders Saving

More information

Chapter 4. Unix Tutorial. Unix Shell

Chapter 4. Unix Tutorial. Unix Shell Chapter 4 Unix Tutorial Users and applications interact with hardware through an operating system (OS). Unix is a very basic operating system in that it has just the essentials. Many operating systems,

More information

Linux File System and Basic Commands

Linux File System and Basic Commands Linux File System and Basic Commands 0.1 Files, directories, and pwd The GNU/Linux operating system is much different from your typical Microsoft Windows PC, and probably looks different from Apple OS

More information

1 Installation (briefly)

1 Installation (briefly) Jumpstart Linux Bo Waggoner Updated: 2014-09-15 Abstract A basic, rapid tutorial on Linux and its command line for the absolute beginner. Prerequisites: a computer on which to install, a DVD and/or USB

More information

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version... Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing

More information

ENCM 501 Winter 2016 Assignment 1 for the Week of January 25

ENCM 501 Winter 2016 Assignment 1 for the Week of January 25 page 1 of 5 ENCM 501 Winter 2016 Assignment 1 for the Week of January 25 Steve Norman Department of Electrical & Computer Engineering University of Calgary January 2016 Assignment instructions and other

More information

Introduction to Linux and Supercomputers

Introduction to Linux and Supercomputers Introduction to Linux and Supercomputers Doug Crabill Senior Academic IT Specialist Department of Statistics Purdue University dgc@purdue.edu What you will learn How to log into a Linux Supercomputer Basics

More information

Download Free Pictures & Wallpaper from the Internet

Download Free Pictures & Wallpaper from the Internet Download Free Pictures & Wallpaper from the Internet D 600 / 1 Millions of Free Graphics and Images at Your Fingertips! Discover How To Get Your Hands on Them Almost any type of document you create can

More information

Physics 306 Computing Lab 1: Hello, World!

Physics 306 Computing Lab 1: Hello, World! 1. Introduction Physics 306 Computing Lab 1: Hello, World! In today s lab, you will learn how to write simple programs, to compile them, and to run them. You will learn about input and output, variables,

More information

ENCM 501 Winter 2018 Assignment 2 for the Week of January 22 (with corrections)

ENCM 501 Winter 2018 Assignment 2 for the Week of January 22 (with corrections) page 1 of 5 ENCM 501 Winter 2018 Assignment 2 for the Week of January 22 (with corrections) Steve Norman Department of Electrical & Computer Engineering University of Calgary January 2018 Assignment instructions

More information

Introduction to Unix - Lab Exercise 0

Introduction to Unix - Lab Exercise 0 Introduction to Unix - Lab Exercise 0 Along with this document you should also receive a printout entitled First Year Survival Guide which is a (very) basic introduction to Unix and your life in the CSE

More information

Using the Zoo Workstations

Using the Zoo Workstations Using the Zoo Workstations Version 1.86: January 16, 2014 If you ve used Linux before, you can probably skip many of these instructions, but skim just in case. Please direct corrections and suggestions

More information

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

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou EECS 2031 - Software Tools Lab 2 Tutorial: Introduction to UNIX/Linux Tilemachos Pechlivanoglou (tipech@eecs.yorku.ca) Sep 22 & 25, 2017 Material marked with will be in your exams Sep 22 & 25, 2017 Introduction

More information

Intermediate Programming, Spring Misha Kazhdan

Intermediate Programming, Spring Misha Kazhdan 600.120 Intermediate Programming, Spring 2017 Misha Kazhdan Outline Unix/Linux command line Basics of the Emacs editor Compiling and running a simple C program Cloning a repository Connecting to ugrad

More information

CS Fundamentals of Programming II Fall Very Basic UNIX

CS Fundamentals of Programming II Fall Very Basic UNIX CS 215 - Fundamentals of Programming II Fall 2012 - Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the CS (Project) Lab (KC-265)

More information

Unit 13. Linux Operating System Debugging Programs

Unit 13. Linux Operating System Debugging Programs 1 Unit 13 Linux Operating System Debugging Programs COMPILATION 2 3 Editors "Real" developers use editors designed for writing code No word processors!! You need a text editor to write your code Eclipse,

More information

15-122: Principles of Imperative Computation

15-122: Principles of Imperative Computation 15-122: Principles of Imperative Computation Lab 0 Navigating your account in Linux Tom Cortina, Rob Simmons Unlike typical graphical interfaces for operating systems, here you are entering commands directly

More information

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the EECS labs that dual boot

More information

Introduction to Linux

Introduction to Linux Introduction to Linux The command-line interface A command-line interface (CLI) is a type of interface, that is, a way to interact with a computer. Window systems, punched cards or a bunch of dials, buttons

More information

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab Basic Terminal Intro to Linux ssh short for s ecure sh ell usage: ssh [host]@[computer].[otheripstuff] for lab computers: ssh [CSID]@[comp].cs.utexas.edu can get a list of active computers from the UTCS

More information

Slide Set 9. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

Slide Set 9. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng Slide Set 9 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary March 2018 ENCM 369 Winter 2018 Section 01

More information

Running Sentaurus on the DOE Network

Running Sentaurus on the DOE Network Running Sentaurus on the DOE Network Department of Electronics Carleton University April 2016 Warning: This primer is intended to cover the DOE.CARLETON.CA domain. Other domains are not covered in this

More information

Slide Set 2. for ENCM 335 in Fall Steve Norman, PhD, PEng

Slide Set 2. for ENCM 335 in Fall Steve Norman, PhD, PEng Slide Set 2 for ENCM 335 in Fall 2018 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary September 2018 ENCM 335 Fall 2018 Slide Set 2 slide

More information

Lutheran High North Technology The Finder

Lutheran High North Technology  The Finder Lutheran High North Technology shanarussell@lutheranhighnorth.org www.lutheranhighnorth.org/technology The Finder Your Mac s filing system is called the finder. In this document, we will explore different

More information

Week 1: Introduction to R, part 1

Week 1: Introduction to R, part 1 Week 1: Introduction to R, part 1 Goals Learning how to start with R and RStudio Use the command line Use functions in R Learning the Tools What is R? What is RStudio? Getting started R is a computer program

More information

Unix Tutorial Haverford Astronomy 2014/2015

Unix Tutorial Haverford Astronomy 2014/2015 Unix Tutorial Haverford Astronomy 2014/2015 Overview of Haverford astronomy computing resources This tutorial is intended for use on computers running the Linux operating system, including those in the

More information

CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse

CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse Goals - to become acquainted with the Linux/Gnome environment Overview For this lab, you will login to a workstation

More information

Scripting Languages Course 1. Diana Trandabăț

Scripting Languages Course 1. Diana Trandabăț Scripting Languages Course 1 Diana Trandabăț Master in Computational Linguistics - 1 st year 2017-2018 Today s lecture Introduction to scripting languages What is a script? What is a scripting language

More information

Semester 2, 2018: Lab 1

Semester 2, 2018: Lab 1 Semester 2, 2018: Lab 1 S2 2018 Lab 1 This lab has two parts. Part A is intended to help you familiarise yourself with the computing environment found on the CSIT lab computers which you will be using

More information

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform November 8, 2016 1 Introduction The laboratory exercises in this course are to be conducted in an environment that might not be familiar to many of you. It is based on open source software. We use an open

More information

Basic Survival UNIX.

Basic Survival UNIX. Basic Survival UNIX Many Unix based operating systems make available a Graphical User Interface for the sake of providing an easy way for less experienced users to work with the system. Some examples are

More information

CSCI 1100L: Topics in Computing Lab Lab 1: Introduction to the Lab! Part I

CSCI 1100L: Topics in Computing Lab Lab 1: Introduction to the Lab! Part I CSCI 1100L: Topics in Computing Lab Lab 1: Introduction to the Lab! Part I Welcome to your CSCI-1100 Lab! In the fine tradition of the CSCI-1100 course, we ll start off the lab with the classic bad joke

More information

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209 CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System

More information

Laboratory 1: Eclipse and Karel the Robot

Laboratory 1: Eclipse and Karel the Robot Math 121: Introduction to Computing Handout #2 Laboratory 1: Eclipse and Karel the Robot Your first laboratory task is to use the Eclipse IDE framework ( integrated development environment, and the d also

More information

Using IDLE for

Using IDLE for Using IDLE for 15-110 Step 1: Installing Python Download and install Python using the Resources page of the 15-110 website. Be sure to install version 3.3.2 and the correct version depending on whether

More information

Tiny Instruction Manual for the Undergraduate Mathematics Unix Laboratory

Tiny Instruction Manual for the Undergraduate Mathematics Unix Laboratory Tiny Instruction Manual for the Undergraduate Mathematics Unix Laboratory 1 Logging In When you sit down at a terminal and jiggle the mouse to turn off the screen saver, you will be confronted with a window

More information

Running Java Programs

Running Java Programs Running Java Programs Written by: Keith Fenske, http://www.psc-consulting.ca/fenske/ First version: Thursday, 10 January 2008 Document revised: Saturday, 13 February 2010 Copyright 2008, 2010 by Keith

More information

Parallel Programming Pre-Assignment. Setting up the Software Environment

Parallel Programming Pre-Assignment. Setting up the Software Environment Parallel Programming Pre-Assignment Setting up the Software Environment Authors: B. Wilkinson and C. Ferner. Modification date: Aug 21, 2014 (Minor correction Aug 27, 2014.) Software The purpose of this

More information

Unit 10. Linux Operating System

Unit 10. Linux Operating System 1 Unit 10 Linux Operating System 2 Linux Based on the Unix operating system Developed as an open-source ("free") alternative by Linux Torvalds and several others starting in 1991 Originally only for Intel

More information

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C Welcome! Welcome to your CpSc 111 lab! For each lab this semester, you will be provided a document like this to guide you. This material, as

More information

XP: Backup Your Important Files for Safety

XP: Backup Your Important Files for Safety XP: Backup Your Important Files for Safety X 380 / 1 Protect Your Personal Files Against Accidental Loss with XP s Backup Wizard Your computer contains a great many important files, but when it comes to

More information

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

History. Terminology. Opening a Terminal. Introduction to the Unix command line GNOME Introduction to the Unix command line History Many contemporary computer operating systems, like Microsoft Windows and Mac OS X, offer primarily (but not exclusively) graphical user interfaces. The user

More information

A Brief Introduction to the Linux Shell for Data Science

A Brief Introduction to the Linux Shell for Data Science A Brief Introduction to the Linux Shell for Data Science Aris Anagnostopoulos 1 Introduction Here we will see a brief introduction of the Linux command line or shell as it is called. Linux is a Unix-like

More information

Slide Set 8. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

Slide Set 8. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng Slide Set 8 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary March 2018 ENCM 369 Winter 2018 Section 01

More information

Exploring UNIX: Session 3

Exploring UNIX: Session 3 Exploring UNIX: Session 3 UNIX file system permissions UNIX is a multi user operating system. This means several users can be logged in simultaneously. For obvious reasons UNIX makes sure users cannot

More information

Keep Track of Your Passwords Easily

Keep Track of Your Passwords Easily Keep Track of Your Passwords Easily K 100 / 1 The Useful Free Program that Means You ll Never Forget a Password Again These days, everything you do seems to involve a username, a password or a reference

More information

Beyond this course. Machine code. Readings: CP:AMA 2.1, 15.4

Beyond this course. Machine code. Readings: CP:AMA 2.1, 15.4 Beyond this course Readings: CP:AMA 2.1, 15.4 CS 136 Spring 2018 13: Beyond 1 Machine code In Section 04 we briefly discussed compiling: converting source code into machine code so it can be run or executed.

More information

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011 Oregon State University School of Electrical Engineering and Computer Science CS 261 Recitation 1 Spring 2011 Outline Using Secure Shell Clients GCC Some Examples Intro to C * * Windows File transfer client:

More information

4. Some computers may also be customised so that a program such as Word can be started using a keyboard command.

4. Some computers may also be customised so that a program such as Word can be started using a keyboard command. Using Microsoft Word Starting the Program There are several ways to start a program in Microsoft Windows and they may include the following: 1. Clicking an icon on the desktop. 2. Clicking an icon in the

More information

Lab 1 Introduction to UNIX and C

Lab 1 Introduction to UNIX and C Name: Lab 1 Introduction to UNIX and C This first lab is meant to be an introduction to computer environments we will be using this term. You must have a Pitt username to complete this lab. NOTE: Text

More information

CSE115 Lab exercises for week 1 of recitations Spring 2011

CSE115 Lab exercises for week 1 of recitations Spring 2011 Introduction In this first lab you will be introduced to the computing environment in the Baldy 21 lab. If you are familiar with Unix or Linux you may know how to do some or all of the following tasks.

More information

Contents Slide Set 9. Final Notes on Textbook Chapter 7. Outline of Slide Set 9. More about skipped sections in Chapter 7. Outline of Slide Set 9

Contents Slide Set 9. Final Notes on Textbook Chapter 7. Outline of Slide Set 9. More about skipped sections in Chapter 7. Outline of Slide Set 9 slide 2/41 Contents Slide Set 9 for ENCM 369 Winter 2014 Lecture Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2014

More information

Operating System Interaction via bash

Operating System Interaction via bash Operating System Interaction via bash bash, or the Bourne-Again Shell, is a popular operating system shell that is used by many platforms bash uses the command line interaction style generally accepted

More information

Session 1: Accessing MUGrid and Command Line Basics

Session 1: Accessing MUGrid and Command Line Basics Session 1: Accessing MUGrid and Command Line Basics Craig A. Struble, Ph.D. July 14, 2010 1 Introduction The Marquette University Grid (MUGrid) is a collection of dedicated and opportunistic resources

More information

Slide Set 5. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Slide Set 5. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary Slide Set 5 for ENCM 339 Fall 2016 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary October 2016 ENCM 339 Fall 2016 Slide Set 5 slide 2/32

More information

In this exercise you will practice working with HDFS, the Hadoop. You will use the HDFS command line tool and the Hue File Browser

In this exercise you will practice working with HDFS, the Hadoop. You will use the HDFS command line tool and the Hue File Browser Access HDFS with Command Line and Hue Data Files (local): ~/labs/data/kb/* ~/labs/data/base_stations.tsv In this exercise you will practice working with HDFS, the Hadoop Distributed File System. You will

More information

Section 1: Let s Shake Off the Rust!

Section 1: Let s Shake Off the Rust! CSc 127B Introduction to Computer Science II Fall 2015 (McCann) http://www.cs.arizona.edu/classes/cs127b/fall15/ Section 1: Let s Shake Off the Rust! Your section leader should have told you to pair up

More information

CSCI 201 Lab 1 Environment Setup

CSCI 201 Lab 1 Environment Setup CSCI 201 Lab 1 Environment Setup "The journey of a thousand miles begins with one step." - Lao Tzu Introduction This lab document will go over the steps to install and set up Eclipse, which is a Java integrated

More information

Burning CDs in Windows XP

Burning CDs in Windows XP B 770 / 1 Make CD Burning a Breeze with Windows XP's Built-in Tools If your PC is equipped with a rewritable CD drive you ve almost certainly got some specialised software for copying files to CDs. If

More information

Introduction to Programming

Introduction to Programming CHAPTER 1 Introduction to Programming Begin at the beginning, and go on till you come to the end: then stop. This method of telling a story is as good today as it was when the King of Hearts prescribed

More information

Lab 1: Introduction to Linux Networking

Lab 1: Introduction to Linux Networking CMPE 150: Introduction to Computer Networks Fall 2011 http://courses.soe.ucsc.edu/courses/cmpe150/fall11/01/ Lab 1: Introduction to Linux Networking Materials: Please bring a USB drive to each lab section.

More information

B a s h s c r i p t i n g

B a s h s c r i p t i n g 8 Bash Scripting Any self-respecting hacker must be able to write scripts. For that matter, any selfrespecting Linux administrator must be able to script. Hackers often need to automate commands, sometimes

More information

Introduction to Linux and Cluster Computing Environments for Bioinformatics

Introduction to Linux and Cluster Computing Environments for Bioinformatics Introduction to Linux and Cluster Computing Environments for Bioinformatics Doug Crabill Senior Academic IT Specialist Department of Statistics Purdue University dgc@purdue.edu What you will learn Linux

More information

CMSC 201 Spring 2017 Lab 01 Hello World

CMSC 201 Spring 2017 Lab 01 Hello World CMSC 201 Spring 2017 Lab 01 Hello World Assignment: Lab 01 Hello World Due Date: Sunday, February 5th by 8:59:59 PM Value: 10 points At UMBC, our General Lab (GL) system is designed to grant students the

More information

Lab1: Communicating science

Lab1: Communicating science Lab1: Communicating science We would all like to be good citizens of the scientific community. An important part of being a good citizen is being able to communicate results, papers, and ideas. Since many

More information

COMP s1 Lecture 1

COMP s1 Lecture 1 COMP1511 18s1 Lecture 1 1 Numbers In, Numbers Out Andrew Bennett more printf variables scanf 2 Before we begin introduce yourself to the person sitting next to you why did

More information

Slide Set 3. for ENCM 339 Fall 2017 Section 01. Steve Norman, PhD, PEng

Slide Set 3. for ENCM 339 Fall 2017 Section 01. Steve Norman, PhD, PEng Slide Set 3 for ENCM 339 Fall 2017 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary September 2017 ENCM 339 Fall 2017 Section 01

More information

eftp Application User Guide

eftp Application User Guide Team A eftp User Guide 1/30 eftp Application User Guide Table of Contents Page 1. Acknowledgement 2 2. Introduction a. Welcome eftp Audience 3 b. What s in this manual 3 c. Manual Conventions 3 d. Getting

More information

ENCM 335 Fall 2018 Lab 6 for the Week of October 22 Complete Instructions

ENCM 335 Fall 2018 Lab 6 for the Week of October 22 Complete Instructions page 1 of 5 ENCM 335 Fall 2018 Lab 6 for the Week of October 22 Complete Instructions Steve Norman Department of Electrical & Computer Engineering University of Calgary October 2018 Lab instructions and

More information

Working with Basic Linux. Daniel Balagué

Working with Basic Linux. Daniel Balagué Working with Basic Linux Daniel Balagué How Linux Works? Everything in Linux is either a file or a process. A process is an executing program identified with a PID number. It runs in short or long duration

More information

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2 Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades 2017-2018 Q2 Facultat d Informàtica de Barcelona This first lab session is focused on getting experience in working

More information

Tutorial 1: Unix Basics

Tutorial 1: Unix Basics Tutorial 1: Unix Basics To log in to your ece account, enter your ece username and password in the space provided in the login screen. Note that when you type your password, nothing will show up in the

More information

Spring 2017 Gabriel Kuri

Spring 2017 Gabriel Kuri Lab 2 ECE 431L Spring 2017 Gabriel Kuri This lab is made up of two parts. Part 1 will consist of familiarizing yourself with the Raspberry Pi (RPi). It includes running Unix/Linux commands to become somewhat

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

Student Guide to Neehr Perfect Go!

Student Guide to Neehr Perfect Go! Student Guide to Neehr Perfect Go! I. Introduction... 1 II. Quick Facts... 1 III. Creating your Account... 1 IV. Applying Your Subscription... 4 V. Logging in to Neehr Perfect... 6 VI. Activities... 6

More information

Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T

Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T Touring_the_Mac_Session-4_Feb-22-2011 1 To store your document for later retrieval, you must save an electronic file in your computer.

More information

Setting up my Dev Environment ECS 030

Setting up my Dev Environment ECS 030 Setting up my Dev Environment ECS 030 1 Command for SSHing into a CSIF Machine If you already have a terminal and already have a working ssh program (That is, you type ssh into the terminal and it doesn

More information

CSCI 161: Introduction to Programming I Lab 1b: Hello, World (Eclipse, Java)

CSCI 161: Introduction to Programming I Lab 1b: Hello, World (Eclipse, Java) Goals - to learn how to compile and execute a Java program - to modify a program to enhance it Overview This activity will introduce you to the Java programming language. You will type in the Java program

More information

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209 CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System

More information

Working with the Command Line

Working with the Command Line Working with the Command Line Useful Commands cd ls cp mv Running a Java Program Writing Your Code Compiling Your Program Running Your Program Running a Scala Program Useful Commands At its heart, the

More information

Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

Section 2: Developer tools and you. Alex Mariakakis (staff-wide) Section 2: Developer tools and you Alex Mariakakis cse331-staff@cs.washington.edu (staff-wide) What is an SSH client? Uses the secure shell protocol (SSH) to connect to a remote computer o Enables you

More information

CP Lab 1: Introduction to DICE and the C compiler

CP Lab 1: Introduction to DICE and the C compiler Computer Programming (CP) Lab 1, 2017/18 1 CP Lab 1: Introduction to DICE and the C compiler Instructions The main purpose of this Lab is to teach you to become familiar with the DICE environment this

More information

Module 1: Introduction RStudio

Module 1: Introduction RStudio Module 1: Introduction RStudio Contents Page(s) Installing R and RStudio Software for Social Network Analysis 1-2 Introduction to R Language/ Syntax 3 Welcome to RStudio 4-14 A. The 4 Panes 5 B. Calculator

More information

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80 CSE 303 Lecture 2 Introduction to bash shell read Linux Pocket Guide pp. 37-46, 58-59, 60, 65-70, 71-72, 77-80 slides created by Marty Stepp http://www.cs.washington.edu/303/ 1 Unix file system structure

More information

Introduction: The Unix shell and C programming

Introduction: The Unix shell and C programming Introduction: The Unix shell and C programming 1DT048: Programming for Beginners Uppsala University June 11, 2014 You ll be working with the assignments in the Unix labs. If you are new to Unix or working

More information

Lab Assignment #1. University of Pittsburgh Department of Electrical and Computer Engineering

Lab Assignment #1. University of Pittsburgh Department of Electrical and Computer Engineering Fall 2017 ECE1192/2192 Lab Assignment #1 University of Pittsburgh Department of Electrical and Computer Engineering 1 Objective The objective of this handout is to help you get familiar with the UNIX/Linux

More information

Parts of this tutorial has been adapted from M. Stonebank s UNIX Tutorial for Beginners (http://www.ee.surrey.ac.uk/teaching/unix/).

Parts of this tutorial has been adapted from M. Stonebank s UNIX Tutorial for Beginners (http://www.ee.surrey.ac.uk/teaching/unix/). Ubuntu tutorial Parts of this tutorial has been adapted from M. Stonebank s UNIX Tutorial for Beginners (http://www.ee.surrey.ac.uk/teaching/unix/). 1 Installing Ubuntu About Ubuntu For our lab sessions

More information

Slide Set 3. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Slide Set 3. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary Slide Set 3 for ENCM 339 Fall 2016 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary September 2016 ENCM 339 Fall 2016 Slide Set 3 slide 2/46

More information

Introduction to Linux Environment. Yun-Wen Chen

Introduction to Linux Environment. Yun-Wen Chen Introduction to Linux Environment Yun-Wen Chen 1 The Text (Command) Mode in Linux Environment 2 The Main Operating Systems We May Meet 1. Windows 2. Mac 3. Linux (Unix) 3 Windows Command Mode and DOS Type

More information

Practical Session 0 Introduction to Linux

Practical Session 0 Introduction to Linux School of Computer Science and Software Engineering Clayton Campus, Monash University CSE2303 and CSE2304 Semester I, 2001 Practical Session 0 Introduction to Linux Novell accounts. Every Monash student

More information

Customizing DAZ Studio

Customizing DAZ Studio Customizing DAZ Studio This tutorial covers from the beginning customization options such as setting tabs to the more advanced options such as setting hot keys and altering the menu layout. Introduction:

More information