Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit5070a98269d640abc8f7b05b37d8de5ff6a09896 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-01-23 18:50:44 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-01-23 18:50:44 +0200
Files8043745f4ff8c3e8d2de3e625715bdac905dbe37
syndamia.com-5070a98269d640abc8f7b05b37d8de5ff6a09896.tar
syndamia.com-5070a98269d640abc8f7b05b37d8de5ff6a09896.tar.gz
syndamia.com-5070a98269d640abc8f7b05b37d8de5ff6a09896.zip
Parent9e78b41049fe2bdd125bb937f8f0aaf3fcd38cf2 (diff)
[talks/lbs] Reworked the entire presentation, fixing and improving formatting, updating content
2 files changed, 302 insertions, 176 deletions
-rw-r--r--src/talks/linuxgraphy-by-strabo/index.md402
-rw-r--r--src/talks/linuxgraphy-by-strabo/mll-set.sh76
diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md
index 4c23c4a..85624e2 100644
--- a/src/talks/linuxgraphy-by-strabo/index.md
+++ b/src/talks/linuxgraphy-by-strabo/index.md
@@ -11,37 +11,35 @@
&&centered &&clide
-&&font35
# Linuxgraphy by Strabo
-&&/font
+
*Made by [Syndamia](https://syndamia.com)*
&&lineb4 &&ftable
&&lineb1
+&&font22
2000 years ago [Strabo](https://en.wikipedia.org/wiki/Strabo) published [Geography](https://en.wikipedia.org/wiki/Geography), in which he laid out the world as it was known to the Romans and Greeks.
-<br><br>
+&&lineb1
Today, I'll lay out Linux as it is known to me.
+&&/font
![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Strabo.jpg/199px-Strabo.jpg)
&&lineb1
-&&/table
+&&/table &&/clide &&/centered
-&&/clide &&/centered
-
-
-&&font35 &&slide
+&&slide &&font35
# Contents
&&ftable &&cont
-1. Brief timeline
+1. Historical context
2. Structure of UNIX-likes
1. Shell
2. UNIX-style file system
@@ -67,72 +65,67 @@ Today, I'll lay out Linux as it is known to me.
&&/cont &&/table
-&&/slide &&/font
+&&/font &&/slide
&&slide
-# 1. Brief timeline
+# 1. Historical context
-&&font27
+&&lineb1
#### 1945 - 1955
You directly loaded instructions into memory and let it execute your "code" (processor instructions).
Nothing else ran on the machine.
-This process was labor intensive, a qualified operator had to load your program, then after completion he would have to dump the memory contents, remove any tapes, punch cards, etc., reset the machine and load the next job.
+This process was labor intensive: a qualified operator loaded your program, dumped the memory contents, remove any external media, reset the machine and load the next job.
#### 1956 - 1959
-By the late 1950s, as computers became faster, a lot of time was spend on operators managing jobs.
-
-This was automated via [resident monitors](https://en.wikipedia.org/wiki/Resident_monitor): very small programs, which always *resided* in memory, and *monitored* what the state of the current job was.
-If a job finished, it would automatically load and start the next program.
+Computers became faster, but a lot of time was spend on managing jobs.
-Since a monitor could run the next program at any time, series (batches) of jobs would be grouped together and execute one after another by the monitor.
-This process is called [batch processing](https://en.wikipedia.org/wiki/Batch_processing).
+[resident monitors](https://en.wikipedia.org/wiki/Resident_monitor): very small programs, which always *resided* in memory, and *monitored* what the state of the current job was.
+Jobs were loaded in series ([batches](https://en.wikipedia.org/wiki/Batch_processing)).
+When the current job finished, memory would be dumped and the next one would automatically be loaded and started.
-&&/font &&/slide
+&&/slide
-&&font27 &&slide
+&&slide
#### 1960s
-But by far the biggest bottle neck were peripherals, tapes and punch cards were extremely slow.
-[Multiprogramming](https://en.wikipedia.org/wiki/Computer_multitasking#Multiprogramming) was born: while the current job is waiting for a peripheral, doing nothing, another job would be started.
+&&lineb1
-&&lineb2
+Peripherals (tapes, punch cards, ...) were extremely slow.
+[Multiprogramming](https://en.wikipedia.org/wiki/Computer_multitasking#Multiprogramming): the current job is waiting for a peripheral, another job would be started.
-American Airlines (in collaboration with IBM) created a [travel reservation system](https://en.wikipedia.org/wiki/Sabre_%28travel_reservation_system%29), where travel agents would search, price and book services provided by the airline.
-Such systems increased the requirements of a computer system:
+[Travel reservation system](https://en.wikipedia.org/wiki/Sabre_%28travel_reservation_system%29) by American Airlines: where travel agents would search, price and book services.
+A computer system now had to support:
- User accounts with concurrent access
-- Response time needed to be slower and ease of use had to be improved
+- Fast response time and ease of use
- Storage organization, also following the rise of disks
-- Data communication links (were often phone lines)
+- Data communication links (often phone lines)
-&&lineb2
+&&lineb1
-Another important factor is the rise of minicomputers: much smaller and incredibly cheap (compared to the alternatives) computers, which lead to an increase in digital technology usage by businesses.
+More and more business started using computers, thanks to [minicomputers](https://en.wikipedia.org/wiki/Minicomputer), so demand for OS software increased.
-&&/slide &&/font
+&&/slide
-&&font27 &&slide
+&&slide
#### 1964 - 1969
-It is important to talk about IBM's [System/360](https://en.wikipedia.org/wiki/IBM_System/360).
-A line of computers, each with great expansion capabilities, redesigned hardware of unparalleled speed, simulators and emulators for backwards compatibility, all under one instruction set and operating system (mostly job management).
+IBM's [System/360](https://en.wikipedia.org/wiki/IBM_System/360) line of computers, each with expansion capabilities, backwards compatibility, all under one instruction set and operating system.
-This is also the time when the mouse, alongside bit-mapped displays, graphical user interface concepts, teleconferencing and hypertext, [was invented](https://en.wikipedia.org/wiki/The_Mother_of_All_Demos).
-
-Our final stop is [Multics](https://en.wikipedia.org/wiki/Multics), an operating system that influenced all modern operating systems.
+[Multics](https://en.wikipedia.org/wiki/Multics), an influential operating system that was designed for a General Electric mainframe.
Some of it's novel ideas include, but are not limited to:
- [Time-sharing](https://en.wikipedia.org/wiki/Time-sharing): sharing resources of a singular machine among many users (via [multiprogramming](https://en.wikipedia.org/wiki/Multiprogramming) and [multi-tasking](https://en.wikipedia.org/wiki/Computer_multitasking))
@@ -141,21 +134,21 @@ Some of it's novel ideas include, but are not limited to:
- [Hierarchical file system](https://en.wikipedia.org/wiki/Directory_%28computing%29): Arbitrary directories with subdirectories, rather than just having files next to each other or having directories which could only contain files.
- [Command processor](https://en.wikipedia.org/wiki/Shell_%28computing%29) (that is separated from the OS): More on that later
-&&/slide &&/font
+&&/slide
-&&font27 &&slide
+&&slide
#### 1969: Death of Multics and birth of UNIX
-Multics was very ambitious and had a lot of great ideas and minds behind it, but it ultimately grew too large and failed.
-Programming was done mostly in [Bell Labs](TODO), who pulled pretty quickly from the project.
+Ultimately Multics grew too large and became unusable, unmaintainable and unchangeable.
+In the beginning, programming was done mostly by [Bell Labs](https://en.wikipedia.org/wiki/Bell_Labs), with [Ken Thompson](https://en.wikipedia.org/wiki/Ken_Thompson) as one of the developers.
&&lineb1 &&ftable
&&font18
-![](https://upload.wikimedia.org/wikipedia/commons/f/f8/Ken-Thompson-2019.png =250x)
+![](https://upload.wikimedia.org/wikipedia/commons/f/f8/Ken-Thompson-2019.png =160x)
*Ken Thompson image by National Inventors Hall of Fame*
![](https://upload.wikimedia.org/wikipedia/commons/1/1b/Ken_Thompson_and_Dennis_Ritchie--1973.jpg)
*Ken Thompson and Dennis Ritchie in 1973*
@@ -163,47 +156,45 @@ Programming was done mostly in [Bell Labs](TODO), who pulled pretty quickly from
&&cont
-[Ken Thompson](TODO), one of the programmers that worked on it, still had some desire to work on operating systems.
-After Bell Labs left Multics, he made a program for maximizing the throughput of a disk on a PDP-7.
-To test it, he wrote some programs over time and eventually realised an operating system could easily be made.
+Thompson still had some desire to work on operating systems, after Bell Labs pulled out.
+The tools he made while rewriting a video game [he made](https://en.wikipedia.org/wiki/Space_Travel_%28video_game%29) on a PDP-7 lead to a whole operating system: UNIX.
-This marked the birth of UNIX, an operating system, based and expanded on many of Multic's ideas (except the "grow too large" one).
+Based, expanded on and improved upon many of Multic's ideas, UNIX became the father of modern OSs.
&&/cont
-&&/table
-&&/slide &&/font
+&&/table &&/slide
-&&font30 &&slide
+&&slide
# 2. Structure of UNIX-likes
Ignoring [standards](https://unix.stackexchange.com/questions/14368/difference-between-posix-single-unix-specification-and-open-group-base-specifi/14415) and [specifications](https://unix.stackexchange.com/questions/87686/what-makes-an-operating-system-unix-like), in my opinion, from the point of a user, a UNIX-like OS has the following components:
-&&lineb1
+&&lineb2
1. **shell**: A programmable replaceable command-line interpreter, with utilities for managing the whole system and support for pipelines and I/O redirection
-2. **UNIX-style file system**: [Filesystem](https://en.wikipedia.org/wiki/Unix_filesystem) as a rooted tree (even for all separate volumes), objects (nodes) in the file system are [inodes](TODO) and an inode can be [(at least)](https://en.wikipedia.org/wiki/Unix_file_types) either a regular file, directory or devices. Permissions are set per owner, group members and other users.
+2. **UNIX-style file system**: [Filesystem](https://en.wikipedia.org/wiki/Unix_filesystem) as a single rooted tree, objects (nodes) in the file system are [inodes](https://en.wikipedia.org/wiki/Inode) and an inode can be [(at least)](https://en.wikipedia.org/wiki/Unix_file_types) either a regular file, directory or devices. Permissions per users and group.
3. **kernel**: Program that manages all communication and operations between the hardware and software
-&&lineb3
+&&lineb4
-&&font20 *For now we'll generally just look over some of the common stuff and go into detail later, while in Linux.* &&/font
+&&font18 *For now we'll generally just look over some of the common stuff and go into detail later, while in Linux.* &&/font
-&&/slide &&/font
+&&/slide
-&&font35 &&slide
+&&slide &&font35
## 2.1. shell
&&lineb2 &&ftable
&&cont
-Our operating system is divided into layers, [like an onion](https://youtu.be/-FtCTW2rVFM?t=57).
+The operating system is divided into layers, [like an onion](https://youtu.be/-FtCTW2rVFM?t=57).
Only the kernel has access to the hardware.
shells and executables (binaries) have access to the kernel.
@@ -213,43 +204,67 @@ While on the topic of UNIX, we'll only discuss the former.
&&centered ![](./img/unix-layers.png) &&/centered
-&&/table &&/slide &&/font
+&&/table &&/font &&/slide
-&&font27 &&slide
+&&slide
-Command-line shells operate solely with text, preferably without too fancy formatting (there are very modern ones that can handle images, but these are an exception, rather than the norm).
+Command-line shells operate solely with text, usually with only ASCII characters.
+There are usually two terms used when talking about connecting to a computer (to the shell), those are "terminal" ("console") and "teleprinter" ("teletype").
-&&lineb1 &&ftable
+&&table
-Historically, video displays (at first [CRT](TODO) ones) became widely available in the late 1970s, but before that the "mainstream" way to access a computer was with a teleprinter (commonly known as teletype): effectively a (typewriter) keyboard and a fast text printer, connected to a computer.
+Video displays became widely available in the late 1970s, so before that access was done with a "teleprinter", a typewriter-printer combo.
-&&font18 &&fright
-![](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/ASR-33_at_CHM.agr.jpg/1280px-ASR-33_at_CHM.agr.jpg =320x)
+&&font18
+![](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/ASR-33_at_CHM.agr.jpg/1280px-ASR-33_at_CHM.agr.jpg =860x)
*Teletype Model 33 by [Arnold Reinhold](https://commons.wikimedia.org/wiki/User:ArnoldReinhold)*
-&&/fright &&/font
+&&/font
+
&&tarow
+With the advent of computer displays, teleprinters were replaced with terminals, video display-keyboard combo.
+Thanks to the widely popular [VT100](https://en.wikipedia.org/wiki/VT100), almost all terminals support [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code).
+
&&font18
-![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/DEC_VT100_terminal.jpg/675px-DEC_VT100_terminal.jpg?20131106192408 =320x)
+![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/DEC_VT100_terminal.jpg/675px-DEC_VT100_terminal.jpg?20131106192408 =860x)
*DEC VT100 by [Jason Scott](https://www.flickr.com/people/54568729@N00)*
&&/font
-Later, those were replaced by terminals, a "normal" keyboard and a display, connected to a computer.
-**The** most popular and influential one was the [VT100](TODO), with it's most influential feature being never seen before support of [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code): special text that would modify the cursor position and later being able to, for example, change colors for specific text.
+&&/table &&/slide
+
-&&/table &&/slide &&/font
+&&slide
+Today we don't usually use such specialised hardware, but the names persist with slightly different meanings.
-&&font27 &&slide
+[Virtual Terminal](https://en.wikipedia.org/wiki/Virtual_console) (Console): on some modern UNIX-likes (like Linux), the kernel/OS provide special devices, where a console is directly implemented/simulated with the connected computer and display. Sometimes could be called "tty".
+
+- systems that don't provide it usually expose another way to connect a console (now external hardware and/or software is required), like a [serial](https://en.wikipedia.org/wiki/Serial_port) port
+
+[Terminal Emulator](https://en.wikipedia.org/wiki/Terminal_emulator): a special program that emulates a virtual terminal (within another display system)
+
+[Pseudoterminal](https://en.wikipedia.org/wiki/Pseudoterminal) (pty): a device that behaves, from the point of a user, like a terminal (emulator), but could do other additional things
+
+- ssh, a program to remotely connect to a device's shell, establishes a pseudoterminal. You use your (local) terminal to send and receive text to a remove terminal.
-In UNIX CLI shells, most of the commands are just regular programs.
-These programs could exist in more than one folder: `/bin` and `/usr/bin` for example, so we store every location in a variable called "PATH".
+&&/slide
+
+
+
+&&slide &&font27
-Command-line UNIX shells always have the following features:
+Most commands are regular programs, which exist in any folder (specified inside the variable "PATH").
+Each command can be given parameters, separated by spaces, each (by convention) being either text values or options (switches).
+
+Options usually start with a hyphen `-` (like `-c` or `-current-time`) and often support abbreviations (`-a -b -c` to `-abc`).
+Newer conventions also allow start with two hyphens `--` (`--current-time`), though if shown as-is indicate the rest is a string.
+More rarely you might see `--OPTION=VALUE` or just `OPTION=VALUE`.
+
+UNIX shells always have at least these additional functionalities:
- pipelines: being able to redirect the output from one command to another without limit
@@ -257,46 +272,38 @@ Command-line UNIX shells always have the following features:
command1 [args...] | command 2 [args...] | ...
```
-- I/O redirection: redirection of input and output, allowing use to use a file as (user) input:
+- I/O redirection: redirection of input and output, allowing insertion of input from a file or storage of output into a file:
```
command [args...] < filepath
- ```
-
- or to put output into a file
-
- ```
command [args...] > filepath
```
-&&font18
-*A lot of modern ones also support [heredocs](https://en.wikipedia.org/wiki/Here_document), [job control](https://en.wikipedia.org/wiki/Job_control_%28Unix%29), built-in [test command](https://en.wikipedia.org/wiki/Test_%28Unix%29) and more, we'll explore them later.*
-&&/font
-
-&&/slide &&/font
+&&/font &&/slide
-&&font30 &&slide
+&&slide
## 2.2. UNIX-style file system
-- Rooted singular tree of directories. Disk partitions, removable media, etc. all live in that tree.
-- Each tree object (node) is an [i(ndex)node](TODO), containing type, ownership, access, internal data and any other metadata, but **not** name!
+- Rooted singular tree of directories (the root folder of which is called "root", denoted with a "/")
+- Each tree object (node) is an [i(ndex)node](https://en.wikipedia.org/wiki/Inode), containing type, ownership, access, internal data and any other metadata, but **not** name!
- Directory inodes (files) contain a table with rows of names and inode numbers, mapping a file name to it's contents. Each row is called a [hard link](https://en.wikipedia.org/wiki/Hard_link). Every directory has a hard link to itself, called ".", and a hard link to it's parent, called "..".
![](./img/unix-dir-tree.png)
-&&/slide &&/font
+&&/slide
-&&font30 &&slide
+&&slide &&font27
The main attributes that every inode has are as follows:
- [file type](https://en.wikipedia.org/wiki/Unix_file_types): Each inode represents some sort of file (data), but a "file" can also be a directory or device, so we need to know how to handle it.
There are 7 main types (but there can exist more, depending on OS):
+ &&lineb1
+ **regular**: just a plain old file
+ **directory**: as explained, a file containing hard links to other files. Each directory is allowed to appear only once in a single parent.
+ **symbolic link**: points to any file (or directory). It contains the (relative) path to that object (as a simple string), so a symlink could even not be valid.
@@ -305,40 +312,59 @@ The main attributes that every inode has are as follows:
+ **character special**: devices which are accessed via serial streams of input or output, like keyboards, mice, graphics cards and teletypes
+ **sockets**: file for inter-process communication. Compared to FIFO specials, they can be used by more than two processes, used in both direction and support [file descriptors](https://en.wikipedia.org/wiki/File_descriptor) and packets
-&&/slide &&/font
+&&/font &&/slide
+
+&&slide
+
+#### Side-step into users and groups
-&&font30 &&slide
+&&lineb3
-- [file permissions](https://en.wikipedia.org/wiki/File_system_permissions): control the ability of a user to read (navigate for directories), change and execute a file.
- A user in UNIX is essentially a small collection of data, most important of it being an ID (number), a name (string), a group id (number; files created by the user are in that group) and a password.
- Groups are also small collections of data, but much simpler, comprised only of an ID (number), a name (string) and a list of users that are "in" the group. Their main purpose is to simplify access control.
- The data for each is stored in `/etc/passwd` and `/etc/group` respectively.
- <br>
+A user in UNIX is essentially a small collection of data, most important of it being a unique ID (number), a name (string), a group id (number; files created by the user are in that group) and a password.
+
+Groups are also small collections of data, but much simpler, comprised only of a unique ID (number), a name (string) and a list of users that are "in" the group. Their main purpose is to simplify access control.
+
+User with ID 0 is called root, it is the "system administrator", all actions made by the system itself are done as that user.
+Every user has their own "home" folder (under "/home/USERNAME/", except for root, which is "/root/"), in which they store personal files, as well as user-specific configuration files.
+
+&&/slide
+
+
+
+&&slide
+
+- [file permissions](https://en.wikipedia.org/wiki/File_system_permissions): control the freedom of a user to read (navigate for directories), change and execute files
File permissions are split into three sets: what the owner can do, what group members can do and what anyone else can do.
Each set contains a mix of three permissions: **r**ead, **w**rite and e**x**ecute, and each set stores some combination of them.
+ &&lineb1
+ Each is represented by a bit in the order above (`101` means you *can* read, *cannot* write, *can* execute) and the overall permissions are often shown as a three digit number or character string.
+ Example: `111101100` will be shown as `754` or `rwxr-xr--`
+
- link count: the amount of hard links that point to the inode. Every directory inode contains (normally) exactly two: one from the parent and one from itself ("."). A file is only deleted where there are no hard links left to it (or when there is only one for a directory).
-- User ID of owner and Group ID
-- file size and timestamps for modification
-&&/slide &&/font
+- User ID of owner, Group ID, file size and timestamps
+
+&&/slide
-&&font35 &&slide
+&&slide &&font35
## 2.3. Kernel
-&&lineb2
+The kernel has the core functionality of the operating system and bridges the gap between programs and hardware.
+Some important subsystems include scheduling, file, device, process and memory management.
-The kernel is completely separated from everything else, it only communicates with hardware and exposes an API to have other programmes communicate with it.
+To preserve the [everything is a file](https://en.wikipedia.org/wiki/Everything_is_a_file) methodology, devices and processes can be handled as files (inside `/dev` and `/proc`).
+They (often, in modern kernels) aren't actual files on a hard drive, but "virtual" files, where operations on them are handled in a different manner than normal by the kernel.
-&&lineb2
+&&lineb1
Linux is **not** an operating system, it is a kernel!!!
-&&/slide &&/font
+&&/font &&/slide
@@ -348,18 +374,13 @@ Linux is **not** an operating system, it is a kernel!!!
Enough theory, time to have some fun and learn Linux!
-We'll be using [Linux Minimal Live](https://ivandavidov.github.io/minimal/#home) because:
+We'll be using [Linux Minimal Live](https://ivandavidov.github.io/minimal/#home) (just a bootable ISO) because:
-- it's very small, comprised of only the Linux kernel, GNU C library and Busybox
- so confusion, distractions and distro-specific configs will be minimal
+- very small, comprised of only the Linux kernel, GNU C library and Busybox
- made by a fellow Bulgarian &&bg
-It's important to note that it isn't an installable OS, but just a bootable disk image.
-
We're going to explore and look around the following stuff:
-&&lineb1
-
- **Shells**: What a modern shell would often support on a Linux based OS
- **Files and directories**: Naming conventions and commands to work with them
- **Common configuration files**: Relevant configuration files, their purpose and syntax
@@ -369,6 +390,25 @@ We're going to explore and look around the following stuff:
+&&clide &&font18
+
+#### If you're following at home
+
+Owing to it's size, not everything we need comes out of the box, so I created the script which installs what's needed.
+If you want to try it out yourself, after booting up Minimal Linux Live, type out and run:
+
+```
+wget -q https://syndamia.com/talks/linuxgraphy-by-strabo/mll-set.sh && chmod +x mll-set.sh && ./mll-set.sh
+```
+
+If you get the message `TLS certificate validation not implemented`, ignore it.
+
+In summary, it installs bash, coreutils and shadow "packages" (from [http://s.minos.io/archive/bifrost/x86\_64](http://s.minos.io/archive/bifrost/x86_64)) to /usr/local/bin, creates /etc/passwd, /etc/bashrc and /etc/profile with some values in them and starts bash.
+
+&&/font &&/clide
+
+
+
&&slide
## 3.1. Shells
@@ -384,7 +424,14 @@ We're going to explore and look around the following stuff:
+ `bg`: start a suspended job in the background
+ `fg`: resume the last job to be put in the background and make it the current job with which we're interacting
+ `jobs`: list all active (background) jobs
- &&lineb2
+
+&&/slide
+
+
+
+&&clide
+
+- continuation
+ Every job is identified with a Job ID (number), which you can use by prepending a percentage sign. Example, to resume the job with JID 4:
```
@@ -396,11 +443,11 @@ We're going to explore and look around the following stuff:
+ `kill`: send a signal to the process or job. Then that process will have to handle it accordingly.
Common ones are `-KILL` to immediately stop the process, `-QUIT` to quit it, `-ABRT` to cancel the current action, `-TERM` shut down (orderly), `-STOP` shut down (forcefully)
-&&/slide
+&&/clide
-&&font27 &&slide
+&&slide &&font27
- [heredoc](https://en.wikipedia.org/wiki/Here_document): File literal, meaning it is a user "string" which is interpreted as a file
+ start with `<< NAME`, where NAME can be anything you want, it is used to mark the beginning and end of a heredoc. `<<` is also a redirection symbol
@@ -421,13 +468,11 @@ We're going to explore and look around the following stuff:
+ `expr1 ; expr2`: Run expr2 after expr1 finished (no matter how)
+ Every program returns an exit status (number) to the shell, zero being a successful closing, and all others indicating failure.
-&&/slide &&/font
-
+&&/font &&/slide
-&&font27 &&slide
-&&lineb1
+&&clide &&font27
- [redirection](https://en.wikipedia.org/wiki/Redirection_%28computing%29): Outside of having `<` and `>` for I/O redirection, often there is also
+ `>>`: Acts like `>`, putting text into a file, but rather than overwriting everything, it appends it
@@ -446,13 +491,11 @@ We're going to explore and look around the following stuff:
* `N<inputfile`: redirects input file contents to standard stream N
* `N<&M`: redirects standard stream M to standard stream N
-&&/slide &&/font
-
+&&/font &&/clide
-&&font30 &&slide
-&&lineb1
+&&clide &&font27
- [built-in test command](https://en.wikipedia.org/wiki/Test_%28Unix%29): With `test` you can do conditional expressions. You can also often use brackets `[ args... ]` instead of `test args...`
+ Some of the available file checks
@@ -471,7 +514,7 @@ We're going to explore and look around the following stuff:
+ Operators: `!` - negation, `-a` - binary AND, `-o` - binary OR, parentheses for grouping (escaped with `\`)
-&&/slide &&/font
+&&/font &&/clide
@@ -482,13 +525,13 @@ We're going to explore and look around the following stuff:
+ `#!`: If on the first line of the file, is treated as a [shebang](https://en.wikipedia.org/wiki/Shebang_%28Unix%29), which specifies what interpreter to be used for the script
+ Each command (line) is executed in series, from top to bottom
-- [compound commands](TODO): Shells also often offer more advanced structured, with which to more easily write complex expressions
+- compound commands: Shells also often offer more advanced structured, with which to more easily write complex expressions
&&/slide
-&&font30 &&slide
+&&slide
## 3.2. Files and directories
@@ -510,16 +553,14 @@ We're going to explore and look around the following stuff:
- `/proc`: process information
- `/root`: home directory for the root user
-&&/slide &&/font
+&&/slide
-&&font30 &&slide
+&&slide
### General file system commands
-&&lineb1
-
- `mkdir`: create directories
- `rm`: remove a (hardlink to) file or directory
- `shred`: overwrite file contents
@@ -535,16 +576,14 @@ We're going to explore and look around the following stuff:
- `chmod`: change file modes
- `find`: search for a file inside a directory (recursively)
-&&/slide &&/font
+&&/slide
-&&font30 &&slide
+&&slide
### Working with text (files)
-&&lineb1
-
- `echo`: prints a given string to standard output
- `cat`: sequentially prints files to standard output
- `less`: view files with support for scrolling
@@ -559,27 +598,27 @@ We're going to explore and look around the following stuff:
- `wc`: count words inside file
- `diff`: compare files and show their differences
-&&/slide &&/font
+&&/slide
-&&font30 &&slide
+&&slide
### Working with devices
-&&lineb1
-
- `mount`: bind another file system to a location in the file system
- `umount`: remove binding to a file system
-&&/slide &&/font
+&&/slide
-&&font25 &&slide
+&&slide
## 3.3 Common configuration files
+&&lineb1
+
- `/etc/group`: the data for all groups is stored here, in the format
```
@@ -598,15 +637,21 @@ We're going to explore and look around the following stuff:
USERNAME:PASSWORD:LASTCHANGED:MINBETWEENCHANGES:MAXBETWEENCHANGES:WARNEXPIRE:INACTIVEDAYS:EXPIRE
```
+&&/slide
+
+
+
+&&clide
+
- `/etc/fstab`: mountings of devices to the file system, read on boot by mount
- `/etc/hosts`: list of host names (domain names) and their corresponding IP address, when a DNS server doesn't do the job
- `/etc/bashrc`: global defaults and aliases used by the bash shell
-&&/slide &&/font
+&&/clide
-&&font25 &&slide
+&&slide
## 3.4. System management
@@ -615,6 +660,12 @@ We're going to explore and look around the following stuff:
+ `hostname`: show (or set) the systems hostname (network name)
+ `free`: display free memory on the system
+&&/slide
+
+
+
+&&clide
+
- Users and groups
+ `useradd`: creates a new user (with a password)
+ `userdel`: remove a user and all of his files
@@ -630,11 +681,12 @@ We're going to explore and look around the following stuff:
+ `whomai`: print username
+ `login`: establish a new connection to the system
-&&/slide &&/font
+
+&&/clide
-&&font30 &&slide
+&&slide
# 4. Software licensing
@@ -650,50 +702,46 @@ Some commonly used ones, with a (NON-LEGALLY BINDING) summary include:
This is important, since pretty much everything can be freely modified by anyone (for the better or worse, but generally better).
-&&/slide &&/font
+&&/slide
-&&font35 &&slide
+&&slide
# 5. What makes up a useful OS
We talked about the modularity of a Linux-based operating system.
Overall, these are the main elements that make up a desktop operating system you might want to use:
-&&lineb1
+&&lineb3
1. **Bootloader**: load the kernel and operating system
2. **Init system**: well managed way to start everything inside the OS
3. **Package manager**: way to manage our binaries
4. **Desktop manager**: graphical shell
-&&/slide &&/font
+&&/slide
-&&font35 &&slide
+&&slide
## 5.1. Bootloader
-&&lineb2
-
When a computer boots, it needs to start an operating system, but you can't expect it to know how to boot any operating system.
Skipping over the details, the computer starts a small program called the bootloader, which handles loading the OS.
-On Linux, the most used one is called [GRUB](TODO).
+On Linux, the most used one is called [GRUB](https://en.wikipedia.org/wiki/GNU_GRUB).
With it you can also specify which kernel to load, with which parameters to load the kernel and which OS to start.
-&&/slide &&/font
+&&/slide
-&&font35 &&slide
+&&slide
## 5.2. Init system
-&&lineb1
-
In Minimal Linux Live, the whole system is started by some hard written scripts, this isn't very modular and extensible, that is why we need a special system.
Generally, the [init system](https://en.wikipedia.org/wiki/Init) loads a series of services, where each service is just a file that specifies what and how something needs to be ran.
@@ -703,16 +751,14 @@ The most common init systems are
- [systemd](https://en.wikipedia.org/wiki/Systemd), which also aims to also provide easy system configuration
- [openrc](https://en.wikipedia.org/wiki/OpenRC), a simple and modern system
-&&/slide &&/font
+&&/slide
-&&font35 &&slide
+&&slide
## 5.3. Package manager
-&&lineb1
-
Running a program is as simple as putting the executable in a nice folder, like `/usr/bin`.
However this process isn't very convenient if you're only using a shell and more tedious if using a graphical shell.
@@ -721,16 +767,14 @@ Other good features include installing dependencies and checking if a package is
There is another "type" of package managers, those similar to `portage`, where packages are actually instructions on how to download and compile a specific version of the program.
-&&/slide &&/font
+&&/slide
-&&font30 &&slide
+&&slide
## 5.4. Window systems
-&&lineb2
-
A widow system is your graphical shell: the graphical way to interact with your computer (the kernel).
It's main components are:
@@ -740,11 +784,11 @@ It's main components are:
- **Compositor**: windows have an unseen buffer, allowing them to be be processed beforehand. This allows for adding transparency, animation effects and more.
- **Session manager**: application that manages the window managers, allowing to use different managers or for multiple users to start their own graphical sessions.
-&&/slide &&/font
+&&/slide
-&&font27 &&slide
+&&slide &&font27
# 6. War on distros
@@ -763,42 +807,48 @@ Two more uncommon ones are:
1. AOSP: the base of the whole Android operating system
2. OpenWRT: a router operating system
-&&/slide &&/font
+&&/font &&/slide
-&&font30 &&slide
+&&slide &&font35
# 7. Demo - setup from zero
-&&lineb4
+&&lineb3
Now for the best part: we'll be installing a Linux distribution from a laptop running Windows 10!
-I've chosen to install [Linux Mint](TODO), since it is generally targeted towards newcomers and will feel familiar enough to Windows users.
+I've chosen to install [Linux Mint](https://linuxmint.com/), since it is generally targeted towards newcomers and will feel familiar enough to Windows users.
Currently there won't be an official recording of the process, you should've been here live!
-&&/slide &&/font
+&&/font &&/slide
-&&font35 &&clide &&centered
+&&clide &&font35 &&centered
# Thank you for your time
-&&/centered &&/clide &&/font
+&&/centered &&/font &&/clide
-&&slide
+&&slide &&font18
-## Sources
+# Sources
-- [wikipedia.org](https://en.wikipedia.org/) has been used extensively.
+All of these contain, at most, small paraphrased sentences in the slides.
+They mostly served as personal educational/reference tools.
+
+- [wikipedia](https://en.wikipedia.org/) and [stackexchange](https://stackexchange.com/) has been used extensively and linked where appropriate.
- [CS416 - Operating Systems Design](https://people.cs.rutgers.edu/~pxk/416/index.html) by [Paul Krzyzanowski](https://people.cs.rutgers.edu/~pxk/rutgers/) at [Rutgers State University](https://www.cs.rutgers.edu/)
-- [Origins and History of UNIX, 1969-1995](https://web.archive.org/web/20220713165958/https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch02s01.html) from [The Art of Unix Programming](TODO) by Eric Steven Raymond
+- [Origins and History of UNIX, 1969-1995](https://web.archive.org/web/20220713165958/https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch02s01.html) from [The Art of Unix Programming](https://web.archive.org/web/20220611160552/https://homepage.cs.uri.edu/~thenry/resources/unix_art/index.html) by Eric Steven Raymond
- [Ken Thompson interviewed by Brian Kernighan at VCF East 2019](https://www.youtube.com/watch?v=EY6q5dv_B-o) by [Vintage Computer Federation](https://vcfed.org/)
- [Hard links and Unix file system nodes](https://teaching.idallen.com/dat2330/04f/notes/links_and_inodes.html) from [DAT 2330 Introduction to Operating Systems](https://teaching.idallen.com/dat2330/04f/) by [Ian D. Allen](http://www.idallen.com/)
+- [/usr hierarchy](https://www.linuxbase.org/betaspecs/fhs/fhs/ch04.html) from [Filesystem Hierarchy Standard](https://www.linuxbase.org/betaspecs/fhs/fhs/index.html) by [Linux Foundation](https://www.linuxfoundation.org/), Daniel Quinlan, Paul 'Rusty' Russell, Christopher Yeoh
+- [User & Group Names](https://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/usernames.html#FTN.AEN26405) from [Linux Standard Base Core Specification](https://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/book1.html) by [Free Standards Group](https://en.wikipedia.org/wiki/Free_Standards_Group)
+- [Managing User Accounts](https://docstore.mik.ua/orelly/linux/run/ch05_07.htm) from [Running Linux, Third Edition](https://docstore.mik.ua/orelly/linux/run/index.htm) by Matt Welsh, Matthias Kalle Dalheimer, and Lar Kaufman
-&&/slide
+&&/font &&/slide
diff --git a/src/talks/linuxgraphy-by-strabo/mll-set.sh b/src/talks/linuxgraphy-by-strabo/mll-set.sh
new file mode 100644
index 0000000..4fbb4dd
--- /dev/null
+++ b/src/talks/linuxgraphy-by-strabo/mll-set.sh
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# ================================================================================
+# This is a setup script for all utilities I need for the talk (presentation)
+# https://syndamia.com/talks/linuxgraphy-by-strabo/
+#
+# Note that all of this can be done with a proper bundle and rebuild, but I'm lazy
+# ================================================================================
+
+#
+# prerequisites
+#
+mkdir /tmp/linuxography-setup/
+cd /tmp/linuxography-setup/
+
+#
+# package installation (all done in /usr/local)
+#
+mkdir /usr/local/
+export PATH=$PATH:/usr/local/sbin:/usr/local/bin
+
+# bash
+wget -q http://s.minos.io/archive/bifrost/x86_64/bash-4.4-1.tar.xz
+tar xf bash-4.4-1.tar.xz
+
+# coreutils
+wget -q http://s.minos.io/archive/bifrost/x86_64/coreutils-7.6-5.tar.xz
+tar xf coreutils-7.6-5.tar.xz
+
+# shadow
+wget -q http://s.minos.io/archive/bifrost/x86_64/shadow-4.1.4.2-1.tar.xz
+tar xf shadow-4.1.4.2-1.tar.xz
+
+mv ./bin/ /usr/local/bin/
+mv ./usr/sbin/ /usr/local/sbin/ # shadow
+mv ./usr/bin/* /usr/local/bin/ # shadow
+
+#
+# file setup
+#
+tee /etc/passwd << EOF >/dev/null
+root:x:0:0:root:/root:/bin/sh
+bin:x:1:1:bin:/bin:/bin/false
+daemon:x:2:2:daemon:/sbin:/bin/false
+adm:x:3:4:adm:/var/adm:/bin/false
+lp:x:4:7:lp:/var/spool/lpd:/bin/false
+sync:x:5:0:sync:/sbin:/bin/sync
+shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
+halt:x:7:0:halt:/sbin:/sbin/halt
+nobody:x:65534:65534::/dev/null:/bin/false
+EOF
+
+tee /etc/bashrc << EOF >/dev/null
+export PS1='[\u] j:\j e:\$? \w \\$ ' # Prompt to the left of cursor
+
+bind '"\e[A":history-search-backward' # UpArrow autocompletes partial history
+bind '"\e[B":history-search-forward' # DownArrow autocompletes partial history
+bind '"\e[1;5C":forward-word' # Ctrl+RightArrow jumps to next word
+bind '"\e[1;5D":backward-word' # Ctrl+LeftArrow jumps to predvious word
+bind '"\C-h":backward-kill-word' # Ctrl+BackSpace deletes an entire word
+
+clear
+cat /etc/motd
+EOF
+
+tee /etc/profile << EOF >/dev/null
+export PATH=$PATH
+source /etc/bashrc
+EOF
+
+#
+# finalize
+#
+echo "Done!"
+cd /
+bash -l