CS 246 Winter Tutorial 1

Similar documents
CS CS Tutorial 2 2 Winter 2018

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

CSCE UVM Hands-on Session-1 Pre-Work

Intermediate Programming, Spring Misha Kazhdan

CS 143A. Principles of Operating Systems. Instructor : Prof. Anton Burtsev

LAB #5 Intro to Linux and Python on ENGR

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

CS 261 Recitation 1 Compiling C on UNIX

Introduction to the Linux Command Line

Setting up my Dev Environment ECS 030

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

CSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts

Session 1: Accessing MUGrid and Command Line Basics

The Command Shell. Fundamentals of Computer Science

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

Preparing and Running C Programs for CS 136 (W08)

Unix. Examples: OS X and Ubuntu

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

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18

CS Fundamentals of Programming II Fall Very Basic UNIX

Helsinki 19 Jan Practical course in genome bioinformatics DAY 0

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)

Temple University Computer Science Programming Under the Linux Operating System January 2017

Introduction to Linux for BlueBEAR. January

Linux/Cygwin Practice Computer Architecture

Recitation #1 Unix Boot Camp. August 29th, 2017

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

Version Control with Git

CSC111 Computer Science II

Short Read Sequencing Analysis Workshop

Dalhousie University CSCI 2132 Software Development Winter 2018 Lab 8, March 22

Parallel Programming Pre-Assignment. Setting up the Software Environment

C++ Programming on Linux

Unix Shells and Other Basic Concepts

Introduction to the UNIX command line

CS Operating Systems, Fall 2018 Project #0 Description

Gradle and Command Line Workshop Activity

Linux Survival Guide

Recitation #1 Boot Camp. August 30th, 2016

Systems Programming and Computer Architecture ( ) Exercise Session 01 Data Lab

Unix Tutorial Haverford Astronomy 2014/2015

15-122: Principles of Imperative Computation

User Guide Version 2.0

Introduction: What is Unix?

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011)

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

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

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

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

Helpful Tips for Labs. CS140, Spring 2015

sftp - secure file transfer program - how to transfer files to and from nrs-labs

CSCI 2132 Software Development. Lecture 5: File Permissions

Introduction to Linux

Operating System Interaction via bash

CS197U: A Hands on Introduction to Unix

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

Lecture 01 - Working with Linux Servers and Git

Introduction to Linux. Fundamentals of Computer Science

Ftp Command Line Commands Linux Example Windows Putty

Using WestGrid from the desktop Oct on Access Grid

Linux and Git Boot Camp

9 and 11-Jan CSCI 4152/6509 Natural Language Processing Lab 1: FCS Computing Environment, SVN Tutorial. FCS Computing Environment, SVN Tutorial

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

Using the Zoo Workstations

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko

CMSC 201 Spring 2017 Lab 01 Hello World

Introduction to UNIX I: Command Line 1 / 21

Part I. UNIX Workshop Series: Quick-Start

Perl and R Scripting for Biologists

COSC UNIX. Textbook. Grading Scheme

CSCI 4152/6509 Natural Language Processing. Lab 1: FCS Computing Environment

Linux hep.wisc.edu

For Dr Landau s PHYS8602 course

Introduction to Linux Workshop 1

Eugene, Niko, Matt, and Oliver

Overview of the UNIX File System

Using Ruby and irb in CSE 341 Winter 2015

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys

Lab 1 Introduction to UNIX and C

CMSC 201 Spring 2018 Lab 01 Hello World

1 Getting Started with Linux.

Laboratory 1 Semester 1 11/12

ECE112 - Lab 6. Purpose. Parts/tools needed: Make sure we have a properly working environment

Unix File System. Learning command-line navigation of the file system is essential for efficient system usage

Lab 3a Using the vi editor

CSE 391 Editing and Moving Files

Lab 1 Introduction to UNIX and C

Once you have installed MobaXterm, open MobaXterm. Go to Sessions -> New Session, and click on the SSH icon.

CS370 Operating Systems

Unit 10. Linux Operating System

Working Outside the Lab

Precursor Steps & Storage Node

Supercomputing environment TMA4280 Introduction to Supercomputing

1. Open VirtualBox and start your linux VM. Boot the machine and log in with the user account you created in Lab #1. Open the Terminal application.

Exercise 1: Basic Tools

A Hands-On Tutorial: RNA Sequencing Using High-Performance Computing

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

Introduction to Linux Environment. Yun-Wen Chen

Getting Started with UNIX

Transcription:

CS 246 Winter 2015 - Tutorial 1 January 11, 2016 1 Summary General Administration Stuff CS Undergraduate Environment Useful Software Basic Commands.profile Text Editors 2 General Administration Stuff Course E-mail: cs246@uwaterloo.ca Use Piazza for most questions Questions containing potential solutions should be private or asked in office hours If your question is made private by an instructor - keep it that way E-mail the course account or post on Piazza about topics you would like to see in upcoming tutorials This course uses git as a mechanism for distribution of assignments, lecture material, and tutorial material. Instruction on how to setup git are part of A0. 1

3 CS Undergraduate Environment Create a Password Logging into the CS Undergrad Environment requires a password that is separate from your uwaterloo password. https://www.student.cs.uwaterloo.ca/password/ Although you require the Internet to interact with the environment it also has a number of benefits including: regular back-ups, pre-installed required software and most importantly there are no compatibility issues with marmoset. 4 Useful Software 4.1 Linux Terminal: 1. Open a Terminal. 2. Execute the command ssh userid@linux.student.cs.uwaterloo.ca 3. Enter your CS environment password when prompted. 4. Done. Most Linux distributions also come pre-installed with most of the tools you will use in this course (e.g. vim, ssh, scp) Note: You may need to separately install git if you want to checkout a local version of the repository. 4.2 Mac Terminal: Every Mac has a Terminal which runs a text interface for Unix. Follow the same steps as for a Linux Terminal. Note however, you will need to install XQuartz for later assignments which can be downloaded here: http://xquartz.macosforge.org/landing Note: You may need to separately install git if you want to checkout a local version of the repository. 2

4.3 Windows You only need to use one of the following options: PuTTY (Recommended) An ssh client which can be downloaded for free Requires Internet access For convenience use the host name userid@linux.student.cs.uwaterloo.ca and save this session. You will likely want to install Xming (http://sourceforge.net/projects/xming) onto your local machine; it will be used later in the course for some assignments. WinSCP (http://winscp.net/eng/index.php) is used to copy files (like assignments) from your Linux account to your local machine. machine. Cygwin Provides a Unix-like environment and command-line interface for Windows. Can work without Internet access When installing Cygwin, you will need to install a number of packages including: x11, vim, g++, gdb, make, git, and ssh. Different OS Virtual Machine Dual Boot Go to one of the labs on campus http://www.apple.com/ca/mac/ **this link is included for completion and humor and does not represent an endorsement nor condemnation of the product. Humorous complaints about the above link may be directed to mathnews@gmail.com*** 5 Basic Commands Shell Commands vs System Commands Basics: Shell commands are executed by the shell System commands are called by shell (versus executed by shell). exit: terminates shell 3

echo: write arguments, separated by spaces and terminated with newline. cat: prints files. pwd: Displays absolute path to your current working directory. ls: Lists contents of your current working directory The -l option can be taken in as an argument to ls to print a detailed list of content in your current working directory. This is particularly useful since it allows you to determine what is a file and what is a directory. With the -a option both hidden and non-hidden files are displayed. cd: Changes your current directory to the one indicated by the path. example: cd cs246/1161 Relative vs Absolute Path Relative Path: The path from your current directory to another file or directory. example: cs246/1161 Absolute Path: A path from the root of the file system to a particular file or directory. example: /bin Hidden Files Hidden files are denoted with a dot at the start of the file name. To view hidden files you will need to use the -a option with the ls command. 6.profile When you log into the CS environment there are a number of files that get executed. One of these such files is.profile which sets up what your prompt looks like and executes any additional code that you add to it. For convenience modify.profile to execute the command source /u/cs246/setup every time you log in (read A0 to find why this is useful) 1. vim.profile 2. Add the command source /u/cs246/setup to the bottom of the file 3. Save the file What would happen if a friend added the following two lines to your.profile alias ls= echo troll/space.bash alias cd= echo LOL! Nice try 4

7 Text Editors Why not use Notepad? Functionality is the set of operations provided by an editor to display and affect change. The more powerful the functions and the more they can interact, the faster a user can perform required tasks. An interface (i.e. text-based, graphical, etc.) is the mechanism used to invoke the functionality of the text editor and is largely (but not wholly) independent of the functionality You should choose a text editor with a high degree of functionality and integration that has an interface that suits you. Both Emacs and Sublime Text have a high degree of functionality and integration but with drastically different interfaces. Recommended: Emacs (https://www.student.cs.uwaterloo.ca/ cssystem/emacstutorial.pdf), Sublime Text 3, Vim Incomplete list of desirable features: Multiple Undo, Multiple Windows, Auto Indentation, Searching, Layouts, Backup Files, Syntax Highlighting and Integration with other software (i.e. compilers, command line, debuggers) 8 Misc. If you are using a terminal on your local machine to access the undergraduate environment you can you the command scp to transfer files between the two systems. The following is an example of how to copy a file from your local machine into your home directory on the undergraduate environment scp path/file.txt userid@linux.student.cs.uwaterloo.ca: /file copy.txt 5