Slide 1

Slide 1 text

Starring Directed By Special Appearance Presented by With

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

THE NAME OF THIS SPEAKER IS HENNING SCHWENTNER LIVE 45 MIN TALK

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

!"# Kolleg:in gesucht (Deutschlandweit)

Slide 6

Slide 6 text

26.05.23 //// Seite 10 WPS - Workplace Solutions GmbH WHY DO I CARE? § DevOps § Cloud § Docker/Containerization/Virtualization § It’s the 20ies—Even Microsoft <3 Linux § Op: § Servers are typically Linux + Java + (Tomcat) + DB § Start and stop Daemons § Dev: § Tools that help in your developer day

Slide 7

Slide 7 text

@hschwentner History

Slide 8

Slide 8 text

@hschwentner UNIX Foto: Dennis Hamilton/flickr/CC BY 2.0 Ken Thompson Dennis Ritchie 1969 Bell Labs

Slide 9

Slide 9 text

@hschwentner GNU Richard Stallman Free Software Foundation

Slide 10

Slide 10 text

@hschwentner UNIX—Diversity Xenix

Slide 11

Slide 11 text

@hschwentner Linux Linus Thorvalds 1991

Slide 12

Slide 12 text

@hschwentner Linux—Distributions

Slide 13

Slide 13 text

@hschwentner Today: Unix Everywhere Windows Terminal WSL is Unix BSD-based

Slide 14

Slide 14 text

26.05.23 //// Seite 20 WPS - Workplace Solutions GmbH § FHS § Static/ and Shared/Local Files § First Hierarchy § / § /bin, /sbin § /etc § /root, /home § /proc, /dev, /sys?, /mnt § Second Hierarchy § /usr, /var § /usr/bin, /usr/sbin, /usr/X11/bin § /var/tmp § /var/log § Local Hierarchy § /usr/local § Non-packaged tools vs. non-OS tools § Other tools § /opt THE FILESYSTEM TREE

Slide 15

Slide 15 text

26.05.23 //// Seite 21 WPS - Workplace Solutions GmbH § root § groups § user § Rights: § user § group § world ROLES AND RIGHTS

Slide 16

Slide 16 text

@hschwentner Terminal/ Console/ TTY/Shell

Slide 17

Slide 17 text

@hschwentner In the old days mainframe (a.k.a. host) terminal terminal

Slide 18

Slide 18 text

@hschwentner Terminal terminal (noun): a piece of hardware to interact with a computer

Slide 19

Slide 19 text

@hschwentner Kinds of terminals console teleprinter, a.k.a teletype(writer), a.k.a. TTY video terminal (here: VT 100) for admins for users

Slide 20

Slide 20 text

@hschwentner Terminal emulator terminal emulator (noun): a piece of software that emulates a terminal

Slide 21

Slide 21 text

@hschwentner Terminal emulators Windows Terminal macOS Terminal Windows Console (conhost.exe) iTerm2 XTerm Alacritty

Slide 22

Slide 22 text

@hschwentner Terminal emulators II

Slide 23

Slide 23 text

@hschwentner Shell shell (noun): A piece of software to interact with the kernel. Runs typically in a terminal. There are command-line shells and graphical shells.

Slide 24

Slide 24 text

@hschwentner CLI shells C shell KornShell Bourne shell Command prompt PowerShell Fish

Slide 25

Slide 25 text

@hschwentner Graphical shells

Slide 26

Slide 26 text

@hschwentner UNIX on Windows

Slide 27

Slide 27 text

@hschwentner On Windows

Slide 28

Slide 28 text

@hschwentner Terminal/ Console/ TTY/Shell

Slide 29

Slide 29 text

@hschwentner /home Command line $ -l ls prompt command

Slide 30

Slide 30 text

@hschwentner /home Command = argument[] $ -l ls argument 0 arg. 1 arg. 2

Slide 31

Slide 31 text

@hschwentner /home Anatomy of a command $ -l ls command option parameter

Slide 32

Slide 32 text

@hschwentner Important commands • pwd • cd/pushd/popd • ls • mkdir/touch • rm • cat/tail/less • man • & bg/fg • . and .. • ls -la

Slide 33

Slide 33 text

@hschwentner Typical options • - and -- • -v --version • -h --help option (noun): An argument that starts with a dash. Several options can be put into one argument.

Slide 34

Slide 34 text

@hschwentner Getting help • -h –help • man

Slide 35

Slide 35 text

@hschwentner Path

Slide 36

Slide 36 text

@hschwentner Tab completion

Slide 37

Slide 37 text

@hschwentner PIPELINING • Unix commands are generally working on strings of characters • STDIN, STDOUT, STDERR • Pipes allow to connect the output of one command to connect to the input of another echo "Hello world" > hallo.txt 2> < echo "Hallo world" | wc

Slide 38

Slide 38 text

@hschwentner Installers • Debian family • Apt, apt-get, aptitude • deb/dpkg • snap • Redhat family • yum • rpm • Zypper • Alpine • apk • OS X • Homebrew, (MacPorts, Fink) • Windows • Cygwin • Chocolatey • Winget

Slide 39

Slide 39 text

@hschwentner SED and GREP

Slide 40

Slide 40 text

@hschwentner SCRIPTING • Shell scripts • Perl/Python & co. • Reg Ex • Scripting in Dockerfiles • Shebang: • #!/bin/sh • #!/usr/bin/env perl

Slide 41

Slide 41 text

@hschwentner Command Line Java • java/javac • jshell • mvn/gradle

Slide 42

Slide 42 text

We can do it, too!

Slide 43

Slide 43 text

@hschwentner EXERCISE • On Windows 10: install Windows Terminal/Git Bash/Cygwin • Create directory learning-unix • Change into that directory • Create a file hello.txt • Change ownership and access of hello.txt • Make it executable

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

Bibliography Nemeth, Evi, Garth Snyder, Trent R. Hein, Ben Whaley, and Dan Mackin. UNIX and Linux System Administrators Handbook. 5th ed. Boston: Addison-Wesley, 2017. Raymond, Eric S. The Art of UNIX Programming. Boston: Addison-Wesley, 2004. Hofer, Stefan and Henning Schwentner. Domain Storytelling: a Collaborative, Visual, and Agile Way to Develop Domain- Driven Software. Boston: Addison-Wesley, 2022.

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

Henning Schwentner ⌂ https://hschwentner.io @hschwentner hs@wps.de