Introduction to Linux

Similar documents
Introduction To Linux. Rob Thomas - ACRC

Computer Systems and Architecture

The Unix Shell. Pipes and Filters

Linux Essentials. Smith, Roderick W. Table of Contents ISBN-13: Introduction xvii. Chapter 1 Selecting an Operating System 1

Linux Command Line Primer. By: Scott Marshall

Introduction: What is Unix?

Chapter-3. Introduction to Unix: Fundamental Commands

Unix Tools / Command Line

Perl and R Scripting for Biologists

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

Linux Bootcamp Fall 2015

Introduction to Unix: Fundamental Commands

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.

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

A Brief Introduction to the Linux Shell for Data Science

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

Computer Systems and Architecture

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

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Introduction to the shell Part II

Recap From Last Time:

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

BGGN 213 Working with UNIX Barry Grant

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

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

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

Introduction to UNIX command-line II

Introduction To. Barry Grant

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

CS 460 Linux Tutorial

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

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

Introduction to Linux

Introduction. File System. Note. Achtung!

Introduction to the Linux Command Line

EECS 470 Lab 5. Linux Shell Scripting. Friday, 1 st February, 2018

The Shell. EOAS Software Carpentry Workshop. September 20th, 2016

Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

Introduction to Linux

CSCI 2132 Software Development. Lecture 4: Files and Directories

System Administration

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

Introduction to Linux

Introduction of Linux

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

client X11 Linux workstation

On successful completion of the course, the students will be able to attain CO: Experiment linked. 2 to 4. 5 to 8. 9 to 12.

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

Introduction to Linux Workshop 1

Principles of Bioinformatics. BIO540/STA569/CSI660 Fall 2010

Getting your department account

Laboratory 1 Semester 1 11/12

COL100 Lab 2. I semester Week 2, Open the web-browser and visit the page and visit the COL100 course page.

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

Linux Systems Administration Getting Started with Linux

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

Command-line interpreters

CISC 220 fall 2011, set 1: Linux basics

Arkansas High Performance Computing Center at the University of Arkansas

Linux Introduction to Linux

CS370 Operating Systems

The Unix Shell & Shell Scripts

Introduction to UNIX. Introduction. Processes. ps command. The File System. Directory Structure. UNIX is an operating system (OS).

Introduction to UNIX. CSE 2031 Fall November 5, 2012

Introduction to UNIX. Introduction EECS l UNIX is an operating system (OS). l Our goals:

Linux Essentials Objectives Topics:

Operating Systems. Copyleft 2005, Binnur Kurt

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

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Lab 2: Linux/Unix shell

A Brief Introduction to Unix

Introduction to Linux

Chapter 4. Unix Tutorial. Unix Shell

Recap From Last Time: Setup Checklist BGGN 213. Todays Menu. Introduction to UNIX.

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

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

Lab 1 Introduction to UNIX and C

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

Chap2: Operating-System Structures

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

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

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

Course 144 Supplementary Materials. UNIX Fundamentals

Prerequisites: General computing knowledge and experience. No prior knowledge with Linux is required. Supported Distributions:

CS197U: A Hands on Introduction to Unix

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

Linux Shell Script. J. K. Mandal

Introduction to the Linux Command Line. Ken Weiss HITS Computational Research Consulting Division

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

Scripting Languages Course 1. Diana Trandabăț

Prerequisites: Students should be comfortable with computers. No familiarity with Linux or other Unix operating systems is required.

INSE Lab 1 Introduction to UNIX Fall 2017

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

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

Introduction to Linux Organizing Files

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples

Introduction to Linux

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

Transcription:

Introduction to Linux University of Bristol - Advance Computing Research Centre 1 / 47

Operating Systems Program running all the time Interfaces between other programs and hardware Provides abstractions (common interfaces, e.g. filesystems) You may know Window MacOS ios Android 2 / 47

UNIX An operating system originating at Bell Labs. circa 1969 in the USA 3 / 47

User Interfaces Command Line GUI - Graphical User Interface 4 / 47

Kernels and Shells The kernel is the core of the operating system The shell is the interface between the user aand the operating system 5 / 47

Linux A version of UNIX Written by Linux Torvalds when he was an undergrad in Finland Free (libre, gratis) One OS from Desktop -> Supercomputer Technically just the kernel Distributions bundle kernel, GNU tools and extra software Blue Crystal Phase 3 runs CentOS 6 6 / 47

Linux Philosophy Kit of parts One small thing does one thing well Small utilities can be joined together to perfom more complicated tasks 7 / 47

Bits and Pieces 8 / 47

At First... $ ls wc -l 9 / 47

But Later... tr -cs A-Za-z '\n' tr A-Z a-z sort uniq -c sort -rn 10 / 47

Logging On We'll be working on the HPC (Blue Crystal) Start Putty Log in to bluecrystalp3.acrc.bris.ac.uk And off we go... 11 / 47

Filesystem Hierarchy 12 / 47

Directories Pathnames and / Finding where you are (pwd) Changing to a different Directory (cd) The Directories. and.. Home directories (~) 13 / 47

Tasks 1 find out where you are what is pathname one level above (go there) go back to your home directory (prove it) 14 / 47

New Files and Directories Listing files and directories (ls) Making Directories (mkdir) 15 / 47

Tasks 2 What is in your home directory? What is on one level above? Make a new directory in your home directory ( give it a one word name) 16 / 47

File Manipulation Copying Files (cp) Moving Files (mv) Removing Files and directories (rm) 17 / 47

Tasks 3 copy example.txt to another filename rename your new file to something else move you new file in to the directory you created earlier make another copy of example.txt delete your second copy 18 / 47

Examining File Contents Displaying the contents of a file on the screen (cat, less) The firest lines in a file (head) The last lines in a file (tail) Searching the contents of a file (grep) Counting with grep (-c) UNIX is case sensitive grep -i 19 / 47

Tasks 4 What is in example.txt What are the first 10 lines of example.txt What are the first 15 lines of example.txt What are the last 2 lines of example.txt Read through the whole of example.txt a page at a time Find all the lines that mention "GNU" Count the number of lines that have the word "Linux" (in any capitlisation) 20 / 47

Filenames Wildcards? Any character * More Than One Character Filename Conventions (e.g..c) 21 / 47

Tasks 5 list all the two letter commands in /usr/bin list all the commands with "to" in their name 22 / 47

Getting Help man man -k Google (other search engines are available) 23 / 47

Tasks 6 Read the man page for head Pick a random command from in /usr/bin and read it's manpage 24 / 47

Maniputaing Files sort uniq 25 / 47

Redirection Redirecting the Output > (overwrites) >> (appends) Redirecting the Input < 26 / 47

Tasks 6 sort the file authors into alphabetical order find the list of unique authors find how many time each appears in the original list 27 / 47

Pipes and Pipelines Take the standard output of one command and feed it in to the standard input of the next Uses the pipe (vertical bar) symbol No intermediate files! Efficient 28 / 47

29 / 47

Tasks 7 without using intermediate files... sort the authors file find the count of unique authors put that list in to numerical order 30 / 47

Text Editors not Word vim is mentioned a lot but don't use just yet we recommend nano ^O to save ^X to exit 31 / 47

Task 8 add some more authors to the authors file rerun the previous analysis put the analysis command pipleine in to a file called author_count 32 / 47

File Permissions Permissions Displaying Permissions (ls -l) Understanding Permissions User, Group, Other Changing Permissions (chmod) 33 / 47

Tasks 9 create a test file what are the permissions on the file? change it so others have no permissions change it so the group has write permissions have a look at someone elses files (in the course - trainxx only!) 34 / 47

Processes and Job What is a Process? Listing Processes (ps) Background Process pstree Killing a process (kill) 35 / 47

Tasks 10 run the task sleep 300 background it find it in the process list (you will want to grep for "sleep" and your username) kill it 36 / 47

Variables The Shell is a full programming language Conditionals, Loops, Functions Above covered in a forthcoming course Variables Built in and user Normal - This shell Environment - All processes started from this shell. 37 / 47

Tasks 11 examine the variables in your shell set a variable display the value of the variable 38 / 47

Miscellany Disk Space (quota, du, df) Comparison (diff, cmp) Compression (gzip, zcat) Searching (find) 39 / 47

Tasks 12 how many filesystems are there on BlueCrystal p3? which is the largest 40 / 47

Installing Software Packages Normally installed by an administrator using a package manager yum for Redhat and Derivatives e.g. CentOS apt for Debian and Derivatives e.g. Ubutu 41 / 47

Building Software Packages Sometimes a package needs to be built from source Not in any repos Latest and greatest required No root (admin) access 42 / 47

Build process Downloading (wget) Extracting (tar) Configuring (configure) Building (make) 43 / 47

Running the Newly Built Package Run using path name PATH Environment Variable Startup files 44 / 47

Any Questions? Can we go home now? 45 / 47

Resources hpc-help@bristol.ac.uk ACRC Website - https://www.acrc.bris.ac.uk/ http://swcarpentry.github.io/shell-novice/ http://www.ee.surrey.ac.uk/teaching/unix/ 46 / 47

Credits Licence This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Based on previous versions by Rob Thomas - ACRC University of Surrey Image Credits Redirects and Pipes (c) Software Carpentry CC-BY-4.0 47 / 47