The Unix Family. Linux 101. GNU/Linux distributions. Even more. MULTICS MIT/GE/Bell Labs. UNIX AT&T (Bell Labs) Mach, Carnegie Mellon

Similar documents
Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Introduction of Linux

Introduction to Linux

Introduction To Linux. Rob Thomas - ACRC

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

Perl and R Scripting for Biologists

Introduction: What is Unix?

Linux Essentials Objectives Topics:

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

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

GNU/Linux Course Lesson 1. Puria Nafisi

Introduction to Linux

Introduction to Linux

Introduction to Supercomputing

Projects and Environment Introduction

Open Source Computational Fluid Dynamics

Scripting Languages Course 1. Diana Trandabăț

Essential Linux Shell Commands

UNIX, GNU/Linux and simple tools for data manipulation

The Unix Shell. Pipes and Filters

Lecture 01: welcome and intro what LSD and Unix have in common

Unix Tools / Command Line

Lab 2: Linux/Unix shell

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

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

Computer Systems and Architecture

Unix to Linux. CS 3113 Fall 2018 Dr. Christan Grant

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

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

Unix System Architecture, File System, and Shell Commands

Laboratory 1 Semester 1 11/12

Linux Session Part I. Kesavan M

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

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Chapter 4. Unix Tutorial. Unix Shell

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

Introduction to Linux

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

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

Part 1: Basic Commands/U3li3es

Lab01: Part I. Introduction to Linux. Professional Training Academy Linux Series

Introduction to Operating Systems. Note Packet # 1. CSN 115 Operating Systems. Genesee Community College. CSN Lab Overview

GNU/Linux - an Intro. Kesavan Muthuvel

UNIX Essentials Featuring Solaris 10 Op System

CENG393 Computer Networks Labwork 1

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

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

5/8/2012. Exploring Utilities Chapter 5

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

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

CSE 390a Lecture 1. introduction to Linux/Unix environment

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

Introduction to Linux

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.

(a) About Unix. History

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Computer Architecture Lab 1 (Starting with Linux)

Part III. Shell Config. Tobias Neckel: Scripting with Bash and Python Compact Max-Planck, February 16-26,

A Brief Introduction to the Linux Shell for Data Science

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT

Linux Introduction to Linux

Intro to Linux & Command Line

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

Introduction of Linux. Huang Cheng-Chao Dept. of Comput. Sci. & Tech. East China Normal University

CSE 391 Lecture 1. introduction to Linux/Unix environment

Operating System Labs. Yuanbin Wu

CISC 220 fall 2011, set 1: Linux basics

Useful commands in Linux and other tools for quality control. Ignacio Aguilar INIA Uruguay

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

Shell Programming Overview

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

Introduction To. Barry Grant

EKT332 COMPUTER NETWORK

Modern C++ for Computer Vision and Image Processing. Igor Bogoslavskyi and Cyrill Stachniss

Unix Basics. Benjamin S. Skrainka University College London. July 17, 2010

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.

Introduction to Linux. Fundamentals of Computer Science

Lab #8: Introduction to UNIX and GMT

Exercise 1: Basic Tools

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

Saint Louis University. Intro to Linux and C. CSCI 2400/ ECE 3217: Computer Architecture. Instructors: David Ferry

LAB #7 Linux Tutorial

EECS2301. Lab 1 Winter 2016

CIS 90 Introduction to UNIX/Linux

Welcome to CIS 90 Introduction to UNIX/Linux

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

Overview of Unix / Linux operating systems

Common File System Commands

Introduction To. Barry Grant

Linux Command Line And Shell Scripting Bible 3rd Edition

Lecture 3. Unix. Question? b. The world s best restaurant. c. Being in the top three happiest countries in the world.

CSE 391 Lecture 1. introduction to Linux/Unix environment

Scientific Computing I

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

CS307 Operating Systems Introduction Fan Wu

The UNIX Shells. Computer Center, CS, NCTU. How shell works. Unix shells. Fetch command Analyze Execute

Systems Programming/ C and UNIX

Using Linux as a Virtual Machine

Transcription:

The Unix Family MULTICS MIT/GE/Bell Labs Linux 101 Johan Montelius KTH 2017 Mach, Carnegie Mellon GNU/Hurd OS X, Apple UNIX AT&T (Bell Labs) BSD Berkeley SysV AT&T Minix, Tanenbaum FreeBSD NetBSD GNU/Linux, Stallman/Tordvals ios, Apple Orbis OS, Sony Android, Google Probably left out a hundred other systems. Even more 1 / 24 GNU/Linux distributions 2 / 24 The kernel will not get you far, you will need: drivers, file system, network, security, codecs, window manager, compilers, browsers, office, games... You can, but few do, download and compile exactly the components that you want... few people do that. Debian: the base for many - Ubuntu, Mint... most popular Fedora: used by Linus, Red Hat commercial version, CentOS... Mandriva: a.k.a Mandrake, Red Hat offspring, KDE, Intel only opensuse: supported by Novell, second most popular distro GenToo: BSD like, professional users Arch Linux: for advanced users, Antergos, KaOS, Manjaro Slackware: you ll learn a lot Figure: from www.levenez.com/unix/history.html 3 / 24 4 / 24

Ubuntu Ubuntu, Kubuntu, Lubuntu,... Which version of Ubuntu to choose is very much a choice of desktop environment. Supported by Canonical Based on Debian packages. Two regular releases a year :04 and :10 LTS - five year support, released every second year Things work and are easy to maintain. the elephant in the room 5 / 24 Some basic stuff 6 / 24 the shell files and directories some tools: grep, wc, sed... write a thesis: gcc, latex, gnuplot, make environment variables 7 / 24 8 / 24

the shell the directory Commands that you should to know: ls - list files and directories mkdir - make a directory rmdir - remove a directory cd - change directory pwd - path of working directory touch - touch a file rm - remove a file mv - move a file cp - copy a file ln - create a link (soft/hard) to a file shell expansions 9 / 24 work with a text file 10 / 24 The shell will expand any input before issuing command. ~ precede by space - expands to home directory. * as in *.c - expands to a sequence of characters to matches files in the directory? as in f??.txt - expands to any single character [06] as in ID220[06].pdf - expands one of the specified characters $ as in $HOME - expands to the variable value (more on this later) Expansion can be controlled by enclosing arguments in single quotes, double quotes " " (variables will be expanded) or precede character by backslash \. Some more or less simple ways to explore the content of a text file: cat - concatenate files sort - sort rows less - less is of course more wc - word count head - the beginning of a file uniq - remove duplicates tail - the end of a file tr - transpose char-by-char grep - search a file for pattern sed - stream editor diff - difference of two files awk - more powerful than sed 11 / 24 12 / 24

pipes and redirect an example The shell can set a file as the standard input of a command or redirect the standard output and/or standard error. < as in wc < foo.txt will set standard input. > as in ls > out.txt will set standard output. Den bok jag nu sätter mig ner att skriva måste verka meningslös på många - om jag alls vågar tänka mig, att "många" får läsa den - eftersom jag alldeles självmant, utan någons order, börjar ett sådant arbete och åndå inte själv är riktigt på det klara med vad avsikten är. 2> as in grep foo bar.txt 2> err.txt will set standard error. The power of the UNIX shell is the concept of pipes. grep typedef foo.c sort uniq less Standard output of one command becomes standard input of the next command 13 / 24 2019 jag 1818 och 1505 att 1429 det 1045 i 979 en : 14 / 24 from text to frequency list to write a thesis Turn a raw text into and ordered frequency list. Remove special characters (.,?!;:-() ) from text using sed or tr. Replace space by linefeed to turn the text into a list of words. Sort the list using sort. Run the benchmark and save the result in a text file. Use gnuplot to produce a graph. Remove duplicates but add frequency using uniq. Sort the result using sort. Everything is of course connected using pipes. Write the thesis, including the graph, using L A TEX. Set up a Makefile to automate the process. Experiment yourself, the devil is in the details. 15 / 24 16 / 24

gnuplot L A TEX gnuplot pdflatex generate graphs from data in text file (tab separated) interactive or from script not a program for statistics (for statistics use R) will let you focus on content easy to include content from other files generates pdf make 17 / 24 shell variables 18 / 24 make The shell maintains a set of variables that can be accessed from the shell, but not immediately from child processes. the work horse in any UNIX project script will set up the dependencies between files will run programs as needed to produce final output i.e make used for programming as well as documentation set - control the shell environment <variable>=<value> - defines a variable value $<variable> - access variable from shell HOME - home directory PWD - current directory PATH - paths searched when looking for executables USER - user name 19 / 24 20 / 24

the environment package-configure-make-execute The environment is a set variables that can be accessed by programs using the standard library function call getenv(). The shell will set up a set of exported variables that will be visible as environment variables when a child process is created. export <variable> - make variable accessible from child process printenv - list all environment variables env - run command in specified environment Functions from standard library. getenv() - get the value of variable putenv() - set the value of variable execle() - execute command in new environment : - there are more package - a set of source files and scripts configure - check that everything is available, build Makefile make - make, compile, environment variables define the target execute - execute, environment variables describe the session Summary 21 / 24 Finally 22 / 24 UNIX - many families, GNU/Linux is one, Ubuntu a distribution the shell - your interface to any UNIX system files and directories - learn to navigate the tree shell and environment variables work with text file, connect sequences with pipes Usage of the shell will be on the exam; best way to study is to use it! Do learn gnuplot, latex and make before starting your thesis. 23 / 24 24 / 24