From 61668155f16ebfa3250cc90b708dc9eb34c1e0a9 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 19 Jan 2023 00:01:14 +0200 Subject: [talks/demo] Moved demo talk to it's own folder --- src/talks/demo.md | 129 ------------------------------------------------ src/talks/demo/index.md | 129 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 129 deletions(-) delete mode 100644 src/talks/demo.md create mode 100644 src/talks/demo/index.md (limited to 'src/talks') diff --git a/src/talks/demo.md b/src/talks/demo.md deleted file mode 100644 index 7640979..0000000 --- a/src/talks/demo.md +++ /dev/null @@ -1,129 +0,0 @@ -# Demo presentation - -[Slides Source](https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/src/talks/demo.md) || [PDF version](/files/slides/Demo%20presentation%20-%20Syndamia.pdf) - -**Created: 27 September 2022** || **Edited: 28 September 2022** - -This is a small presentation, explaining how my custom system for making presentations works. - -&&presentation - -&&slide &&flexer -&¢ered &&font35 - -# My presentation system - -&&/font - -
- -&&font20 - -Before we go any further, click the **icon, next to the printer** right above this rectangle. - -Now the presentation should fill out the entire page. On the bottom right are your controls. - -Press the *right arrow* to go to the next slide. - -&&/font -&&/centered -&&flexer - -&&font18 kamen AT [syndamia.com](https://syndamia.com) || 2022 &&/font - -&&/slide - - - -&&slide - -# Introduction - -I created a simple system for making presentations with slides in them. The gist of it is: different [Markdown](https://en.wikipedia.org/wiki/Markdown) paragraphs are put into a rectangle, each rectangle representing a slide, with some added options for layout and format. In a bit more detail, we'll have to get familiar with - -## ftags - -An ftag is a short string of characters, that starts with two ampersands (&&) and contains only letters, numbers, hyphen, underscore and forwardslash. The concept has probably been created before, but I came up with it on my own. The name comes from ["format tags"](https://gitlab.com/Syndamia/syndamiadotcom/-/tree/master/generate-hooks#ftags). - -The idea is that, whenever I want some sort of script to parse/format text, I use ftags as markers. Depending on the script, every ftag is replaced in the resultant webpage with other text or [HTML code](https://en.wikipedia.org/wiki/HTML). - -An easy example is the image of the Great Britain flag: at the end of this sentence, I have simply tiped out &&GB (in lowecase), and it gets replaced with the corresponding image - &&gb. - -## Why? - -Programs like Microsoft PowerPoint and LibreOffice Impress have very bad compatibility issues, between programs, versions, languages and even operating systems. As to why I don't just use a ready web presentation tool like [reveal.js](https://revealjs.com/), I find most of those too heavy and feature-bloated for my needs. - -&&/slide - - - -&&slide - -# Formatting - -Every (presentation-specific) formatting option is listed and explained in the [`create-presentation.awk`](https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/generate-hooks/create-presentation.awk) script, but to summarize: you can modify - -- font size -- text alignment -- row and column arrangement of paragraphs - -And they can work together in every possible combination. Here is an example which uses most of those in one place: - -&&flexer - -&&frow - -&&font18 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sed lectus porttitor nibh pellentesque ultrices ut in lorem. Pellentesque commodo dignissim placerat. &&/font - -&&fcol &&font27 - -These - -words - -&¢ered are in an &&/centered - -ftag column. - -&&/font &&/fcol -&&flexer - -&&fright -Vestibulum sodales pharetra justo, placerat egestas arcu hendrerit vitae. Integer eros est, lobortis sit amet mollis nec, mollis in ex. In hac habitasse platea dictumst. -&&/fright - -![](/tutorials/fix-no-frame-buffer-plan9/img/rio-default-login.png) - -&&/frow - -&&flexer - -&&/slide - - - -&&slide - -# Other features - -As you've obviously noticed, the presentation "system" also adds a navigation bar, with which to present and navigate slides. You can also print very easily the whole presentation on A4 sheets of paper, since that's the exact size of each slide. - -Given that the Markdown itself isn't touched, changing themes is no problem. Finally, because again, if you don't have JavaScript enabled, the presentation will be shown as any other ordinary article! - -## Closing remarks - -Although it doesn't have every feature known to man, this system is still very capable, and it's contained in just three files: [`create-presentation.awk`](https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/generate-hooks/create-presentation.awk), [`presentation.js`](https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/src/scripts/presentation.js) and [`presentation.css`](https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/src/presentation.css). - -&&flexer - -&¢ered -# Thats All. Thank you for your time! -&&/centered - -&&flexer - -&&fright &&font18 -*P.S. Press the same button (next to the print button) with which you started presenting, to stop presenting ;)* -&&font18 &&/fright - -&&/slide diff --git a/src/talks/demo/index.md b/src/talks/demo/index.md new file mode 100644 index 0000000..7640979 --- /dev/null +++ b/src/talks/demo/index.md @@ -0,0 +1,129 @@ +# Demo presentation + +[Slides Source](https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/src/talks/demo.md) || [PDF version](/files/slides/Demo%20presentation%20-%20Syndamia.pdf) + +**Created: 27 September 2022** || **Edited: 28 September 2022** + +This is a small presentation, explaining how my custom system for making presentations works. + +&&presentation + +&&slide &&flexer +&¢ered &&font35 + +# My presentation system + +&&/font + +
+ +&&font20 + +Before we go any further, click the **icon, next to the printer** right above this rectangle. + +Now the presentation should fill out the entire page. On the bottom right are your controls. + +Press the *right arrow* to go to the next slide. + +&&/font +&&/centered +&&flexer + +&&font18 kamen AT [syndamia.com](https://syndamia.com) || 2022 &&/font + +&&/slide + + + +&&slide + +# Introduction + +I created a simple system for making presentations with slides in them. The gist of it is: different [Markdown](https://en.wikipedia.org/wiki/Markdown) paragraphs are put into a rectangle, each rectangle representing a slide, with some added options for layout and format. In a bit more detail, we'll have to get familiar with + +## ftags + +An ftag is a short string of characters, that starts with two ampersands (&&) and contains only letters, numbers, hyphen, underscore and forwardslash. The concept has probably been created before, but I came up with it on my own. The name comes from ["format tags"](https://gitlab.com/Syndamia/syndamiadotcom/-/tree/master/generate-hooks#ftags). + +The idea is that, whenever I want some sort of script to parse/format text, I use ftags as markers. Depending on the script, every ftag is replaced in the resultant webpage with other text or [HTML code](https://en.wikipedia.org/wiki/HTML). + +An easy example is the image of the Great Britain flag: at the end of this sentence, I have simply tiped out &&GB (in lowecase), and it gets replaced with the corresponding image - &&gb. + +## Why? + +Programs like Microsoft PowerPoint and LibreOffice Impress have very bad compatibility issues, between programs, versions, languages and even operating systems. As to why I don't just use a ready web presentation tool like [reveal.js](https://revealjs.com/), I find most of those too heavy and feature-bloated for my needs. + +&&/slide + + + +&&slide + +# Formatting + +Every (presentation-specific) formatting option is listed and explained in the [`create-presentation.awk`](https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/generate-hooks/create-presentation.awk) script, but to summarize: you can modify + +- font size +- text alignment +- row and column arrangement of paragraphs + +And they can work together in every possible combination. Here is an example which uses most of those in one place: + +&&flexer + +&&frow + +&&font18 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sed lectus porttitor nibh pellentesque ultrices ut in lorem. Pellentesque commodo dignissim placerat. &&/font + +&&fcol &&font27 + +These + +words + +&¢ered are in an &&/centered + +ftag column. + +&&/font &&/fcol +&&flexer + +&&fright +Vestibulum sodales pharetra justo, placerat egestas arcu hendrerit vitae. Integer eros est, lobortis sit amet mollis nec, mollis in ex. In hac habitasse platea dictumst. +&&/fright + +![](/tutorials/fix-no-frame-buffer-plan9/img/rio-default-login.png) + +&&/frow + +&&flexer + +&&/slide + + + +&&slide + +# Other features + +As you've obviously noticed, the presentation "system" also adds a navigation bar, with which to present and navigate slides. You can also print very easily the whole presentation on A4 sheets of paper, since that's the exact size of each slide. + +Given that the Markdown itself isn't touched, changing themes is no problem. Finally, because again, if you don't have JavaScript enabled, the presentation will be shown as any other ordinary article! + +## Closing remarks + +Although it doesn't have every feature known to man, this system is still very capable, and it's contained in just three files: [`create-presentation.awk`](https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/generate-hooks/create-presentation.awk), [`presentation.js`](https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/src/scripts/presentation.js) and [`presentation.css`](https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/src/presentation.css). + +&&flexer + +&¢ered +# Thats All. Thank you for your time! +&&/centered + +&&flexer + +&&fright &&font18 +*P.S. Press the same button (next to the print button) with which you started presenting, to stop presenting ;)* +&&font18 &&/fright + +&&/slide -- cgit v1.3.1-26-gb76a From d8f10c1565707f1815b033a27a97e6753cfbde83 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 19 Jan 2023 00:01:38 +0200 Subject: [talks/lbs] Added first slide and contents --- src/talks/linuxgraphy-by-strabo/index.md | 81 ++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 src/talks/linuxgraphy-by-strabo/index.md (limited to 'src/talks') diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md new file mode 100644 index 0000000..f067d8f --- /dev/null +++ b/src/talks/linuxgraphy-by-strabo/index.md @@ -0,0 +1,81 @@ +# Linuxgraphy by Strabo + +&&presentation + +&&clide + +&&font35 +# Linuxgraphy by Strabo +&&/font +
+ +&&frcen + +2000 years ago [Strabo](https://en.wikipedia.org/wiki/Strabo) created [Geography](https://en.wikipedia.org/wiki/Geography), in which he laid out the world as it was known to the Romans and Greeks. +

+Today, I'll lay out Linux as it is known to me. +&&fright ![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Strabo.jpg/199px-Strabo.jpg) &&/fright + +&&/frcen + +&&/centered &&flexer + +&&fright *Made by [Syndamia](https://syndamia.com)* &&/fright + +&&/slide + + + +&&slide + +# Contents + +&&frow &&font20 + +0. Brief timeline +1. Structure of UNIX-likes + 1. Layers + 2. The shell + 2. Everything is a file + + 3. What is a VT100 anyway + 4. Possibilities (live CD, ...) +2. Linux systems and layout from the inside + 0. Shells + + 1. Directories + 2. Users and groups + 3. Everything is a file + 1. Devices + 2. Processes + 4. Commands you need to know + 1. File management and editing + 2. Regular expressions and text processing + 3. Everything else + 5. Networking +3. Software licensing + +&&/font &&font20 + +4. What makes up a useful OS + 0. File systems + 1. Bootloader + 1. Init system + 2. Package (software) manager + 3. Desktop manager +4. War on distros + 1. What is a distribution and how do we compare them + 2. Comparison + 1. Slackware + 2. Debian (and Ubuntu) + 3. Red Hat + 4. Enoch (and Gentoo) + 5. Arch Linux + 3. Non-desktop distros + 1. AOSP + 2. OpenWRT +5. Full setup and demonstration with Linux Mint + +&&/font &&/frow + +&&/slide -- cgit v1.3.1-26-gb76a From a6abd025c8cfc5ffb55c083130c33f527a857b38 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 20 Jan 2023 11:57:20 +0200 Subject: [talks/lbs] Finished brief timeline slides --- src/talks/linuxgraphy-by-strabo/index.md | 116 +++++++++++++++++++++++++++++-- 1 file changed, 109 insertions(+), 7 deletions(-) (limited to 'src/talks') diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md index f067d8f..8a24c01 100644 --- a/src/talks/linuxgraphy-by-strabo/index.md +++ b/src/talks/linuxgraphy-by-strabo/index.md @@ -32,15 +32,15 @@ Today, I'll lay out Linux as it is known to me. &&frow &&font20 -0. Brief timeline -1. Structure of UNIX-likes +1. Brief timeline +2. Structure of UNIX-likes 1. Layers 2. The shell 2. Everything is a file 3. What is a VT100 anyway 4. Possibilities (live CD, ...) -2. Linux systems and layout from the inside +3. Linux systems and layout from the inside 0. Shells 1. Directories @@ -53,17 +53,17 @@ Today, I'll lay out Linux as it is known to me. 2. Regular expressions and text processing 3. Everything else 5. Networking -3. Software licensing +4. Software licensing &&/font &&font20 -4. What makes up a useful OS +5. What makes up a useful OS 0. File systems 1. Bootloader 1. Init system 2. Package (software) manager 3. Desktop manager -4. War on distros +6. War on distros 1. What is a distribution and how do we compare them 2. Comparison 1. Slackware @@ -74,8 +74,110 @@ Today, I'll lay out Linux as it is known to me. 3. Non-desktop distros 1. AOSP 2. OpenWRT -5. Full setup and demonstration with Linux Mint +7. Full setup and demonstration with Linux Mint &&/font &&/frow &&/slide + + + +&&slide + +# 1. Brief timeline + +&&font27 + +#### 1945 - 1955 + + +Computers were these big computational devices, you directly loaded instructions into memory and let it execute your "code" (processor instructions). +Nothing else ran on the machine. + +This process was labur 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. + +#### 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. + +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). + +&&/font &&/slide + + + +&&slide &&flexer &&font27 + +#### 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. + +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: + +- User accounts with concurrent access +- Response time needed to be slower and ease of use had to be improved +- Storage organization, also following the rise of disks +- Data communication links (were often phone lines) + +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. + +&&/font &&flexer &&/slide + + + +&&font27 &&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 unparalled speed, simulators and emulators for backwards compatibility, all under one instruction set and operating system (mostly job management). + +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. +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)) +- [Single level store](https://en.wikipedia.org/wiki/Single-level_store) (aka [virtual memory](https://en.wikipedia.org/wiki/Virtual_memory)): Processes would write into contiguous memory, but in reality it is scattered and managed by the operating system. +- [Protection rings](https://en.wikipedia.org/wiki/Protection_ring): Allowing different levels of access to different resources (programs). In general, this also often requires a [CPU protected mode](https://en.wikipedia.org/wiki/Protected_mode). +- [Hierarchial 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 + + + +&&font27 &&slide + +#### 1969: Death of Multics and birth of UNIX + +Multics was very ambitous 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. + +&&flexer +&&frow + +&&font18 +![](https://upload.wikimedia.org/wikipedia/commons/f/f8/Ken-Thompson-2019.png =250x) +*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* +&&/font + +&&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. + +This marked the birth of UNIX, an operating system, based and expanded on many of Multic's ideas (except the "grow too large" one). +&&/cont + +&&/frow +&&flexer +&&/slide &&/font -- cgit v1.3.1-26-gb76a From 01dec6fd77ccf732ea9cf6f7468699347d285ada Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 21 Jan 2023 23:06:34 +0200 Subject: [talks/lbs] Finished writing second "chapter" --- .../linuxgraphy-by-strabo/img/unix-dir-tree.png | Bin 0 -> 4457 bytes .../linuxgraphy-by-strabo/img/unix-layers.png | Bin 0 -> 8473 bytes src/talks/linuxgraphy-by-strabo/index.md | 207 ++++++++++++++++++++- 3 files changed, 202 insertions(+), 5 deletions(-) create mode 100644 src/talks/linuxgraphy-by-strabo/img/unix-dir-tree.png create mode 100644 src/talks/linuxgraphy-by-strabo/img/unix-layers.png (limited to 'src/talks') diff --git a/src/talks/linuxgraphy-by-strabo/img/unix-dir-tree.png b/src/talks/linuxgraphy-by-strabo/img/unix-dir-tree.png new file mode 100644 index 0000000..ad1bebb Binary files /dev/null and b/src/talks/linuxgraphy-by-strabo/img/unix-dir-tree.png differ diff --git a/src/talks/linuxgraphy-by-strabo/img/unix-layers.png b/src/talks/linuxgraphy-by-strabo/img/unix-layers.png new file mode 100644 index 0000000..77ea8f9 Binary files /dev/null and b/src/talks/linuxgraphy-by-strabo/img/unix-layers.png differ diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md index 8a24c01..edb7797 100644 --- a/src/talks/linuxgraphy-by-strabo/index.md +++ b/src/talks/linuxgraphy-by-strabo/index.md @@ -2,6 +2,8 @@ &&presentation + + &&clide &&font35 @@ -9,14 +11,15 @@ &&/font
-&&frcen +&¢ered &&frow &&flexer -2000 years ago [Strabo](https://en.wikipedia.org/wiki/Strabo) created [Geography](https://en.wikipedia.org/wiki/Geography), in which he laid out the world as it was known to the Romans and Greeks. +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.

Today, I'll lay out Linux as it is known to me. -&&fright ![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Strabo.jpg/199px-Strabo.jpg) &&/fright -&&/frcen +![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Strabo.jpg/199px-Strabo.jpg) + +&&flexer &&/frow &&/centered &&/centered &&flexer @@ -170,14 +173,208 @@ Programming was done mostly in [Bell Labs](TODO), who pulled pretty quickly from *Ken Thompson and Dennis Ritchie in 1973* &&/font -&&cont +&&fccen &&expand + [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. This marked the birth of UNIX, an operating system, based and expanded on many of Multic's ideas (except the "grow too large" one). + +&&/expand &&/fccen + +&&/frow +&&flexer +&&/slide &&/font + + + +&&font30 &&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: + +&&flexer + +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 seperate 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. +3. **kernel**: Program that manages all communication and operations between the hardware and software + +&&flexer + +&&font20 *For now we'll generally just look over some of the common stuff and go into detail later, while in Linux.* &&/font + +&&/slide &&/font + + + +&&font35 &&slide + +## 2.1. shell + +&&flexer &&frow + +&&cont +Our 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. + +shells provide user interfaces, [both](http://en.wikipedia.org/wiki/Shell_%28computing%29) command-line and graphical. +While on the topic of UNIX, we'll only discuss the former. &&/cont +![](./img/unix-layers.png) + +&&/frow &&flexer &&/slide &&/font + + + +&&font27 &&slide + +Command-line shells operate solely with text, preferrably without too fancy formatting (there are very modern ones that can handle images, but these are an exception, rather than the norm). + +&&flexer +&&frow + +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 priner, connected to a computer. + +&&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) +*Teletype Model 33 by [Arnold Reinhold](https://commons.wikimedia.org/wiki/User:ArnoldReinhold)* +&&/fright &&/font &&/frow + &&flexer + +&&frow + +&&font18 +![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/DEC_VT100_terminal.jpg/675px-DEC_VT100_terminal.jpg?20131106192408 =320x) +*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 neven 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. + +&&/frow &&/slide &&/font + + + +&&font27 &&slide + +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". + +&&flexer + +Command-line UNIX shells always have the following features: + +- pipelines: being able to redirect the output from one command to another without limit + + ``` + command1 [args...] | command 2 [args...] | ... + ``` + +- I/O redirection: redirection of input and output, allowing use to use a file as (user) input: + + ``` + 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 + + + +&&font30 &&slide + +## 2.2. UNIX-style file system + +&&flexer + +- Rooted singular tree of directories. Disk partitions, removeable 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! +- 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 "..". + +&&flexer + +&&fcol ![](./img/unix-dir-tree.png) &&/fcol + +&&/slide &&/font + + + +&&font30 &&slide + +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): + + **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. + + **FIFO special**: aka [named pipe](https://en.wikipedia.org/wiki/Named_pipe), a special type of regular file, where at any moment only one process can read from it and one can write to it. It takes the concept of shell pipes to inter-process communication. + + **block special**: a device which is randomlly accessible, like a hard drive or cdrom drive. + + **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 + + + +&&font30 &&slide + +- [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 collectino 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. +
+ 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. +- 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 + + + +&&font35 &&slide + +## 2.3. Kernel + +&&flexer + +The kernel is completely separated from everything else, it only communicates with hardware and exposes an API to have other programmes communicate with it. + +&&flexer + +Linux is **not** an operating system, it is a kernel!!! + +&&flexer + +&&/slide &&/font + + + +&&slide + +## Sources + +- [wikipedia.org](https://en.wikipedia.org/) has been used extensively. +- [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 +- [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/) + +&&/slide -- cgit v1.3.1-26-gb76a From b4efedd7c68983d5778148e9761f7a10fd6efbca Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 22 Jan 2023 11:10:36 +0200 Subject: [talks/lbs] Reworked formatting, following changes to presentation system --- src/talks/linuxgraphy-by-strabo/index.md | 71 ++++++++++++++------------------ 1 file changed, 31 insertions(+), 40 deletions(-) (limited to 'src/talks') diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md index edb7797..c77d6a6 100644 --- a/src/talks/linuxgraphy-by-strabo/index.md +++ b/src/talks/linuxgraphy-by-strabo/index.md @@ -4,14 +4,16 @@ -&&clide +&¢ered &&clide &&font35 # Linuxgraphy by Strabo &&/font -
+*Made by [Syndamia](https://syndamia.com)* -&¢ered &&frow &&flexer +&&lineb4 &&ftable + +&&lineb1 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.

@@ -19,13 +21,12 @@ Today, I'll lay out Linux as it is known to me. ![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Strabo.jpg/199px-Strabo.jpg) -&&flexer &&/frow &&/centered +&&lineb1 -&&/centered &&flexer +&&/table -&&fright *Made by [Syndamia](https://syndamia.com)* &&/fright -&&/slide +&&/clide &&/centered @@ -33,7 +34,7 @@ Today, I'll lay out Linux as it is known to me. # Contents -&&frow &&font20 +&&ftable &&font20 1. Brief timeline 2. Structure of UNIX-likes @@ -79,7 +80,7 @@ Today, I'll lay out Linux as it is known to me. 2. OpenWRT 7. Full setup and demonstration with Linux Mint -&&/font &&/frow +&&/font &&/table &&/slide @@ -113,13 +114,15 @@ This process is called [batch processing](https://en.wikipedia.org/wiki/Batch_pr -&&slide &&flexer &&font27 +&&font27 &&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. +&&lineb2 + 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: @@ -128,9 +131,11 @@ Such systems increased the requirements of a computer system: - Storage organization, also following the rise of disks - Data communication links (were often phone lines) +&&lineb2 + 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. -&&/font &&flexer &&/slide +&&/slide &&/font @@ -163,8 +168,7 @@ Some of it's novel ideas include, but are not limited to: Multics was very ambitous 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. -&&flexer -&&frow +&&lineb1 &&ftable &&font18 ![](https://upload.wikimedia.org/wikipedia/commons/f/f8/Ken-Thompson-2019.png =250x) @@ -173,7 +177,7 @@ Programming was done mostly in [Bell Labs](TODO), who pulled pretty quickly from *Ken Thompson and Dennis Ritchie in 1973* &&/font -&&fccen &&expand +&&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. @@ -181,10 +185,9 @@ To test it, he wrote some programs over time and eventually realised an operatin This marked the birth of UNIX, an operating system, based and expanded on many of Multic's ideas (except the "grow too large" one). -&&/expand &&/fccen +&&/cont -&&/frow -&&flexer +&&/table &&/slide &&/font @@ -195,13 +198,13 @@ This marked the birth of UNIX, an operating system, based and expanded on many o 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: -&&flexer +&&lineb1 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 seperate 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. 3. **kernel**: Program that manages all communication and operations between the hardware and software -&&flexer +&&lineb3 &&font20 *For now we'll generally just look over some of the common stuff and go into detail later, while in Linux.* &&/font @@ -213,7 +216,7 @@ Ignoring [standards](https://unix.stackexchange.com/questions/14368/difference-b ## 2.1. shell -&&flexer &&frow +&&lineb2 &&ftable &&cont Our operating system is divided into layers, [like an onion](https://youtu.be/-FtCTW2rVFM?t=57). @@ -224,9 +227,9 @@ shells provide user interfaces, [both](http://en.wikipedia.org/wiki/Shell_%28com While on the topic of UNIX, we'll only discuss the former. &&/cont -![](./img/unix-layers.png) +&¢ered ![](./img/unix-layers.png) &&/centered -&&/frow &&flexer &&/slide &&/font +&&/table &&/slide &&/font @@ -234,8 +237,7 @@ While on the topic of UNIX, we'll only discuss the former. Command-line shells operate solely with text, preferrably without too fancy formatting (there are very modern ones that can handle images, but these are an exception, rather than the norm). -&&flexer -&&frow +&&lineb1 &&ftable 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 priner, connected to a computer. @@ -243,11 +245,8 @@ Historically, video displays (at first [CRT](TODO) ones) became widely available ![](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/ASR-33_at_CHM.agr.jpg/1280px-ASR-33_at_CHM.agr.jpg =320x) *Teletype Model 33 by [Arnold Reinhold](https://commons.wikimedia.org/wiki/User:ArnoldReinhold)* &&/fright &&/font -&&/frow - -&&flexer -&&frow +&&tarow &&font18 ![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/DEC_VT100_terminal.jpg/675px-DEC_VT100_terminal.jpg?20131106192408 =320x) @@ -257,7 +256,7 @@ Historically, video displays (at first [CRT](TODO) ones) became widely available 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 neven 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. -&&/frow &&/slide &&/font +&&/table &&/slide &&/font @@ -266,8 +265,6 @@ Later, those were replaced by terminals, a "normal" keyboard and a display, conn 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". -&&flexer - Command-line UNIX shells always have the following features: - pipelines: being able to redirect the output from one command to another without limit @@ -300,15 +297,11 @@ Command-line UNIX shells always have the following features: ## 2.2. UNIX-style file system -&&flexer - - Rooted singular tree of directories. Disk partitions, removeable 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! - 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 "..". -&&flexer - -&&fcol ![](./img/unix-dir-tree.png) &&/fcol +![](./img/unix-dir-tree.png) &&/slide &&/font @@ -353,16 +346,14 @@ The main attributes that every inode has are as follows: ## 2.3. Kernel -&&flexer +&&lineb2 The kernel is completely separated from everything else, it only communicates with hardware and exposes an API to have other programmes communicate with it. -&&flexer +&&lineb2 Linux is **not** an operating system, it is a kernel!!! -&&flexer - &&/slide &&/font -- cgit v1.3.1-26-gb76a From 5a114a8ceca44015738eade6b87448be015d7005 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 22 Jan 2023 11:23:26 +0200 Subject: [talks/lbs] Updated slide text to not be so close to edge and doubled resolution of file tree graphic --- src/talks/linuxgraphy-by-strabo/img/unix-dir-tree.png | Bin 4457 -> 7674 bytes src/talks/linuxgraphy-by-strabo/index.md | 3 +-- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/talks') diff --git a/src/talks/linuxgraphy-by-strabo/img/unix-dir-tree.png b/src/talks/linuxgraphy-by-strabo/img/unix-dir-tree.png index ad1bebb..38e5a9d 100644 Binary files a/src/talks/linuxgraphy-by-strabo/img/unix-dir-tree.png and b/src/talks/linuxgraphy-by-strabo/img/unix-dir-tree.png differ diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md index c77d6a6..f4137be 100644 --- a/src/talks/linuxgraphy-by-strabo/index.md +++ b/src/talks/linuxgraphy-by-strabo/index.md @@ -94,8 +94,7 @@ Today, I'll lay out Linux as it is known to me. #### 1945 - 1955 - -Computers were these big computational devices, you directly loaded instructions into memory and let it execute your "code" (processor instructions). +You directly loaded instructions into memory and let it execute your "code" (processor instructions). Nothing else ran on the machine. This process was labur 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. -- cgit v1.3.1-26-gb76a From 7cad15059689dd6167f23f06646e9203fe189121 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 22 Jan 2023 16:52:32 +0200 Subject: [talks/lbs] Finished chapters 3 and 4 --- src/img/bg.svg | 7 + src/talks/linuxgraphy-by-strabo/index.md | 364 ++++++++++++++++++++++++++++--- 2 files changed, 338 insertions(+), 33 deletions(-) create mode 100644 src/img/bg.svg (limited to 'src/talks') diff --git a/src/img/bg.svg b/src/img/bg.svg new file mode 100644 index 0000000..b100dd0 --- /dev/null +++ b/src/img/bg.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md index f4137be..1a19ec6 100644 --- a/src/talks/linuxgraphy-by-strabo/index.md +++ b/src/talks/linuxgraphy-by-strabo/index.md @@ -30,36 +30,26 @@ Today, I'll lay out Linux as it is known to me. -&&slide +&&font35 &&slide # Contents -&&ftable &&font20 +&&ftable &&cont 1. Brief timeline 2. Structure of UNIX-likes - 1. Layers - 2. The shell - 2. Everything is a file - - 3. What is a VT100 anyway - 4. Possibilities (live CD, ...) -3. Linux systems and layout from the inside - 0. Shells - - 1. Directories - 2. Users and groups - 3. Everything is a file - 1. Devices - 2. Processes - 4. Commands you need to know - 1. File management and editing - 2. Regular expressions and text processing - 3. Everything else - 5. Networking + 1. Shell + 2. UNIX-style file system + 2. Kernel +&&lineb2 +3. Linux from the inside + 1. Shells + 2. Files and directories + 3. Common configuration files + 4. System management 4. Software licensing -&&/font &&font20 +&&/cont &&cont 5. What makes up a useful OS 0. File systems @@ -68,21 +58,17 @@ Today, I'll lay out Linux as it is known to me. 2. Package (software) manager 3. Desktop manager 6. War on distros - 1. What is a distribution and how do we compare them + 1. What is a distribution 2. Comparison - 1. Slackware - 2. Debian (and Ubuntu) - 3. Red Hat - 4. Enoch (and Gentoo) - 5. Arch Linux + 3. Non-desktop distros - 1. AOSP - 2. OpenWRT -7. Full setup and demonstration with Linux Mint + +&&lineb2 +7. Demo - setup from zero -&&/font &&/table +&&/cont &&/table -&&/slide +&&/slide &&/font @@ -357,6 +343,318 @@ Linux is **not** an operating system, it is a kernel!!! +&&font27 &&slide + +# 3. Linux from the inside + +Enough theory, time to have some fun and learn Linux! + +We'll be using [Linux Minimal Live](https://ivandavidov.github.io/minimal/#home) 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 +- 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 +- **System management**: Other commands with which to modify your system + +&&/slide &&/font + + + +&&slide + +## 3.1. Shells + +- [Job control](https://en.wikipedia.org/wiki/Job_control_%28Unix%29): Management of currently running groups of processes + + `&`: A process can be ran in the background with an ampersand (&) at the end of the command: + + ``` + command [args...] & + ``` + + + `Ctrl+z`: suspend (stop but leave in the background) the currently running (foreground) job + + `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 + + 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: + + ``` + fg %4 + ``` + + For managing everything, usually there is a job table. + Upon shell termination, the shell tells all jobs in that table to terminate and waits for them. + `disown`: remove a job from the job table + + `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 + + + +&&font27 &&slide + +- [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 + + on every new line write out your text, all characters will be preserved + + to end it, write out `NAME` on the beginning of a new empty line. Example: + + ``` + cat << MYFILE + This is + some + text + MYFILE + ``` + +- control operators: Control what command is executed, depending on [exit status](https://en.wikipedia.org/wiki/Exit_status) + + `expr1 && expr2`: Run expr2, only if expr1 exited successfully + + `expr1 || expr2`: Run expr2 if expr1 exited unsuccessfully + + `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 + + + +&&font27 &&slide + +&&lineb1 + +- [redirection](https://en.wikipedia.org/wiki/Redirection_%28computing%29): Outside of having `<` and `>` for I/O redirection, ofter there is also + + `>>`: Acts like `>`, putting text into a file, but rather than overwriting everything, it appends it + + `<<`: As explained, for heredocs + + `<<<`: To the right is a string ([herestring](https://en.wikipedia.org/wiki/Here_document#Here_strings)), and it is interpreted as a file + + ``` + cat <<< "Hello World!" + ``` + + + Standard input, standard output and standard error are all files with which the shell works. + Typing text in the shell puts it into stdin, command output are put into stdout (and shown to the user) and errors are put into stderr (also shown to the user). + Each one of them is numbered from 0 to 2, and you can specify redirection by appending or pepending it to the redirection symbol. + * `N>outputfile`: redirects the output from standard stream N into outputfile + * `N>&M`: redirects the output from standard stream N into standard stream M + * `N INT2 + * `INT1 -gt INT2`: INT1 >= INT2 + + Operators: `!` - negation, `-a` - binary AND, `-o` - binary OR, parentheses for grouping (escaped with `\`) + + +&&/slide &&/font + + + +&&slide + +- [scripting support](https://en.wikipedia.org/wiki/Shell_script): Rather than running a series of commands manually, you can put them all in a file and run that + + `#`: Everything between a # and the end of the line denotes a comment + + `#!`: 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 + +&&/slide + + + +&&font30 &&slide + +## 3.2. Files and directories + +&&lineb1 + +- `/bin`: main command programs (binaries), used by users +- `/etc`: system configuration files +- `/sbin`: command programs, used for the system operation +- `/usr`: other system resources + + `/usr/bin`: all other user command binaries + + `/usr/lib`: library files + + `/usr/local`: local, system software + + `/usr/share`: architecture independent data, like manuals +- `/var`: variable data, like logs and cache +- `/dev`: devices +- `/home`: home directories of all users +- `/lib`: libraries and kernel modules +- `/mnt`: mounted temporary filesystems +- `/proc`: process information +- `/root`: home directory for the root user + +&&/slide &&/font + + + +&&font30 &&slide + +### General file system commands + +&&lineb1 + +- `mkdir`: create directories +- `rm`: remove a (hardlink to) file or directory +- `shred`: overwrite file contents +- `mv`: move file (or directory) to another directory +- `cp`: copy a file +- `ln`: create hard (or soft, with `-s`) links to files (inodes) +- `ls`: list directory contents +- `dd`: do many things with files, like modifying and duplicating data across devices and partitions, (basic) data recovery and generating files +- `du`: estimate file usage +- `stat`: display status for file system or file system +- `chwon`: change owner of an inode +- `chgrp`: change group of an inode +- `chmod`: change file modes +- `find`: search for a file inside a directory (recursively) + +&&/slide &&/font + + + +&&font30 &&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 +- `grep`: searches for matches in a file, using simplified regular expressions. Often there is `egrep`, which allows for extended regex and `fgrep` where strings are matched as-is. +- `sed`: filter and transform text from files, according to regex +- `tr`: translate, map (more than one to one for example) and delete characters +- `cut`: remove parts of text from each line +- `head`: print the first lines (or characters) of a file +- `tail`: print the last lines (or cahracters) of a file +- `strings`: find embeded text inside binary files +- `truncate`: shrink or extend the size of a file +- `wc`: count words inside file +- `diff`: compare files and show their differences + +&&/slide &&/font + + + +&&font30 &&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 + + + +&&font25 &&slide + +## 3.3 Common configuration files + +- `/etc/group`: the data for all groups is stored here, in the format + + ``` + GROUPNAME:PASSWORD:GID:USERS... + ``` + +- `/etc/passwd`: the data for all users is stored here, in the format + + ``` + USERNAME:PASSWORD:UID:GID:USERINFO:HOMEDIR:SHELL + ``` + +- `/etc/shadow`: stores other user data, especially the password as an encrypted string, in the format + + ``` + USERNAME:PASSWORD:LASTCHANGED:MINBETWEENCHANGES:MAXBETWEENCHANGES:WARNEXPIRE:INACTIVEDAYS:EXPIRE + ``` + +- `/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 + + + +&&font25 &&slide + +## 3.4. System management + +- System information + + `date`: display current date and time + + `hostname`: show (or set) the systems hostname (network name) + + `free`: display free memory on the system + +- Users and groups + + `useradd`: creates a new user (with a password) + + `userdel`: remove a user and all of his files + + `usermod`: modify a user account, including his name and groups + + `passwd`: change password of a user. With `-l` user could be locked (impossible to log in) + &&lineb1 + + `groupadd`: create a new group + + `groupdel`: remove a group + + `groupmod`: modify an existing group + &&lineb1 + + `w`: show who is logged in and what they are doing + + `who`: show who is logged in + + `whomai`: print username + + `login`: establish a new connection to the system + +&&/slide &&/font + + + +&&font30 &&slide + +# 4. Software licensing + +It is important to note that most software in Linux, including the kernel itself, is under a variety of open licenses. +An open license is a license which allows others to reuse the original work, under some restrictions. + +For software, such a license is applied to the source code from which the original application was made. +Some commonly used ones, with a (NON-LEGALLY BINDING) summary include: + +- MIT: the author is not responsible for anything that the code does +- BSD-3-Clause: use the same license (copyleft), the author is not responsible for anything that the code does +- GNU GPL: disclose the original project and use the same license (copyleft) + +This is important, since pretty much everything can be freely modified by anyone (for the better or worse, but generally better). + +&&/slide &&/font + + + &&slide ## Sources -- cgit v1.3.1-26-gb76a From 68c1774aebbd894d1c7cdb9b8a6a4963c5a5b096 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 22 Jan 2023 17:03:10 +0200 Subject: [talks/lbs] Started work on 5th and finished 7th chapters --- src/talks/linuxgraphy-by-strabo/index.md | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'src/talks') diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md index 1a19ec6..945c408 100644 --- a/src/talks/linuxgraphy-by-strabo/index.md +++ b/src/talks/linuxgraphy-by-strabo/index.md @@ -655,6 +655,46 @@ This is important, since pretty much everything can be freely modified by anyone +&&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: + +1. **Bootloader**: load the kernel and operating system +2. **Init system**: a well managed way to start everything inside the OS +3. **Package manager**: way to manage our binaries +4. **Desktop manager**: graphical shell + +&&/slide + + + +&&font30 &&slide + +# 7. Demo - setup from zero + +&&lineb4 + +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. + +Currently there won't be an official recording of the process, you should've been here live! + +&&/slide &&/font + + + +&&font35 &&clide &¢ered + +# Thank you for your time + +&&/centered &&/clide &&/font + + + &&slide ## Sources -- cgit v1.3.1-26-gb76a From c9a1483157317af618f655af97b73686e5459ca5 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 22 Jan 2023 17:49:50 +0200 Subject: [talks/lbs] Finished 5th and 6th chapters --- src/talks/linuxgraphy-by-strabo/index.md | 113 ++++++++++++++++++++++++++++--- 1 file changed, 102 insertions(+), 11 deletions(-) (limited to 'src/talks') diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md index 945c408..e198e26 100644 --- a/src/talks/linuxgraphy-by-strabo/index.md +++ b/src/talks/linuxgraphy-by-strabo/index.md @@ -52,18 +52,12 @@ Today, I'll lay out Linux as it is known to me. &&/cont &&cont 5. What makes up a useful OS - 0. File systems 1. Bootloader 1. Init system - 2. Package (software) manager + 2. Package manager 3. Desktop manager 6. War on distros - 1. What is a distribution - 2. Comparison - - 3. Non-desktop distros - -&&lineb2 +&&lineb5 7. Demo - setup from zero &&/cont &&/table @@ -655,19 +649,116 @@ This is important, since pretty much everything can be freely modified by anyone -&&slide +&&font35 &&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 + 1. **Bootloader**: load the kernel and operating system -2. **Init system**: a well managed way to start everything inside the OS +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 +&&/slide &&/font + + + +&&font35 &&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). +With it you can also specify which kernel to load, with which parameters to load the kernel and which OS to start. + +&&/slide &&/font + + + +&&font35 &&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. + +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 + + + +&&font35 &&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 convinent if you're only using a shell and more tedius if using a graphical shell. + +The solution is to have all programs in one location, where you can download, install and potentially update a program with one simple command, just using the program's name. +Other good features include installing dependencies and checking if a package is tampered with. + +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 + + + +&&font30 &&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: + +- **Window manager**: the overall system with which you create, remove, resize, etc. windows. They are generally separated into two types: + + Stacked: this is what you know, a windows are just rectangles floating about, and can be put one over each other + + Tiled: windows take up a predefined (but changeable) portion of the screen +- **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 + + + +&&font27 &&slide + +# 6. War on distros + +A distribution is a complete set of of all applications that we've talked so far. + +Overall, there are five distributions from which 90% of all other distros are based upon: + +1. Slackware: as the oldest still maintained distro, it served as insparation for a lot of other distros. It aims to be as simple and as close to UNIX as possible. +2. Debian (and Ubuntu): it is the most popular distribution (if we also include Ubuntu, since they're so similar). Ubuntu aims to be modern and fancy, while debian aims to be as stable as possible, which makes it the most popular in server usage. +4. Gentoo: the distribution which defined non-binary software distribution +5. Arch Linux: a very popular and modern distribution with the goal of providing the latest and greatest software. + +We haven't touched too much, but Linux distributions aren't limited to desktop or server computers. +Two more uncommon ones are: + +1. AOSP: the base of the whole Android operating system +2. OpenWRT: a router operating system + +&&/slide &&/font -- cgit v1.3.1-26-gb76a From 6eb7a8fff01c6814253a0e738efb53734d297be9 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 22 Jan 2023 17:52:34 +0200 Subject: [talks/lbs] Fixed typos --- src/talks/linuxgraphy-by-strabo/index.md | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/talks') diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md index e198e26..4f68b16 100644 --- a/src/talks/linuxgraphy-by-strabo/index.md +++ b/src/talks/linuxgraphy-by-strabo/index.md @@ -77,7 +77,7 @@ Today, I'll lay out Linux as it is known to me. You directly loaded instructions into memory and let it execute your "code" (processor instructions). Nothing else ran on the machine. -This process was labur 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 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. #### 1956 - 1959 @@ -123,7 +123,7 @@ Another important factor is the rise of minicomputers: much smaller and incredib #### 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 unparalled speed, simulators and emulators for backwards compatibility, all under one instruction set and operating system (mostly job management). +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). 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). @@ -133,7 +133,7 @@ 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)) - [Single level store](https://en.wikipedia.org/wiki/Single-level_store) (aka [virtual memory](https://en.wikipedia.org/wiki/Virtual_memory)): Processes would write into contiguous memory, but in reality it is scattered and managed by the operating system. - [Protection rings](https://en.wikipedia.org/wiki/Protection_ring): Allowing different levels of access to different resources (programs). In general, this also often requires a [CPU protected mode](https://en.wikipedia.org/wiki/Protected_mode). -- [Hierarchial 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. +- [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 @@ -144,7 +144,7 @@ Some of it's novel ideas include, but are not limited to: #### 1969: Death of Multics and birth of UNIX -Multics was very ambitous and had a lot of great ideas and minds behind it, but it ultimately grew too large and failed. +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. &&lineb1 &&ftable @@ -180,7 +180,7 @@ Ignoring [standards](https://unix.stackexchange.com/questions/14368/difference-b &&lineb1 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 seperate 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 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. 3. **kernel**: Program that manages all communication and operations between the hardware and software &&lineb3 @@ -214,11 +214,11 @@ While on the topic of UNIX, we'll only discuss the former. &&font27 &&slide -Command-line shells operate solely with text, preferrably 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, preferably without too fancy formatting (there are very modern ones that can handle images, but these are an exception, rather than the norm). &&lineb1 &&ftable -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 priner, connected to a computer. +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. &&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) @@ -233,7 +233,7 @@ Historically, video displays (at first [CRT](TODO) ones) became widely available &&/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 neven 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. +**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 &&/font @@ -276,7 +276,7 @@ Command-line UNIX shells always have the following features: ## 2.2. UNIX-style file system -- Rooted singular tree of directories. Disk partitions, removeable media, etc. all live in that tree. +- 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! - 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 "..". @@ -296,7 +296,7 @@ The main attributes that every inode has are as follows: + **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. + **FIFO special**: aka [named pipe](https://en.wikipedia.org/wiki/Named_pipe), a special type of regular file, where at any moment only one process can read from it and one can write to it. It takes the concept of shell pipes to inter-process communication. - + **block special**: a device which is randomlly accessible, like a hard drive or cdrom drive. + + **block special**: a device which is randomly accessible, like a hard drive or cdrom drive. + **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 @@ -307,7 +307,7 @@ The main attributes that every inode has are as follows: &&font30 &&slide - [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 collectino 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. + 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.
@@ -424,7 +424,7 @@ We're going to explore and look around the following stuff: &&lineb1 -- [redirection](https://en.wikipedia.org/wiki/Redirection_%28computing%29): Outside of having `<` and `>` for I/O redirection, ofter there is also +- [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 + `<<`: As explained, for heredocs + `<<<`: To the right is a string ([herestring](https://en.wikipedia.org/wiki/Here_document#Here_strings)), and it is interpreted as a file @@ -435,7 +435,7 @@ We're going to explore and look around the following stuff: + Standard input, standard output and standard error are all files with which the shell works. Typing text in the shell puts it into stdin, command output are put into stdout (and shown to the user) and errors are put into stderr (also shown to the user). - Each one of them is numbered from 0 to 2, and you can specify redirection by appending or pepending it to the redirection symbol. + Each one of them is numbered from 0 to 2, and you can specify redirection by appending or prepending it to the redirection symbol. * `N>outputfile`: redirects the output from standard stream N into outputfile * `N>&M`: redirects the output from standard stream N into standard stream M * `N