Commit c16201b1 authored by This isn't my name's avatar This isn't my name

Added unix history

parent 9df191f1
No preview for this file type
# Welcome to the Bash Workshop!
* If you prefer to work on your own, already know programming or are confident in your abilities, please **sit in the back**.
<!-- -->
* If you prefer guided exercises, are completely new to programming, or want to have your hands held, please **sit in the front**.
* Please turn of your camera for the lecture part of the course, we only have 2GB of RAM on this server
* If there are any technical problems, let me know!
---
author:
- Aline Abler
- Nicolas König
title: Bash Workshop
---
......@@ -78,19 +78,19 @@ title: Bash Workshop
### Meaning of strings
echo Hello World
ls my file
* `echo`, `Hello` and `World` are single strings
* `ls`, `my` and `file` are single strings
* The first string becomes the command, all following become
*arguments*
<!-- -->
echo 'Hello World'
ls 'my file'
* Here, `Hello World` is just one string
* Here, `my file` is just one string
### Repeat after me
### Remember!
\bigtext{Every word is a single argument unless you use quotes.}
......@@ -111,7 +111,7 @@ title: Bash Workshop
[[1==3]]
* Bash's answer:
* Bash's answer:
bash: [[1==3]]: command not found
......@@ -119,7 +119,7 @@ title: Bash Workshop
[[ 1 == 3 ]]
### Repeat after me
### Remember!
\bigtext{If there's brackets, you probably need spaces.}
......@@ -151,7 +151,7 @@ title: Bash Workshop
* What bash sees
0
### Why is that important?
* *&&*, *||*, *if* and *while* all act based on the return value of something
......@@ -207,10 +207,41 @@ becomes
rm "$var"
### Repeat after me:
### Remember!
\bigtext{If there's a dollar, you probably need quotes!}
## Piping
### Glueing programs together
* Pipes allow us to connect different programs
* The output of one program is used as the input for another
### Glueing programs together
du -b
lists the size of all directories within the current one
sort -n
sorts the input numerically. So
du -b | sort -n
gives us a list of all subdirectories sorted by size.
### Glueing programs together
ls -l | cut -d' ' -f3 | sort | uniq
Complicated functionality can be created from very simple programs.
### Remember!
\bigtext{If you want to connect programs, you probably want pipes!}
# What bash is used for
## The whole point of bash
......@@ -252,22 +283,20 @@ becomes
## What happens now?
### Hands on!
#### Guided exercises
* Solve easy exercises in plenum
* Tailored to complete beginners
#### Self-driven exercises
* Self study using a guide
* Try some of our exercises
* Choose the exercises you find interesting! No need to go in order.
#### Guided exercises
* Solve easy exercises in plenum
* Tailored to complete beginners
* Please sit in the front
### Course material
* These slides, exercise sheet and bash guide: \
\soft{http://thealternative.ch}
* Please leave some feedback! \
\soft{http://feedback.thealternative.ch}
<!-- -->
* \soft{Theme by} Christian Horea, [CC BY](https://creativecommons.org/licenses/by/4.0/)
* \soft{Original Presentation by} Aline Abler
No preview for this file type
img/ filter=lfs diff=lfs merge=lfs -text
img/* filter=lfs diff=lfs merge=lfs -text
#!/bin/bash
echo "Building pdf..."
pandoc -t beamer --template template.tex --listings pres.md -o pres-part.pdf --pdf-engine pdflatex \
&& pandoc -t beamer --template template.tex --listings firstslide.md -o firstslide.pdf --pdf-engine pdflatex \
&& pdfunite firstslide.pdf pres-part.pdf pres.pdf \
&& rm firstslide.pdf pres-part.pdf \
&& echo "Build successful"
# Welcome to the History of Unix Spotlight Talk!
* If there are any technical problems, let me know!
\usepackage[T1]{fontenc} %pipes don't display properly without this
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage{color}
\usepackage{datapie}
\usepackage{multicol}
\usepackage{siunitx} %pretty measurement unit rendering
\usepackage{hyperref} %enable hyperlink for urls
\usepackage{caption} % needed to tweak caption size
\usefonttheme[onlymath]{serif}
\setcounter{MaxMatrixCols}{20}
\DeclareSIUnit\pixel{px}
\usecolortheme[RGB={37,68,113}]{structure}
\usetheme{Dresden}
\newenvironment{figurehere}
{\def\@captype{figure}}
{}
\makeatother
%commands to exclude sections from miniframes
\makeatletter
\let\beamer@writeslidentry@miniframeson=\beamer@writeslidentry
\def\beamer@writeslidentry@miniframesoff{%
\expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{}% does not happen normally
{%else
% removed \addtocontents commands
\clearpage\beamer@notesactions%
}
}
\newcommand*{\miniframeson}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframeson}
\newcommand*{\miniframesoff}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframesoff}
\beamer@compresstrue
\makeatother
%various gray colors
\definecolor{slg}{gray}{0.25}
\definecolor{lg}{gray}{0.55}
\definecolor{vlg}{gray}{0.73}
\definecolor{tlg}{gray}{0.9}
%TheAlt colors
\definecolor{ldorange}{HTML}{F18A20}
\colorlet{ldbright}{ldorange!70!white} % tinted version of orange, used in miniframes
\definecolor{ldblue}{HTML}{254471}
%reduce caption font size:
\captionsetup{font={scriptsize,color=lg}}
%do not prepend numbering/lettering to figures/subfigures
\captionsetup{labelformat=empty} %do not prepend letters to figure captions
%Apply TheAlt colors to theme
% section titles in top navigation bar
\setbeamercolor{section in head/foot}{parent=palette tertiary,fg=ldorange}
\setbeamertemplate{section in head/foot shaded}{\color{ldbright}\usebeamertemplate{section in head/foot}}
% miniframes (little navigation circles)
\setbeamercolor*{mini frame}{fg=ldorange,bg=ldbright}
\setbeamertemplate{mini frame in other section}[default][0]
\setbeamertemplate{mini frame in other subsection}[default][0]
% others
\setbeamercolor{author in head/foot}{fg=white}
\setbeamercolor{subsection in head/foot}{fg=white}
\setbeamercolor{caption name}{fg=vlg}
\setbeamercolor{caption}{fg=vlg}
\setbeamercolor{frametitle}{fg=ldblue}
\setbeamertemplate{caption}{\raggedright\insertcaption\par}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{bibliography item}[text]
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\lstdefinestyle{custombash}{
belowcaptionskip=1\baselineskip,
captionpos=,
breaklines=true,
frame=L,
xleftmargin=\parindent,
language=bash,
showstringspaces=false,
basicstyle=\scriptsize\ttfamily,
rulecolor=\color{tlg},
backgroundcolor=\color{tlg},
fillcolor=\color{tlg},
rulesepcolor=\color{tlg},
commentstyle=\itshape\color{purple!60!black},
keywordstyle=\bfseries\color{ldorange!80!black},
%keywordstyle=\bfseries\color{green!40!black},
identifierstyle=\color{blue},
stringstyle=\color{orange},
}
\lstset{language=Bash,style=custombash,caption={Descriptive Caption Text},label=DescriptiveLabel}
\title{Bash Workshop}
\author{Aline Abler}
\institute{\includegraphics[width=0.35\textwidth]{img/logo_blue.pdf}}
\renewcommand{\emph}[1]{\textcolor{ldorange}{#1}}
\newcommand{\soft}[1]{\textcolor{lg}{#1}}
\newcommand{\textt}[1]{\textcolor{blue}{\texttt{#1}}}
\newcommand{\bigtext}[1]{\centering\Huge \textbf{\textcolor{ldorange}{#1}}}
%shortcut to insert small logo in footline
\def\logo{%
\resizebox{!}{3ex}{\includegraphics{img/logo_white.pdf}}
}
% Define a custom footline that includes our logo
\setbeamertemplate{footline}
{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}
\usebeamerfont{title in head/foot}%
\insertshorttitle\hfill\insertframenumber
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth,ht=3.5ex,dp=1.625ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}
\usebeamerfont{author in head/foot}
\raisebox{0.5ex}{\insertshortauthor}\hfill\raisebox{-0.5ex}{\logo}
\end{beamercolorbox}
}
---
author:
- Nicolas König
title: A Short History of Unix
---
# What is Unix?
## What is Unix?
###
\bigtext{What is Unix?}
### The Definition
A system can call itself *Unix* if it conforms to the *Single Unix Specification* maintained by *The Open Group*.
<!--
Talk about standardization later
-->
### Difference between Unix and Linux
Unix is an interface description, Linux is an OS
- Linux's syscall interface doesn't provide all the required functions
- Also, to be complient, many more things have to be provided
- header files
- struct definitions
- even shell & command line utilities
- More on that later
### Current Unixs
- MacOS
- AIX
- Only one Linux distributions (EulerOS)!
- All of them still adhere to the standards very closely
<!--
Doing the conformance tests is expansive
-->
# The Early Days
## The Early Days
###
\bigtext{The Early Days}
## Context for the creation
### Bell Labs
* Part of telephone-monopoly company AT&T
* very "free" research culture
* The choice of research topic was largely decided by the researchers
* 9 Nobel price winners!
### Multics
* "MULTiplexed Information and Computing Service"
* Collaboration between Bell Labs, General Electric and the MIT
* Successor to MIT's Compatible Time Sharing System (CTSS)
<!--
With modern eyes: Very weird features
Grand unified memory, no distinction between files and "normal" memory
both called resounding success and an utter failure
-->
### Thompson, Kerningham, Ritchi
```{=latex}
\begin{figure}
\centering
\includegraphics[width=0.5\textwidth]{img/kt_and_dr.jpg}
\end{figure}
```
### Thompson, Kerningham, Ritchi
```{=latex}
\begin{figure}
\centering
\includegraphics[width=0.6\textwidth]{img/bk.jpg}
\end{figure}
```
<!--
Kerningham & Ritchi both worked on Mutlics
-->
### The PDP-7
* 8K 18-bit words memory
* ca. 570 kHz
* Produced by the Digital Equipment Cooperation (DEC)
### The PDP-7
\begin{figure}
\includegraphics[width=0.5\linewidth]{img/pdp7-oslo.jpg}
\caption{A restored PDP-7}
\end{figure}
<!--
Weak computer
No interest in buying a new one after Multics disaster
Used for Circuit desing, but most of the time free
-->
## The First Unix
### A Game
\centering
First, there was a Game
### An IO-Scheduler
\centering
Then, an IO-Scheduler
<!--
Disk inside was too fast
Needed a program to put data on it
-->
### An Operating System
\bigtext{"At some Point I realized I was just three weeks away from an operating system."}
<!--
Still missing 3 (exec,) editor, shell, assembler
Wife away 3 weeks -> one week per programm
-->
### The Unix Philosophy
\bigtext{Make each program do one thing well}
### The Unix Philosophy
\centering
If you only have this little memory, you can't make your programs complex!
\centering
It turned out, that this is a good idea in general
## Released Unix Versions
### The First Edition
Released in Nov. 1971
* Supported the PDP-11
* relatively feature-rich
* already included a Fortran compiler
<!--
Story on how they got the PDP-11
Patent applications!
Name comes from the manual, development very fast
hand-inserted patches when it was send out
"Love, Ken"
-->
### Common Utilities
* A lot of commonly known utilities already included in the first release
* `cd`, `chown`, `ls`, `cp`, `dc`, `ln`, `su`, `who`, ...
### The Third Edition
Released in Feb. 1973
* Included a C compiler
* Included first implementation of pipes
### The C Programming Language
* Heavily influenced by BCPL
* Designed as a system programming language
* The language still looked slightly different
* The Dialect is known as K&R-C
* Publicised in the book "The C Programming Language" by Kerningham & Ritchi
### The C Programming Language
```c
foo(a, b)
int a;
int *b;
{
return a + *b;
}
```
### Fourth Edition
Released in Nov. 1973
* The first edition almost completely written in C
* Made portability possible
* Typically licensed with source code (and for a nominal fee)
### Seventh Edition
Released in Jan. 1979
* Many new tools still in use today
* `awk`, `make`, `sed`, `tar`
* Included the first version of the Bourne Shell (`sh`)
* Included a fully featured Fortran77 Compiler
### A story of overwhelming success
The number of installed Systems rapidly increased
- 2. Edition (Jun. 1972): 10 systems inside AT&T
- 5. Edition (Jun. 1974): 50 systems inside AT&T
By 1977, it was running on 500 sites, including 125 Universities
<!--
Mind how large systems where at that time!
-->
# The Unix War
## The Unix War
###
\bigtext{The Unix War}
## The two large competitors
### Berkley Software Distribution (BSD)
* Thompson was a visiting Professor at UCal in the year 1975/1976
There, many new tools and features where developed
* the editor `vi`
* `sendmail`
* a Pascal Compiler
Then, with 3BSD (1979), a full Unix distribution was released
<!--
Worth mentioning:
- the Berkley Fast File System
-->
### BSD
They also wrote a port to DEC's new VAX architecture
- Added support for Virtual memory
<!--
C paid off!
Might not be clear today, but DEC was __big__ back then.
VAX and Unix where so far intertwined that "Not all the world's a VAX" made
it into the "10 commandments for C programmers"
The only other two ports existing was an intercal (7&8)/32 ports
-->
### 4.2BSD
Released in 1983
- Added sockets and a complete TCP/IP-stack
<!--
THE defining feature for BSD-Linux
-->
### System V
In 1982, antitrust legislation forces AT&T to break up
- Lifts the ban on selling software
<!--
Baby Bells!
-->
### System V
\centering
AT&T immideatly proceeded to bundle Unix for commercial use and released System V in 1983
<!--
Not the first commercial AT&T Unix release, 1981 System III (a lot of the
legal stuff had already been settled)
-->
### System V Release 1 (SVR1)
- Added an extensive interprocess communication API
- Also included many features from BSD
- `curses`
- `vi`
### Derivatives of the Two
There where many derivatives by different companies.
For BSD:
- SunOS
- Xenix
and for System V:
- HP-UX
- AIX
<!--
Even Microsoft made their own!
-->
### Derivatives
```{=latex}
\begin{figure}
\includegraphics[width=0.8\linewidth]{img/unix_tl.png}
\end{figure}
```
### System V Release 4 (SVR4)
- The most successful release of System V
- Result of a unification drive between several Unix vendors
- Added a lot of features from all over the Unix world
- `ksh`
- ELF file format
- TCP/IP-support
### X/Open
The drive for unification was formalized in the formation of the X/Open consortium
- It was supposed to provide compatibility guides and standards
- Would later go on to acquire the rights to the Unix name
BSD, out of fear over the influence of AT&T & Sun, founded its own alternative, the
Open Software Foundation.
* AT&T then founded, as an answer, Unix International.
<!--