Using Linux as a Virtual Machine

Similar documents
Introduction to UNIX command-line

Introduction to UNIX command-line II

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

Unix Essentials. BaRC Hot Topics Bioinformatics and Research Computing Whitehead Institute October 12 th

Linux Essentials Objectives Topics:

Cloud Computing and Unix: An Introduction. Dr. Sophie Shaw University of Aberdeen, UK

Cloud Computing and Unix: An Introduction. Dr. Sophie Shaw University of Aberdeen, UK

Chapter-3. Introduction to Unix: Fundamental Commands

Linux command line basics II: downloading data and controlling files. Yanbin Yin

Introduction to Unix: Fundamental Commands

Computer Systems and Architecture

Short Read Sequencing Analysis Workshop

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

Perl and R Scripting for Biologists

Unix - Basics Course on Unix and Genomic Data Prague, January 2017

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

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

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

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

Week 2 Lecture 3. Unix

Computer Systems and Architecture

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

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

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you.

Lab Working with Linux Command Line

No Food or Drink in this room. Logon to Windows machine

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

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

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

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

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

Arkansas High Performance Computing Center at the University of Arkansas

Unix Tutorial Haverford Astronomy 2014/2015

Introduction to Linux Organizing Files

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

A Brief Introduction to the Linux Shell for Data Science

Linux for Beginners Part 1

The Unix Shell. Pipes and Filters

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

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

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

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

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

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Unix/Linux Primer. Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois

Basic Linux Commands. Srihari Kalgi M.Tech, CSE (KReSIT), IIT Bombay. May 5, 2009

Basic Shell Commands

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

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

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window.

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

CENG 334 Computer Networks. Laboratory I Linux Tutorial

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

Files

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.

Introduction. File System. Note. Achtung!

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

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

Introduction of Linux

Unix basics exercise MBV-INFX410

Introduction to Linux

Computational Skills Primer. Lecture 2

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.

Introduction to the shell Part II

CSCI 2132 Software Development. Lecture 4: Files and Directories

User Guide Version 2.0

Basic Linux Command Line Interface Guide

Lecture 3. Essential skills for bioinformatics: Unix/Linux

Parts of this tutorial has been adapted from M. Stonebank s UNIX Tutorial for Beginners (

Useful Unix Commands Cheat Sheet

Linux Command Line Primer. By: Scott Marshall

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

Commands are in black

Essential Skills for Bioinformatics: Unix/Linux

VERY SHORT INTRODUCTION TO UNIX

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

Part 1: Basic Commands/U3li3es

A Brief Introduction to Unix

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface

Introduction to Linux Basics

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

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

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

Introduction to Linux

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

Introduction: What is Unix?

Utilities. September 8, 2015

Introduction to the UNIX command line

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

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

LOG ON TO LINUX AND LOG OFF

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

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.

Introduction to Linux for BlueBEAR. January

Laboratory 1 Semester 1 11/12

Getting your department account

CISC 220 fall 2011, set 1: Linux basics

Introduction to UNIX/Linux

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

Organization of a computer

Transcription:

Intro to UNIX

Using Linux as a Virtual Machine We will use the VMware Player to run a Virtual Machine which is a way of having more than one Operating System (OS) running at once. Your Virtual OS (Linux) will run within your primary OS (Windows). There will be shared resources between your primary OS and your Virtual Machine such as memory and CPUs. We will use the Linux distribution Ubuntu 10.04 as our Virtual OS. Start VMware and load your Virtual Machine from the USB drive. User Name Password genomics genomics7620

Finding your way around the UNIX directory structure / root tmp etc home sarah genomics scripts genomics_lab var log www / /root /tmp /etc /home /home/sarah /home/genomics /home/genomics/scripts /home/genomics/genomics_lab /var /var/log /var/www

Unix Commands pwd ls # show the name of your present working directory # list files and directories in the present working directory mkdir scripts # make a directory called scripts File and Directory Names are Case Sensitive. suggestions: Use underscore instead of spaces in file names and directories. Use lower case characters for file names and directories

Gedit text editor From the UNIX terminal command line enter this command to start gedit gedit my_favorite_food.txt & the & will detach gedit from the terminal so you can continue to use the terminal Naming files: use all lower case characters separate words with an underscore make the file name very descriptive of what is in the file even if its rather long common file extensions:.pl a Perl script.fa FASTA formatted sequences.fastq genome sequencing data files.gz a file that has been compressed (zipped) to reduce file size (.zip).txt a generic text file.tsv values are separated by a tab (tab separated values).csv comma separated values.bed genomic data file format for genome browsers

Types of File Paths pwd cd scripts mkdir ws{1..15} cd../genomics_lab # show the present working directory # change pwd to the scripts directory # make 15 directories, one for each workshop # type: cd../gen then hit the tab key Relative path cd../downloads/ # relative paths do not begin with / cd /home/genomics/downloads # absolute path begin with / /ho<tab>gen<tab>down<tab> Absolute path cd /home/genomics cd ~/ cd All of these will take you to your home directory

Unix Commands have Arguments Arguments are like options not verbal conflicts. Search for arguments in the ls manual page man ls /all n N q # browse the manual page for ls # search for the text all # next found text # previous found text # quit double dash means there is a single argument which is usually a descriptive word ls all ls al # has one argument; show hidden files hidden files begin with.. current directory.. back one directory # has two arguments; show hidden files and show details single dash means each character is an argument

Search the man page of the ls command ls lh ls lt # list file details as human readable # list file details and sort by modification time Getting around in the man page: /human n up-arrow key down-arrow key page-up key page-down key q # search for the term 'human' # next found search term # move up in the man page # move down in the man page # move up one page # move down one page # quit

wget ftp://ftp.ncbi.nih.gov/genomes/h_sapiens/protein/protein.fa.gz wget ftp://ftp.ncbi.nih.gov/genomes/h_sapiens/rna/rna.fa.gz mkdir genomes/human man mkdir # search how to make parent directories as necessary mkdir p genomes/human mv protein.fa.gz genomes/human/ # move file to a different directory cd genomes/human/ ls../.. cp../../rna.fa.gz. rm../../rna.fa.gz # list files two directories back # copy file to current directory # remove a file using relative path

What is the size of the file protein.fa.gz? Preview a zipped file without opening entire file into memory: zmore protein.fa.gz <spacebar> = next screen full q = quit gunzip protein.fa.gz more protein.fa # unzip a zipped file # preview a non-zipped file less protein.fa gzip protein.fa # searchable file preview <spacebar> = next screen full u = up one screen full / = search n = find next N = find previous q = quit # zip 'compress' a file

Make a directory in your home directory called states and go to the states directory Move the states.csv from your Downloads directory to your states directory.csv means all lines in the file have comma separated values wc states.csv wc l states.csv cat states.csv # show number of lines,characters and bytes # for non zipped files only # show just the number of lines in a file # output the entire file to screen clear head states.csv head 25 states.csv tail states.csv # clear the terminal screen: Ctrl+l # show first 10 lines of file # show first 25 lines of file # show last 10 lines of file

The grep command print lines matching a pattern grep New states.csv grep c New states.csv # show all lines matching the text 'New' # count the number of lines matching New > # save output to a file; overwrite if it already exists >> # append output to an existing file; create file if it doesn't exist grep New states.csv > new_states.csv # pipe used to process output again # create a new file that has all New states grep New states.csv grep Pine # show all lines that match the text 'New', then take the results and show all lines that match the text 'Pine'

Deleting (removing) files rm../my_favorite_food.txt rm states.csv new_states.csv cd.. rmdir states # remove 'delete' a file # hint: type: rm../my<tab> # always double check what you are deleting # remove multiple files at once # go back one directory # remove an empty directory

View your commands history list Your commands are saved even when you exit your terminal session history # show all your past commands used history grep wget # show all commands where you used wget

exit # exit the terminal session; Ctrl+d

Tape Archive Files (.tar) Consists of a single file which contains of a group of files and/or directories ncbi blast 2.2.25+ x64 linux.tar 346 Mb ncbi-blast-2.2.25+/ ncbi-blast-2.2.25+/changelog ncbi-blast-2.2.25+/license ncbi-blast-2.2.25+/ncbi_package_info ncbi-blast-2.2.25+/readme ncbi-blast-2.2.25+/doc/ ncbi-blast-2.2.25+/doc/readme.txt ncbi-blast-2.2.25+/bin/....tgz files (.tar.gz) Consists of a tar file that has been zipped (compressed) to make it smaller ncbi blast 2.2.25+ x64 linux.tar.gz 110 Mb

Download Blast (command line version) 1. Go to the Downloads directory in your home directory 2. Use Firefox to Search the web for a download Linux version of Blast and use wget to download file from the command line. Right click the link and select: Copy Link Location then paste in your terminal at the command line wget ftp://ftp /ncbi blast 2.2.25+ x64 linux.tar.gz 3. Decompress and open the tar file tar xzvf ncbi<tab> ls cd ncbi<tab> ls # look for files: INSTALL or README and read 4. View the README file gedit README & 5. View the user manual pdf xpdf doc/user_manual.pdf # q=quit

Review for next week Make sure you understand the following UNIX commands: pwd ls cd grep head tail wget cp mv rm mkdir rmdir cat more less man and the following directories:... ~/ and the following UNIX redirection operators: > >> This is the main list of UNIX commands that you will most likely use.