CMU MSP Intro to Hadoop

Size: px
Start display at page:

Download "CMU MSP Intro to Hadoop"

Transcription

1 CMU MSP Intro to Hadoop H. Seltman, April 3 and ) Carl had created an MSP virtual machine that you can download as an appliance for VirtualBox (also used for SAS University Edition). See location and important instructions on Canvas. The machine gives you a full Hadoop setup accessed from a Linux terminal on your PC or Mac. 2) One time setup a) Start Virtual Box and choose File / Preferences on the menu, then under Input, uncheck auto capture keyboard, and click OK. b) Use File / Import appliance, then point to Hadoop2.ova, and import with default settings 3) Session startup from VirtualBox a) Start Hadoop2 by clicking it and then clicking the Start arrow. What happens next varies a bit depending on whether you are doing a first time startup or restarting from a shut down state vs. restarting from a save the machine state state. Wait many seconds until you get to the Ubuntu desktop, which provides some Linux Services without using the command prompt. While you are waiting, you can click any little x boxes on the upper right corresponding to messages about mouse integration, etc. b) It is recommended that you use full screen mode, so that it appears that your whole desktop is the Linux machine. To do this, choose View / Full screen mode from the menu. From the information box write down the information from the sentence that tells you what your VirtualBox Host Key is. You can click the box to prevent seeing this box in the future. The box suggests that In the future, to exit full screen mode, hold down the host key and press F. To see the main menu bar, hold down the host key and press the home key. It appear that this is only true if you do not uncheck auto capture keyboard as suggested in step 2a. If you unchecked the box as recommended, get to the main menu by holding your mouse at the bottom of the screen, and select View / Full Screen to exit full screen. c) On the menu, go to Devices / Shared Clipboard, and select Bidirectional so that you can copy and paste text to and from the virtual machine and your computer. In Linux, highlight the text and right-click to get to copy. Use control-y as the paste key. 4) Introduction to the Virtual Linux Machine a) If you don t use the machine for a little while you will see a window with the header Student and the word password. Enter your password in the password box. b) The Ubuntu desktop is a bare bones GUI that lets you accomplish some things without using the command prompt. You should mostly use the command prompt to get more Linux practice. The icon bar on the left has the GUI functionality. c) To start a Firefox browser, so that you can look things up while working on your virtual Linux machine, click the Firefox world icon. If it is full screen, move your mouse to the top left and click the small rectangle inside the circle (next to the x and - circles) to make it a window. Resize and move the window using the mouse in the usual way. 1

2 d) Start a terminal window by clicking the icon that shows a terminal with >_. This is where you will do most of your work. You can move and resize your terminal. You can start multiple terminals. 5) First explorations in the terminal window a) To learn about your new machine, try the following Linux commands: i) whoami ii) echo $SHELL iii) echo $HOME iv) pwd v) ls vi) ls -a vii) ls / viii) ls -l Documents ix) echo $PATH b) Write a sample shell script i) Note that /home/student/bin is at the top of your path, but is not on your machine. Create that directory. ii) Type which bash. What does that tell you? iii) Start the emacs text editor with the argument (for emacs this is the file to edit) home/student/bin/ffind, being sure to use the suffix character that starts the program in a new shell so that you will still be able to work at your command prompt. iv) In the emacs window, note that there are clickable links for help on the bottom, and that you have a check box to Never show it again. Click Dismiss this startup screen. v) Enter the following code in the editor. #!/bin/bash # Find a file by a portion of the file name in the # current folder and all folders below. if [[ $# -ne 1 ]]; then echo Usage: $0 partialfilename fi find. -type f 2>/dev/null grep "$1" vi) Note that many features of the editor are available by menu or menu bar, and that most also have hotkey versions. Click Save, then use File / Quit on the menu. vii) Go to the root directory on the computer viii) Use ffind find file names containing semaphore. 2

3 c) Setup a share folder to facilitate sharing files across machines i) Make a folder on your PC or Mac that will be used to share files across machines. Let s call in share (in some directory of your choice). ii) On the VirtualBox menu, choose Machine/Settings. Choose Shared folders on the left, then click the folder + icon ( Adds new shared folder. ). Under Folder Path navigate to the folder you want to share on your computer. Choose a Folder Name, e.g., share, and check Auto-mount and Make Permanent, but not Read-only. Click OK twice. iii) Create a share folder on your VirtualBox, e.g., /home/student/share. iv) Connect the two folders with the Linux command sudo mount -t vboxsf share /home/student/share. (If you called your Folder Name pointer to your Mac/Windows machine folder something other than share, use that instead.) v) Now any file put in either /home/student/share on the VirtualBox or the Folder Path on your PC/Mac will also appear in the other location. d) Starting Hadoop and Stopping i) Hadoop is implemented as a Java process. Check which Java processes are running with jps. You should only see Jps itself. ii) Start Hadoop and Yarn on your machine by clicking the green arrow Start Hadoop button on the left side of your Ubuntu console (ignoring the deprecated message ). It is best to use the Stop Hadoop button below the Start Hadoop button to stop the Hadoop and yarn processes before shutting down your virtual machine, because sometimes it does not restart correctly when you re-open your virtual machine. iii) Verify that all of the components are working by running the jps command again. You should see the NameNode and DataNode which are the Hadoop processes, and NodeManager and ResourceManager which are the Yarn processes. Now you know how to check if Hadoop is running on your machine. iv) To stop Hadoop, click the red Stop Hadoop button. The UNIX command jps can be used to verify that all of the Hadoop Java processes have been shut down. There are reports that you may run into difficulty if you do not stop Hadoop before closing VirtualBox. To close VirtualBox close the window or use the menu item File/Close. Either saving the machine state or powering off the machine are OK. e) Getting to know the Hadoop file system i) The Hadoop file system runs alongside the UNIX file system. We use the hdfs (hadoop distributed file system) command to manipulate the Hadoop file system and transfer files between systems. Hadoop analyses only run on the Hadoop file system. ii) Think of the hdfs command as the prefix to a set of standard commands that apply to the Hadoop file system. iii) Most of the commands of hdfs are technical things you will likely never need to use. The main command is dfs. The syntax is hdfs dfs -subcommand [subcommand options]. You can see valid the subcommands here. Many of the subcommands mimic standard UNIX file commands, e.g., ls, mkdir, etc., but not cd. 3

4 iv) On your version of the Hadoop machine, your home directory on the Hadoop side is /users/student (as opposed to /home/student on the UNIX side). Your working directory is your (unchangeable) home directory. v) Here are the most useful sub commands for the hdfs dfs command: (1) ls, e.g., hdfs dfs -ls /user/student (2) mkdir and rmdir, e.g., hdfs dfs -mkdir test (3) put <UNIX(s)> <Hadoop>, i.e., transfer one or more files from UNIX to Hadoop, e.g., echo abc > letters.txt; echo def > letters2.txt ls hdfs dfs -put letters.txt letters2.txt /user/student [or hdfs dfs -put letters.txt letters2.txt. ] hdfs dfs -ls (4) get <Hadoop(s)> UNIX, i.e., transfer one or more files from Hadoop to UNIX, e.g., hdfs dfs -get /user/student/letters*.txt ~/test (5) appendtofile <UNIX> <Hadoop>, e.g., hdfs dfs -appendtofile letters2.txt /user/student/letters.txt (6) cat, e.g., hdfs dfs -cat letters.txt (7) Additional commands (with obvious syntax) include rm, mv, cp, tail (but not head), and du (disk usages). f) Appending to ~/.bashrc to make some commands be auto-run i) The UNIX file ~/.bashrc contains important commands that are entered into your bash shells as they start up. You can add to that file (typically at the end of the file). ii) We will be running various examples stored in a jar (Java Archive) file that comes with Hadoop. First use which hadoop to find where the hadoop binary lives on your system. Then replace bin/hadoop with share/hadoop and ls at this new location. This shows the folders for various hadoop programs. Look in the mapreduce folder and note the name of the.jar file containing the examples. Make a shell variable called mrex that holds the location and name of the map-reduce examples jar. We will need this soon. iii) Use emacs ~/.bashrc & to edit the file. Add lines to set the alias dfs="hdfs dfs" and the shell variable mrex. Save the file. Close your terminal and restart it. Use echo $mrex to show that everything worked. Consider periodically adding other entries to ~/.bashrc. g) First Hadoop project: word counting i) Create UNIX folder /home/student/ex1 and cd to it. ii) Make a simple useless input dataset with ps -aux > psaux.txt iii) Create folder /user/student/ex1 on the hadoop file system using the syntax hdfs dfs - mysubcommand myoptions. Note that on the Hadoop side ex1 points to /user/student/ex1. iv) Copy the psaux.txt input text file to ex1 on the Hadoop file system using hdfs dfs - put with the appropriate source and destination. 4

5 v) Open Firefox from the Ubuntu icon, and click on the quick links bar link to Hadoop jobs. vi) Back in the terminal window, start the Hadoop job to use map-reduce to count the words in psaux.txt. We will use the hadoop command with the first argument jar to tell it that we are using the option to supply the map-reduce program we want to run in the form of compiled java byte-code in a Java ARchive. As you might expect, the parameter after hadoop jar is the name of the jar, and you can now use your shell variable $mrex rather than typing that long file path. As you also might expect, what follows hadoop jar $mrex is any options to the examples jar. In this case the parameters are first the name of one of the many examples in the jar (wordcount now), followed by any specific parameters for that example (input file and output directory). So the full command you need is hadoop jar $mrex wordcount ex1/psaux.txt ex1/out. Note that the program you run is on the normal UNIX file system, while the input data and output files are on the Hadoop file system. (The hadoop command loads the code on the Hadoop machines.) vii) Various lines of information show on the screen (hopefully no errors). Quickly go to the Firefox window and press F5 to update the information. You may see part of what is happening if you are quick enough. You can click links to get more info. Play a bit. viii) Return to the UNIX window, assure that you have a new prompt, and examine the ancillary data (in the terminal window) about your first map-reduce analysis. ix) Examine your actual Hadoop results using hdfs dfs to see the contents of the ex1/out folder. You should see a file called _SUCCESS with size 0, which indicates success, and a file called part-r with a size of about 10KB containing your results. Use the hdfs dfs -get command to get that result file into your UNIX file space. (You can use just a period for the destination to indicate here with the same file name. x) Use the plain old UNIX head and tail commands to examine the copy of your results that you pulled back into the UNIX file system. Can you write a piped command to count how many words have greater than one occurrence? xi) Use ls -lrt psaux.txt to see the size of psaux.txt. Use ps -aux >> psaux.txt to put more text into the input file. Re-check the size. Think carefully, then carry out all steps to re-run the analysis on the new input. Note that you will need to delete the old output files or use a different directory name. Rename the old output file on the UNIX side to a different name before getting the new output file. Compare the number of words between the two files, the number of non-singlicate words, and the counts for a few specific high frequency words. 5

6 h) Second Hadoop project: word counting from your own Java program i) Imagine that you knew how to write your own Java code. Create /home/student/ex2 on UNIX and /user/student/ex2 on Hadoop. Download and skim WordCount.java. (One way to get the file is wget What other ways do you know?) Here is how to byte-compile the program to (three) class files, and then combine those into a jar file called wc.jar : As one-time setup type these UNIX commands: echo $JAVA_HOME echo $PATH export PATH=${JAVA_HOME}/bin:${PATH} echo $PATH echo $HADOOP_CLASSPATH export HADOOP_CLASSPATH=${JAVA_HOME}/lib/tools.jar Compile using: hadoop com.sun.tools.javac.main WordCount.java ls -lrt Combine the classes into a Jar using: jar cf wc.jar WordCount*.class ls -lrt ii) Now think about how you could run the word count task using your jar file instead of the one from $mrex. Try it. 6

7 i) Third Hadoop project: word counting in Python i) Open the reference, in your browser. ii) Create folder ex3 and cd to it. Open mapper.py in emacs. Enter the first code block from the reference page, and the save the file (but do not close emacs). #!/usr/bin/env python import sys # input comes from STDIN (standard input) for line in sys.stdin: # remove leading and trailing whitespace line = line.strip() # split the line into words words = line.split() # increase counters for word in words: # write the results to STDOUT (standard output); # what we output here will be the input for the # Reduce step, i.e. the input for reducer.py # # tab-delimited; the trivial word count is 1 print '%s\t%s' % (word, 1) iii) Start a second file in emacs by using the menu option File / Visit new file. Enter reducer.py in the text area given. Enter the code (from the reference) and save. iv) Note that you can switch between files using the Buffers menu item or ctrl-x then b. Also note that the line at the bottom of the screen containing the current file name shows ** if the buffer has unsaved text. You can leave emacs open in case you need to fix errors. v) Try the following test code in UNIX: chmod u+x mapper.py echo "spam spam 602 spam eggs"./mapper.py chmod u+x reducer.py echo "spam spam 602 spam eggs"./mapper.py sort./reducer.py ps -aux grep -v stringprefs./mapper.py sort./reducer.py ps -aux grep -v stringprefs > psaux.txt vi) Make /user/student/ex3 in the Hadoop file system. Upload psaux.txt to Hadoop. vii) List the files in /usr/local/hadoop/share/hadoop/tools/lib restricting to those filenames containing str. This is the Java ARchive that we can use to run our Python programs. Make a shell variable called sjar that hold the full path and name of that file (and put it in.bashrc ). viii) Run the Python map/reduce program on the Hadoop system as follows: hadoop jar $sjar -file mapper.py -mapper mapper.py -file reducer.py -reducer reducer.py -input ex3/psaux.txt -output ex3/out ix) Check the results 7

8 8

Compile and Run WordCount via Command Line

Compile and Run WordCount via Command Line Aims This exercise aims to get you to: Compile, run, and debug MapReduce tasks via Command Line Compile, run, and debug MapReduce tasks via Eclipse One Tip on Hadoop File System Shell Following are the

More information

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

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical

More information

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

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2 CSE Linux VM For Microsoft Windows Based on opensuse Leap 42.2 Dr. K. M. Flurchick February 2, 2017 Contents 1 Introduction 1 2 Requirements 1 3 Procedure 1 4 Usage 3 4.1 Start/Stop.................................................

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

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

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )

More information

Introduction: What is Unix?

Introduction: What is Unix? Introduction Introduction: What is Unix? An operating system Developed at AT&T Bell Labs in the 1960 s Command Line Interpreter GUIs (Window systems) are now available Introduction: Unix vs. Linux Unix

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

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

Working With Unix. Scott A. Handley* September 15, *Adapted from UNIX introduction material created by Dr. Julian Catchen

Working With Unix. Scott A. Handley* September 15, *Adapted from UNIX introduction material created by Dr. Julian Catchen Working With Unix Scott A. Handley* September 15, 2014 *Adapted from UNIX introduction material created by Dr. Julian Catchen What is UNIX? An operating system (OS) Designed to be multiuser and multitasking

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

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

Introduction to Linux for BlueBEAR. January

Introduction to Linux for BlueBEAR. January Introduction to Linux for BlueBEAR January 2019 http://intranet.birmingham.ac.uk/bear Overview Understanding of the BlueBEAR workflow Logging in to BlueBEAR Introduction to basic Linux commands Basic file

More information

CSE 390a Lecture 2. Exploring Shell Commands, Streams, and Redirection

CSE 390a Lecture 2. Exploring Shell Commands, Streams, and Redirection 1 CSE 390a Lecture 2 Exploring Shell Commands, Streams, and Redirection slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson http://www.cs.washington.edu/390a/ 2 Lecture summary Unix

More information

Getting Started With UNIX Lab Exercises

Getting Started With UNIX Lab Exercises Getting Started With UNIX Lab Exercises This is the lab exercise handout for the Getting Started with UNIX tutorial. The exercises provide hands-on experience with the topics discussed in the tutorial.

More information

CENG 334 Computer Networks. Laboratory I Linux Tutorial

CENG 334 Computer Networks. Laboratory I Linux Tutorial CENG 334 Computer Networks Laboratory I Linux Tutorial Contents 1. Logging In and Starting Session 2. Using Commands 1. Basic Commands 2. Working With Files and Directories 3. Permission Bits 3. Introduction

More information

Lab 2: Linux/Unix shell

Lab 2: Linux/Unix shell Lab 2: Linux/Unix shell Comp Sci 1585 Data Structures Lab: Tools for Computer Scientists Outline 1 2 3 4 5 6 7 What is a shell? What is a shell? login is a program that logs users in to a computer. When

More information

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program Using UNIX. UNIX is mainly a command line interface. This means that you write the commands you want executed. In the beginning that will seem inferior to windows point-and-click, but in the long run the

More information

Getting Started with Hadoop/YARN

Getting Started with Hadoop/YARN Getting Started with Hadoop/YARN Michael Völske 1 April 28, 2016 1 michael.voelske@uni-weimar.de Michael Völske Getting Started with Hadoop/YARN April 28, 2016 1 / 66 Outline Part One: Hadoop, HDFS, and

More information

CS CS Tutorial 2 2 Winter 2018

CS CS Tutorial 2 2 Winter 2018 CS CS 230 - Tutorial 2 2 Winter 2018 Sections 1. Unix Basics and connecting to CS environment 2. MIPS Introduction & CS230 Interface 3. Connecting Remotely If you haven t set up a CS environment password,

More information

Unix basics exercise MBV-INFX410

Unix basics exercise MBV-INFX410 Unix basics exercise MBV-INFX410 In order to start this exercise, you need to be logged in on a UNIX computer with a terminal window open on your computer. It is best if you are logged in on freebee.abel.uio.no.

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

Part I. Introduction to Linux

Part I. Introduction to Linux Part I Introduction to Linux 7 Chapter 1 Linux operating system Goal-of-the-Day Familiarisation with basic Linux commands and creation of data plots. 1.1 What is Linux? All astronomical data processing

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

Linux Command Line Primer. By: Scott Marshall

Linux Command Line Primer. By: Scott Marshall Linux Command Line Primer By: Scott Marshall Draft: 10/21/2007 Table of Contents Topic Page(s) Preface 1 General Filesystem Background Information 2 General Filesystem Commands 2 Working with Files and

More information

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

More Raspian. An editor Configuration files Shell scripts Shell variables System admin More Raspian An editor Configuration files Shell scripts Shell variables System admin Nano, a simple editor Nano does not require the mouse. You must use your keyboard to move around the file and make

More information

Introduction to Linux. Fundamentals of Computer Science

Introduction to Linux. Fundamentals of Computer Science Introduction to Linux Fundamentals of Computer Science Outline Operating Systems Linux History Linux Architecture Logging in to Linux Command Format Linux Filesystem Directory and File Commands Wildcard

More information

COMS 6100 Class Notes 3

COMS 6100 Class Notes 3 COMS 6100 Class Notes 3 Daniel Solus September 1, 2016 1 General Remarks The class was split into two main sections. We finished our introduction to Linux commands by reviewing Linux commands I and II

More information

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

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an

More information

CSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes

CSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes CSE 390a Lecture 2 Exploring Shell Commands, Streams, Redirection, and Processes slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture

More information

Review of Fundamentals

Review of Fundamentals Review of Fundamentals 1 The shell vi General shell review 2 http://teaching.idallen.com/cst8207/14f/notes/120_shell_basics.html The shell is a program that is executed for us automatically when we log

More information

Introduction to remote command line Linux. Research Computing Team University of Birmingham

Introduction to remote command line Linux. Research Computing Team University of Birmingham Introduction to remote command line Linux Research Computing Team University of Birmingham Linux/UNIX/BSD/OSX/what? v All different v UNIX is the oldest, mostly now commercial only in large environments

More information

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

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used: Linux Tutorial How to read the examples When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used: $ application file.txt

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

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

Perl and R Scripting for Biologists

Perl and R Scripting for Biologists Perl and R Scripting for Biologists Lukas Mueller PLBR 4092 Course overview Linux basics (today) Linux advanced (Aure, next week) Why Linux? Free open source operating system based on UNIX specifications

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

Introduction to Linux Workshop 1

Introduction to Linux Workshop 1 Introduction to Linux Workshop 1 The George Washington University SEAS Computing Facility Created by Jason Hurlburt, Hadi Mohammadi, Marco Suarez hurlburj@gwu.edu Logging In The lab computers will authenticate

More information

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems. Copyleft 2005, Binnur Kurt 3 Operating Systems Copyleft 2005, Binnur Kurt Content The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail.

More information

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing Content 3 Operating Systems The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail. How to log into (and out

More information

Linux Command Line Interface. December 27, 2017

Linux Command Line Interface. December 27, 2017 Linux Command Line Interface December 27, 2017 Foreword It is supposed to be a refresher (?!) If you are familiar with UNIX/Linux/MacOS X CLI, this is going to be boring... I will not talk about editors

More information

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p. Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p. 2 Conventions Used in This Book p. 2 Introduction to UNIX p. 5 An Overview

More information

Chapter-3. Introduction to Unix: Fundamental Commands

Chapter-3. Introduction to Unix: Fundamental Commands Chapter-3 Introduction to Unix: Fundamental Commands What You Will Learn The fundamental commands of the Unix operating system. Everything told for Unix here is applicable to the Linux operating system

More information

Linux Essentials Objectives Topics:

Linux Essentials Objectives Topics: Linux Essentials Linux Essentials is a professional development certificate program that covers basic knowledge for those working and studying Open Source and various distributions of Linux. Exam Objectives

More information

Linux Systems Administration Getting Started with Linux

Linux Systems Administration Getting Started with Linux Linux Systems Administration Getting Started with Linux Network Startup Resource Center www.nsrc.org These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International

More information

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs Summer 2010 Department of Computer Science and Engineering York University Toronto June 29, 2010 1 / 36 Table of contents 1 2 3 4 2 / 36 Our goal Our goal is to see how we can use Unix as a tool for developing

More information

Mills HPC Tutorial Series. Linux Basics I

Mills HPC Tutorial Series. Linux Basics I Mills HPC Tutorial Series Linux Basics I Objectives Command Line Window Anatomy Command Structure Command Examples Help Files and Directories Permissions Wildcards and Home (~) Redirection and Pipe Create

More information

Introduction to the shell Part II

Introduction to the shell Part II Introduction to the shell Part II Graham Markall http://www.doc.ic.ac.uk/~grm08 grm08@doc.ic.ac.uk Civil Engineering Tech Talks 16 th November, 1pm Last week Covered applications and Windows compatibility

More information

Essential Linux Shell Commands

Essential Linux Shell Commands Essential Linux Shell Commands Special Characters Quoting and Escaping Change Directory Show Current Directory List Directory Contents Working with Files Working with Directories Special Characters There

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

The Unix Shell & Shell Scripts

The Unix Shell & Shell Scripts The Unix Shell & Shell Scripts You should do steps 1 to 7 before going to the lab. Use the Linux system you installed in the previous lab. In the lab do step 8, the TA may give you additional exercises

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to UNIX environment and tools 0.1 Getting started with the environment and the bash shell interpreter Desktop computers are usually operated from a graphical

More information

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

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen Introduction to Unix The Windows User perspective Wes Frisby Kyle Horne Todd Johansen What is Unix? Portable, multi-tasking, and multi-user operating system Software development environment Hardware independent

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 5 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 User Operating System Interface - CLI CLI

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

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

Linux at the Command Line Don Johnson of BU IS&T Linux at the Command Line Don Johnson of BU IS&T We ll start with a sign in sheet. We ll end with a class evaluation. We ll cover as much as we can in the time allowed; if we don t cover everything, you

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

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

Exercise 1: Basic Tools

Exercise 1: Basic Tools Exercise 1: Basic Tools This exercise is created so everybody can learn the basic tools we will use during this course. It is really more like a tutorial than an exercise and, you are not required to submit

More information

Bioinformatics? Reads, assembly, annotation, comparative genomics and a bit of phylogeny.

Bioinformatics? Reads, assembly, annotation, comparative genomics and a bit of phylogeny. Bioinformatics? Reads, assembly, annotation, comparative genomics and a bit of phylogeny stefano.gaiarsa@unimi.it Linux and the command line PART 1 Survival kit for the bash environment Purpose of the

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

Hadoop Tutorial. General Instructions

Hadoop Tutorial. General Instructions CS246H: Mining Massive Datasets Hadoop Lab Winter 2018 Hadoop Tutorial General Instructions The purpose of this tutorial is to get you started with Hadoop. Completing the tutorial is optional. Here you

More information

Introduction to Unix and Linux. Workshop 1: Directories and Files

Introduction to Unix and Linux. Workshop 1: Directories and Files Introduction to Unix and Linux Workshop 1: Directories and Files Genomics Core Lab TEXAS A&M UNIVERSITY CORPUS CHRISTI Anvesh Paidipala, Evan Krell, Kelly Pennoyer, Chris Bird Genomics Core Lab Informatics

More information

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1 Review of Fundamentals Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 GPL the shell SSH (secure shell) the Course Linux Server RTFM vi general shell review 2 These notes are available on

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

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

Getting Started with Hadoop

Getting Started with Hadoop Getting Started with Hadoop May 28, 2018 Michael Völske, Shahbaz Syed Web Technology & Information Systems Bauhaus-Universität Weimar 1 webis 2018 What is Hadoop Started in 2004 by Yahoo Open-Source implementation

More information

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala Linux Training for New Users of Cluster Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala pakala@uga.edu 1 Overview GACRC Linux Operating System Shell, Filesystem, and Common

More information

Unix Introduction to UNIX

Unix Introduction to UNIX Unix Introduction to UNIX Get Started Introduction The UNIX operating system Set of programs that act as a link between the computer and the user. Developed in 1969 by a group of AT&T employees Various

More information

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you. https://www.virtualbox.org/

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you. https://www.virtualbox.org/ Virtual Machine Anyone have problems installing it? VM: Virtual Box - allows you to run a different operating system within the current operating system of your machine. https://www.virtualbox.org/ Linux

More information

Intro to Linux & Command Line

Intro to Linux & Command Line Intro to Linux & Command Line Based on slides from CSE 391 Edited by Andrew Hu slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson http://www.cs.washington.edu/391/ 1 Lecture summary

More information

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017 Introduction to Linux Part 1 Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017 ssh Login or Interactive Node kingspeak.chpc.utah.edu Batch queue system kp001 kp002. kpxxx FastX

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

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup Purpose: The purpose of this lab is to setup software that you will be using throughout the term for learning about Python

More information

Logging on to the Hadoop Cluster Nodes. To login to the Hadoop cluster in ROGER, a user needs to login to ROGER first, for example:

Logging on to the Hadoop Cluster Nodes. To login to the Hadoop cluster in ROGER, a user needs to login to ROGER first, for example: Hadoop User Guide Logging on to the Hadoop Cluster Nodes To login to the Hadoop cluster in ROGER, a user needs to login to ROGER first, for example: ssh username@roger-login.ncsa. illinois.edu after entering

More information

Linux Bootcamp Fall 2015

Linux Bootcamp Fall 2015 Linux Bootcamp Fall 2015 UWB CSS Based on: http://swcarpentry.github.io/shell-novice "Software Carpentry" and the Software Carpentry logo are registered trademarks of NumFOCUS. What this bootcamp is: A

More information

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

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016 Linux Boot Camp Jack, Matthew, Nishad, Stanley 6 Sep 2016 1 Connecting SSH Windows users: MobaXterm, PuTTY, SSH Tectia Mac & Linux users: Terminal (Just type ssh) andrewid@shark.ics.cs.cmu.edu 2 Let s

More information

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

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011 Unix/Linux Operating System Introduction to Computational Statistics STAT 598G, Fall 2011 Sergey Kirshner Department of Statistics, Purdue University September 7, 2011 Sergey Kirshner (Purdue University)

More information

LING 408/508: Computational Techniques for Linguists. Lecture 5

LING 408/508: Computational Techniques for Linguists. Lecture 5 LING 408/508: Computational Techniques for Linguists Lecture 5 Last Time Installing Ubuntu 18.04 LTS on top of VirtualBox Your Homework 2: did everyone succeed? Ubuntu VirtualBox Host OS: MacOS or Windows

More information

Linux Tutorial. Ken-ichi Nomura. 3 rd Magics Materials Software Workshop. Gaithersburg Marriott Washingtonian Center November 11-13, 2018

Linux Tutorial. Ken-ichi Nomura. 3 rd Magics Materials Software Workshop. Gaithersburg Marriott Washingtonian Center November 11-13, 2018 Linux Tutorial Ken-ichi Nomura 3 rd Magics Materials Software Workshop Gaithersburg Marriott Washingtonian Center November 11-13, 2018 Wireless Network Configuration Network Name: Marriott_CONFERENCE (only

More information

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.

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. Warnings 1 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. Read the relevant material in Sobell! If

More information

Introduction to Unix: Fundamental Commands

Introduction to Unix: Fundamental Commands Introduction to Unix: Fundamental Commands Ricky Patterson UVA Library Based on slides from Turgut Yilmaz Istanbul Teknik University 1 What We Will Learn The fundamental commands of the Unix operating

More information

Useful Unix Commands Cheat Sheet

Useful Unix Commands Cheat Sheet Useful Unix Commands Cheat Sheet The Chinese University of Hong Kong SIGSC Training (Fall 2016) FILE AND DIRECTORY pwd Return path to current directory. ls List directories and files here. ls dir List

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

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

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011) UoW HPC Quick Start Information Technology Services University of Wollongong ( Last updated on October 10, 2011) 1 Contents 1 Logging into the HPC Cluster 3 1.1 From within the UoW campus.......................

More information

Cloud Computing II. Exercises

Cloud Computing II. Exercises Cloud Computing II Exercises Exercise 1 Creating a Private Cloud Overview In this exercise, you will install and configure a private cloud using OpenStack. This will be accomplished using a singlenode

More information

Chap2: Operating-System Structures

Chap2: Operating-System Structures Chap2: Operating-System Structures Objectives: services OS provides to users, processes, and other systems structuring an operating system how operating systems are designed and customized and how they

More information

BE CAREFUL! The Summer Research Student s Guide to UNIX

BE CAREFUL! The Summer Research Student s Guide to UNIX BE CAREFUL! The Summer Research Student s Guide to UNIX Luke Leisman adapted from Andrew Butler June 2011 This is a guide designed to help summer researchers navigate the complexities of using a unix/linux

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

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie Introduction in Unix Linus Torvalds Ken Thompson & Dennis Ritchie My name: John Donners John.Donners@surfsara.nl Consultant at SURFsara And Cedric Nugteren Cedric.Nugteren@surfsara.nl Consultant at SURFsara

More information

Pivotal Capgemini Just Do It Training HDFS-NFS Gateway Labs

Pivotal Capgemini Just Do It Training HDFS-NFS Gateway Labs Pivotal Capgemini Just Do It Training HDFS-NFS Gateway Labs In this lab exercise you will have an opportunity to explore HDFS as well as become familiar with using the HDFS- NFS Bridge. First we will go

More information

9.2 Linux Essentials Exam Objectives

9.2 Linux Essentials Exam Objectives 9.2 Linux Essentials Exam Objectives This chapter will cover the topics for the following Linux Essentials exam objectives: Topic 3: The Power of the Command Line (weight: 10) 3.3: Turning Commands into

More information

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based.

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based. Unix tutorial Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based. Terminal windows You will use terminal windows to enter and execute

More information

Unix. Examples: OS X and Ubuntu

Unix. Examples: OS X and Ubuntu The Command Line A terminal is at the end of an electric wire, a shell is the home of a turtle, tty is a strange abbreviation, and a console is a kind of cabinet. - Some person on SO Learning Resources

More information

Lab Working with Linux Command Line

Lab Working with Linux Command Line Introduction In this lab, you will use the Linux command line to manage files and folders and perform some basic administrative tasks. Recommended Equipment A computer with a Linux OS, either installed

More information

Week 2 Lecture 3. Unix

Week 2 Lecture 3. Unix Lecture 3 Unix Terminal and Shell 2 Terminal Prompt Command Argument Result 3 Shell Intro A system program that allows a user to execute: shell functions (e.g., ls -la) other programs (e.g., eclipse) shell

More information

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018 GNU/Linux 101 Casey McLaughlin Research Computing Center Spring Workshop Series 2018 rccworkshop IC;3df4mu bash-2.1~# man workshop Linux101 RCC Workshop L101 OBJECTIVES - Operating system concepts - Linux

More information

Basic Linux Command Line Interface Guide

Basic Linux Command Line Interface Guide This basic Linux Command-Line Interface (CLI) Guide provides a general explanation of commonly used Bash shell commands for the Barracuda NG Firewall. You can access the command-line interface by connecting

More information

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

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG *nix Crash Course Presented by: Virginia Tech Linux / Unix Users Group VTLUUG Ubuntu LiveCD No information on your hard-drive will be modified. Gives you a working Linux system without having to install

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

Introduction to UNIX command-line

Introduction to UNIX command-line Introduction to UNIX command-line Boyce Thompson Institute March 17, 2015 Lukas Mueller & Noe Fernandez Class Content Terminal file system navigation Wildcards, shortcuts and special characters File permissions

More information