Lecture 01 - Working with Linux Servers and Git

Similar documents
CS 261 Recitation 1 Compiling C on UNIX

Intro to Linux & Command Line

CSCI 2132 Software Development. Lecture 5: File Permissions

Intermediate Programming, Spring Misha Kazhdan

Introduction to the UNIX command line

Lab 1 1 Due Wed., 2 Sept. 2015

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

Software Development I

Warmup. A programmer s wife tells him, Would you mind going to the store and picking up a loaf of bread? Also, if they have eggs, get a dozen.

User Guide Version 2.0

CSCI 2132: Software Development. Norbert Zeh. Faculty of Computer Science Dalhousie University. Subversion (and Git) Winter 2019

Introduction to the Linux Command Line

CS480. Compilers Eclipse, SVN, Makefile examples

CS CS Tutorial 2 2 Winter 2018

Helpful Tips for Labs. CS140, Spring 2015

Computer Science Design I Version Control with Git

Exercise 1: Basic Tools

Version Control with Git

CSE 391 Editing and Moving Files

CSCE UVM Hands-on Session-1 Pre-Work

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Introduction to Linux

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

Software Project (Lecture 4): Git & Github

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

GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová,

CSE 390a Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

The Command Line. Matthew Bender. September 10, CMSC Command Line Workshop. Matthew Bender (2015) The Command Line September 10, / 25

Programming Studio #1 ECE 190

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

Revision Control and GIT

Linux and Git Boot Camp

CSC111 Computer Science II

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18

CS 2400 Laboratory Assignment #1: Exercises in Compilation and the UNIX Programming Environment (100 pts.)

DATA 301 Introduction to Data Analytics Command Line. Dr. Ramon Lawrence University of British Columbia Okanagan

Why learn the Command Line? The command line is the text interface to the computer. DATA 301 Introduction to Data Analytics Command Line

Git & Github Fundamental by Rajesh Kumar.

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

Chapter 5. Version Control: Git

Mills HPC Tutorial Series. Linux Basics I

Basic git. Interactive.

Programming Studio #1 ECE 190

Recitation #1 Boot Camp. August 30th, 2016

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

CSE 391 Lecture 1. introduction to Linux/Unix environment

Introduction: What is Unix?

February 2 nd Jean Parpaillon

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP

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

Eugene, Niko, Matt, and Oliver

Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master...

Linux Introduction Martin Dahlö Valentin Georgiev

Version Control Systems (Part 1)

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

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

Revision Control. An Introduction Using Git 1/15

Linux Command Line Primer. By: Scott Marshall

Version control with Git.

Linux hep.wisc.edu

LAB 0: LINUX COMMAND LINE AND SVN

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

Lab 1 Introduction to UNIX and C

From Commits to Collaboration: A Git Tutorial for Social Scientists

Introduction to Git and Github

Version control. what is version control? setting up Git simple command-line usage Git basics

How to be a 1337 h4ck3r: Git + Linux

AN INTRODUCTION TO UNIX

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

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

Intro Git Advices. Using Git. Matthieu Moy. Matthieu Moy Git 2016 < 1 / 11 >

Introduction to Linux Environment. Yun-Wen Chen

Version Control: Gitting Started

Introduction to Version Control

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

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

C++ Programming on Linux

Version Control Systems: Overview

Lab Working with Linux Command Line

Git for Version Control

Working with Basic Linux. Daniel Balagué

Parallel Programming Pre-Assignment. Setting up the Software Environment

AMS 200: Working on Linux/Unix Machines

! #Running this command from the top directory of your project will add all your changes."! $ git add."

CSE 391 Lecture 1. introduction to Linux/Unix environment

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1

CSE 391 Lecture 9. Version control with Git

2 Initialize a git repository on your machine, add a README file, commit and push

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

CSCI 2132 Software Development. Lecture 4: Files and Directories

Workshop: High-performance computing for economists

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng

CSE 391 Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

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

Version control system (VCS)

Effective Software Development and Version Control

Introduction to UNIX Command Line

Introduction To. Barry Grant

Introduction. File System. Note. Achtung!

Transcription:

Jan. 9, 2018

Working with Linux Servers: SSH SSH (named for Secure SHell) is a protocol commonly used for remote login. You can use it from a command line interface with the following syntax ssh username@server_url Example: I can log into the McMaster Server: mills.mcmaster.ca with my MacID: dalvescb ssh dalvescb@mills.mcmaster.ca Try logging into mills.mcmaster.ca with your MacID

Working with Linux Servers: SCP SCP (Secure Copy) allows Remote Transfer of files To copy a file from a server to /copypath scp username@server_url:/path/to/file.txt /copypath To copy a file from a server to local machine scp /path/to/file.txt username@server_url:/path/to/

Working with Linux Servers: Browsing File Directories File Paths are denoted using a backslash like so /path/to/file.txt Basic Commands for file browsing include cd /path/to Change Directory to /path/to ls List current directory contents pwd show Parent Working Directory (where am I?) Try entering pwd after logging in with ssh, it should list your HOME directory

Working with Linux Servers: Manipulating Files/Directories Basic Commands for file manipulation cp file1.txt file2.txt Copy file1.txt to file2.txt cp -r dir /path/to Copy a directory dir and all its contents to /path/to/ mv file.txt /path/to Move file or directory to /path/to mv file1.txt file2.txt Rename file1.txt to file2.txt

Working with Linux Servers: Manipulating Files/Directories Basic Commands for file manipulation mkdir Directory1 Make a new directory named Directory1 rm file.txt Removes a file - Warning: no undo rm -r dir Removes a directory and its contents - Warning: no undo

Working with Linux Servers: Text Editors GNU Emacs - https://www.gnu.org/software/emacs/ Complicated but very powerful Nano - https://www.nano-editor.org Simple and very popular Vim - https://github.com/vim/vim Recommended for this course, feature-ful and not too complicated

Working with Linux Servers: Built-in Manuals If you ever want to refresh your memory on how a certain command works, you can access the command s Manual with the following command man command Press q to quit Warning: most linux/unix commands, even the very basic ones, are extremely feature-full. The built-in manuals are often fairly intimidating for beginners

Version Control Systems Version Control gives you a means to manage your source code, and is essential for multi-developer projects. There are really only two commonly used version control systems amongst software developers Subversion (SVN) Simpler design, revolving around a single centralized repository Git A distributed revision control system, a bit more complicated but with more powerful features

Version Control with Git: Simple Git Commands git clone repo-url Download the code from Remote Repo to current directory git pull Merges code from remote repository to current directory git add file / git rm file First step to adding or removing a file or directory git reset file Undo local changes so far (opposite of git add) git commit -m comment Commit changes to Local Repo git push Push changes in Local Repo to the Remote Repo git help List git commands with descriptions

Version Control with Git: Repository Control Flow Git version control manages code between two Repo s: a Local Repo and a Remote Repo Working Directory add reset Staging (Index) reset [commit] commit pull Local Repository push Remote Repository