Development Environment & Linux Guide

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

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

Linux/Cygwin Practice Computer Architecture

Development Environment. ICLAB NCTU Institute of Electronics

Parallel Programming Pre-Assignment. Setting up the Software Environment

CMPT 300. Operating Systems. Brief Intro to UNIX and C

Laboratory 1 Semester 1 11/12

Practical Session 0 Introduction to Linux

Introduction to Linux Environment. Yun-Wen Chen

Linux Survival Guide

Helpful Tips for Labs. CS140, Spring 2015

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

Unit 13. Linux Operating System Debugging Programs

CS 261 Recitation 1 Compiling C on UNIX

Mills HPC Tutorial Series. Linux Basics I

User Guide Version 2.0

Unit 10. Linux Operating System

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

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Introduction to Linux. Fundamentals of Computer Science

Physics REU Unix Tutorial

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

Lab Working with Linux Command Line

Recitation #1 Boot Camp. August 30th, 2016

Introduction to the Linux Command Line

Introduction to the UNIX command line

Using the Unix system. UNIX Introduction

CSC111 Computer Science II

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

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

AMS 200: Working on Linux/Unix Machines

Using the Zoo Workstations

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

Projects and Environment Introduction

Short Read Sequencing Analysis Workshop

Intro to Linux & Command Line

CMSC 201 Spring 2017 Lab 01 Hello World

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

CS Fundamentals of Programming II Fall Very Basic UNIX

Jackson State University Department of Computer Science CSC / Advanced Information Security Spring 2013 Lab Project # 5

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

Lab 1 Introduction to UNIX and C

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

Operating Systems and Using Linux. Topics What is an Operating System? Linux Overview Frequently Used Linux Commands

Lab6 GDB debugging. Conventions. Department of Computer Science and Information Engineering National Taiwan University

Hand-on Labs for Chapter 1 and Appendix A CSCE 212 Introduction to Computer Architecture, Spring

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers

Linux environment. Graphical interface X-window + window manager. Text interface terminal + shell

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

CS 300. Data Structures

Linux and Git Boot Camp

C++ Programming on Linux

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

Getting Started with UNIX

SECTION 2: CODE REASONING + PROGRAMMING TOOLS. slides borrowed and adapted from Alex Mariakis and CSE 390a

Introduction to Linux (Part II) BUPT/QMUL 2018/03/21

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

Std: XI CHAPTER-3 LINUX

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

Chapter-3. Introduction to Unix: Fundamental Commands

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

CISC 220 fall 2011, set 1: Linux basics

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

UNIX Quick Reference

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

Introduction: What is Unix?

Problem Set 1: Unix Commands 1

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

CS CS Tutorial 2 2 Winter 2018

An Introduction to Unix

CMSC 201 Spring 2018 Lab 01 Hello World

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

CS370 Operating Systems

STA 303 / 1002 Using SAS on CQUEST

Program Design: Using the Debugger

Embedded Systems Ch 3A Linux Development Environment

Introduction of Linux

Week Overview. Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

Introduction to the Command line. Introduction to the command line. Introduction to the Command line. GNU/Linux at South Wales

Section 1: Tools. Kaifei Chen, Luca Zuccarini. January 23, Make Motivation How... 2

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Getting started with Hugs on Linux

Programming Studio #1 ECE 190

EKT332 COMPUTER NETWORK

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

CS 270 Systems Programming. Debugging Tools. CS 270: Systems Programming. Instructor: Raphael Finkel

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Lecture 01 - Working with Linux Servers and Git

Portland State University Maseeh College of Engineering and Computer Science. Proficiency Examination Process

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

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

Introduction to Linux

Lab 1 Introduction to UNIX and C

AN INTRODUCTION TO UNIX

CSE 374 Programming Concepts & Tools

Getting started with Hugs on Linux

Lab 1 1 Due Wed., 2 Sept. 2015

Transcription:

Development Environment & Linux Guide Juwon Lee(jwlee@archi.snu.ac.kr) School of Computer Science and Engineering Seoul National University

Development Environment MobaXterm Provide Linux-like environment on Windows. Download and extract MobaXterm at https://mobaxterm.mobatek.net/downloadhome-edition.html 2

Development Environment SSH Secure Shell refers to an application or protocol that provides the ability to login, write commands, or copy files to another computer on the network. 3

Development Environment SSH Secure Shell refers to an application or protocol that provides the ability to login, write commands, or copy files to another computer on the network. Mac OS : ssh ccp11111@ccp.snucse.org on terminal ccp + last 5 digits of your student number 4

Development Environment SSH Default password : 1234 5

Development Environment SSH It s your personal workspace! 6

Linux Commands passwd First thing you have to do after first login. Change password. Type your current password(1234) first and type your new password twice. 7

Linux Commands ls Print the list of files and directories of working directory. cd <dest> Change working directory to destination directory. If the destination directory is.., then change to parent directory.. means current directory. 8

Linux Commands pwd Print working directory. First / means root directory. mkdir <name> Make new directory. 9

Linux Commands rmdir <name> Remove empty directory. rm <name> Remove file. Remove non-empty directory with -r option. 10

Linux Commands mv <name> <new_name/dir> Move file/directory to other directory or change name. cp <src> <dest> Copy file 11

Linux Commands man <command> Print manual of command. 12

Linux Commands vi <name> Text editor for programming. 13

Vi Input mode Edit text like Notepad. To get into input mode from command mode, type a / i key. Command mode Initial mode of vi. Additional functions about editing such as find, replace, save, quit, To get out from input mode, type esc key. 14

Vi From here, everything is working on command mode. Save / quit :w save :w <name> - save as <name> :q! quit (No save) :wq save and quit 15

Vi Copy / paste yy copy current line [n]yy copy [n] lines from current line p - paste Delete line dd delete current line [n]dd delete [n] lines from current line :<from>,<to> d delete lines from <from> to <to> <from> and <to> is line number. means current line, $ means last line(ex. :.,$ d delete everything from current line) 16

Vi Find /<keyword> - find <keyword> n find next match N find previous match Replace :s/<src>/<dest> - replace <src> to <dest> on current line :<from>,<to> s/<src>/<dest> - replace <src> to <dest> from <from> to <to> :%s/<src>/<dest>/g replace all <src> to <dest> on file Undo u undo last command/modified text It maybe very useful. 17

Compilation gcc the GNU Compiler Collection. gcc <file> Execution./<file_name> hello.c 18

Compilation gcc the GNU Compiler Collection. gcc <file> Execution./<binary_file> 19

Debugging gdb the GNU Project Debugger. gcc -g <file> gdb <binary_file> 20

Debugging Print source code list print next 10 lines list <line_number> - print 10 lines around <line_number> list <function_name> - print 10 lines around <function_name> list - print previous 10 lines Breakpoint break <line_number> - set breakpoint on <line_number> break <function_name> - set breakpoint on entrance of <function_name> info break show the list of breakpoint and watchpoint clear <line_number> - delete breakpoint on <line_number> clear <function_name> - delete breakpoint on entrance of <function_name> 21

Debugging Watchpoint watch <condition> - suspend processing when <condition> is met ex. watch a > 1 suspend processing when the value of variable a is larger than 1 info watch show the list of watchpoint delete delete all breakpoints and watchpoints Start and stop execution run start program execution from beginning of the program. continue continue execution on suspend kill stop program execution quit exit GDB debugger 22

Debugging Line execution step execute next line of code, step into a function next execute next line of code, not enter function Examine variables print <variable> - print value of <variable> 23

Project Specification - Minesweeper - Juwon Lee(jwlee@archi.snu.ac.kr) School of Computer Science and Engineering Seoul National University

Minesweeper Rule Two-dimension array of squares is used and fixed number of mines are planted on squares randomly. The player can sweep squares until the player sweeps all non-mined squares(player win) or the player sweeps a mined square(player lose). If the swept square are not mined and the adjacent squares have one or more mines, the swept square display the number of mines around it. If the swept square are not mined and the adjacent squares have no mine, then the adjacent squares are swept recursively. 25

Minesweeper Interface 10*10 array X : no mine around it 1~8 : number of mine around it - : unknown input : coordinate(x, y) to be swept 26

Minesweeper Variables/Functions init_board() and show_interface() functions are provided. Your work : fill the main(), sweep() and check_game() functions. Please keep this specification and don t modify init_board(), show_interface() function. 27

Minesweeper Submission Compress your source code with name of P_<student_number>.zip ex. P_2018-11111.zip Send your file to jwlee@archi.snu.ac.kr Mail title should be the same as file name except.zip Due date : 2018/06/10 23:59 You can submit your code as many times as you want before the due date. If you copy other s program, you will get failing grade. Don t let other student see your code. 28

Any Problem or Question E-mail : jwlee@archi.snu.ac.kr 29

About Midterm Closed-book, closed-notes. No cell phones/smart devices/dictionaries allowed. Prepare your ID card. 30