diff --git a/console_toolkit/sourcefiles/README.md b/console_toolkit/sourcefiles/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0d4197a4ada990c3f35295999c155caef5d0b139 --- /dev/null +++ b/console_toolkit/sourcefiles/README.md @@ -0,0 +1,48 @@ +# The Console Toolkit + +This repository contains slides and exercise material for the Linux console course held in autumn semester 2018. + +# Course Description + +Now that you have your Linux system up and running, it's time to make the best +out of it. Learn how to utilize the console and work towards mastering it in +this two-part course. We will start with the basics, and present you some +useful terminal applications designed to simplify your workflow. Furthermore, +you may directly solidify the abilities you learn by solving short exercises. + +This way, you will feel comfortable with using the console in no time! + +# Course Contents + +The following is just a brainstormy list based on content of past courses that TheAlternative held. This course aims to cover most of this list. The list only serves as a guideline, the speaker can of course decide to go further in-depth (e.g. with more live demos) or leave out certain topics. + +- why console +- course goals +- opening console +- commands & arguments +- arguments with spaces +- options +- manual +- cmd history (arrows, search) +- globs, wildcards +- ctrl-c +- file system navigation +- cd +- pwd +- .. (the directory location) +- tab completion +- ls +- fs layout (man hier) +- text editing +- less +- cat +- cp +- mv rm +- mkdir, rmdir +- search path +- users: sudo, su +- software installation +- creating boot sticks (dd, sync) +- disk space +- scripting +- ssh diff --git a/console_toolkit/sourcefiles/exercises/GIT_TAG b/console_toolkit/sourcefiles/exercises/GIT_TAG new file mode 100644 index 0000000000000000000000000000000000000000..f6eba13c0c5b4b0af48ab0cd796d15904cde70b9 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/GIT_TAG @@ -0,0 +1 @@ +r51.ebef4b9 \ No newline at end of file diff --git a/console_toolkit/sourcefiles/exercises/Makefile b/console_toolkit/sourcefiles/exercises/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..e5ed4c88f0517ee4d5b7599791ff71f0dfa51bbe --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/Makefile @@ -0,0 +1,34 @@ +TEX=latexmk +TEXOPTS=-output-directory=build \ + -pdf \ + -latexoption=-interaction=nonstopmode \ + -latexoption=-file-line-error + +# Set PREVIEW=1 to enable preview. Make sure an appropriate viewer is +# configured in $HOME/.latexmkrc. +# Example usage: make PREVIEW=1 opendata +ifdef PREVIEW +PREVIEWOPTS=-pvc +endif + +defaul: exercises + +# To include the current git revision in the header, write it to 'GIT_TAG' +# file, which the LaTeX source can include. +gitrev: + @printf "r%s.%s" "$$(git rev-list --count HEAD)" "$$(git rev-parse --short HEAD)" > GIT_TAG + +# Create build directory if it doesnt exist +builddir: + @[ -d build ] || mkdir build + +# All documents need to be compiled twice. +# This is because some necessary information is only available after +# the first compiler run, like \pageref{LastPage}. +exercises: exercises.tex gitrev builddir + @$(TEX) $(TEXOPTS) $(PREVIEWOPTS) $< + mv build/exercises.pdf . + +clean: + @rm -rf build/* + diff --git a/console_toolkit/sourcefiles/exercises/TheAlternativeCourse.cls b/console_toolkit/sourcefiles/exercises/TheAlternativeCourse.cls new file mode 100644 index 0000000000000000000000000000000000000000..d9c64a177f045eb3a9ff0c7ffb6f1bc25f533166 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/TheAlternativeCourse.cls @@ -0,0 +1,87 @@ +% vim: set ft=tex: + +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{TheAlternativeCourse} + +% packages +\LoadClass[11pt]{scrartcl} % Base class: KOMA script article +\RequirePackage[utf8]{inputenc} % Support for german 'umlaut' (ä, ö, ü) +\RequirePackage{lastpage} % \pageref{LastPage} +\RequirePackage{scrlayer-scrpage} % KOMA Script header/footer package +\RequirePackage{graphicx} % \includegraphics{...} +\RequirePackage[showseconds=false,showzone=false]{datetime2} +\RequirePackage[table]{xcolor} +\RequirePackage[most]{tcolorbox} +\RequirePackage{hyperref} + +% helvetica font +% \RequirePackage[scaled]{helvet} +% \RequirePackage[T1]{fontenc} +% \renewcommand\familydefault{\sfdefault} + +% header / footer +\KOMAoptions{headsepline,headheight=27.5pt} +\setkomafont{pagehead}{\normalfont\normalcolor} % non-italic header font +\setkomafont{pagefoot}{\normalfont\normalcolor} % non-italic footer font +\newcommand{\builddate}{\footnotesize Revision: \input{GIT_TAG} \\ Build: \DTMNow} +\newcommand{\thealtlogo}{\includegraphics[width=4.5cm]{assets/logo.png}} +\lohead[\thealtlogo]{\thealtlogo} +\rohead[\builddate]{\builddate} +\cofoot[\footnotesize \thepage~/~\pageref{LastPage}]{\thepage~/~\pageref{LastPage}} +\recalctypearea% + +\setlength{\voffset}{-1.2cm} % space before header +\setlength{\textheight}{1.15\textheight} % height of text + +\definecolor{ldorange}{HTML}{F18A20} +\definecolor{ldblue}{HTML}{254471} +\definecolor{grey1}{HTML}{aaaaaa} +\definecolor{grey2}{HTML}{efefef} +\definecolor{lightblue}{HTML}{d9edfc} +\definecolor{exclamred}{HTML}{db1515} + +\colorlet{lightyellow}{yellow!6!white} +\colorlet{darkeryellow}{red!15!yellow!40!white} + +\newtcolorbox[auto counter, number within=section]{exercisebox}[2][]{% + colback=lightyellow, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + colframe=ldorange, + coltitle=black, + enhanced, + fonttitle=\bfseries, + title=Task~\thetcbcounter: #2,#1} + +\newtcolorbox{cmdbox}{% + colback=grey2, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + enhanced, + colframe=grey1, + coltitle=black, + enhanced} + +\newtcolorbox{tcbhintbox}{% + enhanced, + skin=bicolor, + segmentation at break=true, + boxrule=0.8pt, + left=3.5mm, + top=0.5mm, + bottom=0.5mm, + arc=1pt, + boxsep=2pt, + lefthand ratio=0.06, + sidebyside, + colframe=ldorange, + coltext=black, + colback=darkeryellow, + colbacklower=lightyellow, +} + +\newcommand{\hintbox}[1]{% +\begin{tcbhintbox} + \includegraphics[width=8mm]{img/light_bulb.pdf}% + \tcblower% + #1 +\end{tcbhintbox}} + diff --git a/console_toolkit/sourcefiles/exercises/assets/CC-BY-SA_icon.pdf b/console_toolkit/sourcefiles/exercises/assets/CC-BY-SA_icon.pdf new file mode 100644 index 0000000000000000000000000000000000000000..462e96a48a0f6e5a9a6b253fa6b604c6d55bbe83 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/assets/CC-BY-SA_icon.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4976899f485ff6cdc2e2af13cb696da987a00b6b449d1e117daebbbfd0f29c4c +size 4207 diff --git a/console_toolkit/sourcefiles/exercises/assets/CC-BY-SA_icon.svg b/console_toolkit/sourcefiles/exercises/assets/CC-BY-SA_icon.svg new file mode 100644 index 0000000000000000000000000000000000000000..1800d813870a4d6b64dcef02a4c47036fe986e97 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/assets/CC-BY-SA_icon.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:972fa4777f1bc400cf7bdf31db308deb20e3c9d8af5ed858e5dff263e722fec5 +size 7160 diff --git a/console_toolkit/sourcefiles/exercises/assets/TheAlt_original.svg b/console_toolkit/sourcefiles/exercises/assets/TheAlt_original.svg new file mode 100644 index 0000000000000000000000000000000000000000..048e8e1291c2126990b81fd171d7565a1b0a0692 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/assets/TheAlt_original.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50c6c4b4ca953ca45e1fc2fde6ab650c47474cdfde8969c35d9dae616d2aac04 +size 19354 diff --git a/console_toolkit/sourcefiles/exercises/assets/logo.png b/console_toolkit/sourcefiles/exercises/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..89504d2174859d559409a726907a7c606af3d208 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/assets/logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f74f6cebac1c9b5e15137a839f760ae5b75ea85e0ff21bfe8d2acdd3b5dfbba6 +size 55637 diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/dmesg_log b/console_toolkit/sourcefiles/exercises/exercise_files/dmesg_log new file mode 100644 index 0000000000000000000000000000000000000000..148975d59859bfea92fa57fa0812780913841096 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/dmesg_log @@ -0,0 +1,868 @@ +[ 0.000000] Linux version 4.18.12-arch1-1-ARCH (builduser@heftig-1544) (gcc version 8.2.1 20180831 (GCC)) #1 SMP PREEMPT Thu Oct 4 01:01:27 UTC 2018 +[ 0.000000] Command line: initrd=/intel-ucode.img initrd=/initramfs-linux.img cryptdevice=/dev/nvme0n1p2:crypt_root root=/dev/mapper/crypt_root rw quiet +[ 0.000000] KERNEL supported cpus: +[ 0.000000] Intel GenuineIntel +[ 0.000000] AMD AuthenticAMD +[ 0.000000] Centaur CentaurHauls +[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' +[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' +[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers' +[ 0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers' +[ 0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR' +[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 +[ 0.000000] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64 +[ 0.000000] x86/fpu: xstate_offset[4]: 896, xstate_sizes[4]: 64 +[ 0.000000] x86/fpu: Enabled xstate features 0x1f, context size is 960 bytes, using 'compacted' format. +[ 0.000000] BIOS-provided physical RAM map: +[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x0000000000057fff] usable +[ 0.000000] BIOS-e820: [mem 0x0000000000058000-0x0000000000058fff] reserved +[ 0.000000] BIOS-e820: [mem 0x0000000000059000-0x000000000009cfff] usable +[ 0.000000] BIOS-e820: [mem 0x000000000009d000-0x00000000000fffff] reserved +[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000b513ffff] usable +[ 0.000000] BIOS-e820: [mem 0x00000000b5140000-0x00000000b5140fff] ACPI NVS +[ 0.000000] BIOS-e820: [mem 0x00000000b5141000-0x00000000b5141fff] reserved +[ 0.000000] BIOS-e820: [mem 0x00000000b5142000-0x00000000bea7dfff] usable +[ 0.000000] BIOS-e820: [mem 0x00000000bea7e000-0x00000000bff2cfff] reserved +[ 0.000000] BIOS-e820: [mem 0x00000000bff2d000-0x00000000bff99fff] ACPI NVS +[ 0.000000] BIOS-e820: [mem 0x00000000bff9a000-0x00000000bfffefff] ACPI data +[ 0.000000] BIOS-e820: [mem 0x00000000bffff000-0x00000000bfffffff] usable +[ 0.000000] BIOS-e820: [mem 0x00000000c0000000-0x00000000c7ffffff] reserved +[ 0.000000] BIOS-e820: [mem 0x00000000c8600000-0x00000000cc7fffff] reserved +[ 0.000000] BIOS-e820: [mem 0x00000000f0000000-0x00000000f3ffffff] reserved +[ 0.000000] BIOS-e820: [mem 0x00000000fe010000-0x00000000fe010fff] reserved +[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x00000004327fffff] usable +[ 0.000000] NX (Execute Disable) protection: active +[ 0.000000] efi: EFI v2.50 by Lenovo +[ 0.000000] efi: SMBIOS=0xbf17f000 SMBIOS 3.0=0xbf17c000 ACPI=0xbfffe000 ACPI 2.0=0xbfffe014 MEMATTR=0xb994b018 TPMEventLog=0xb5279018 +[ 0.000000] SMBIOS 3.0.0 present. +[ 0.000000] DMI: LENOVO 20HMS03X00/20HMS03X00, BIOS R0IET53W (1.31 ) 05/22/2018 +[ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved +[ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable +[ 0.000000] last_pfn = 0x432800 max_arch_pfn = 0x400000000 +[ 0.000000] MTRR default type: write-back +[ 0.000000] MTRR fixed ranges enabled: +[ 0.000000] 00000-9FFFF write-back +[ 0.000000] A0000-BFFFF uncachable +[ 0.000000] C0000-FFFFF write-protect +[ 0.000000] MTRR variable ranges enabled: +[ 0.000000] 0 base 00E0000000 mask 7FE0000000 uncachable +[ 0.000000] 1 base 00D0000000 mask 7FF0000000 uncachable +[ 0.000000] 2 base 00CC000000 mask 7FFC000000 uncachable +[ 0.000000] 3 base 00CA000000 mask 7FFE000000 uncachable +[ 0.000000] 4 disabled +[ 0.000000] 5 disabled +[ 0.000000] 6 disabled +[ 0.000000] 7 disabled +[ 0.000000] 8 disabled +[ 0.000000] 9 disabled +[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT +[ 0.000000] last_pfn = 0xc0000 max_arch_pfn = 0x400000000 +[ 0.000000] Scanning 1 areas for low memory corruption +[ 0.000000] Base memory trampoline at [(____ptrval____)] 97000 size 24576 +[ 0.000000] Using GB pages for direct mapping +[ 0.000000] BRK [0x23e8e5000, 0x23e8e5fff] PGTABLE +[ 0.000000] BRK [0x23e8e6000, 0x23e8e6fff] PGTABLE +[ 0.000000] BRK [0x23e8e7000, 0x23e8e7fff] PGTABLE +[ 0.000000] BRK [0x23e8e8000, 0x23e8e8fff] PGTABLE +[ 0.000000] BRK [0x23e8e9000, 0x23e8e9fff] PGTABLE +[ 0.000000] BRK [0x23e8ea000, 0x23e8eafff] PGTABLE +[ 0.000000] BRK [0x23e8eb000, 0x23e8ebfff] PGTABLE +[ 0.000000] BRK [0x23e8ec000, 0x23e8ecfff] PGTABLE +[ 0.000000] BRK [0x23e8ed000, 0x23e8edfff] PGTABLE +[ 0.000000] Secure boot disabled +[ 0.000000] RAMDISK: [mem 0x7f36a000-0x7fffefff] +[ 0.000000] ACPI: Early table checksum verification disabled +[ 0.000000] ACPI: RSDP 0x00000000BFFFE014 000024 (v02 LENOVO) +[ 0.000000] ACPI: XSDT 0x00000000BFFC2188 00010C (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: FACP 0x00000000BFFF5000 0000F4 (v05 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: DSDT 0x00000000BFFD0000 020D37 (v02 LENOVO SKL 00000000 INTL 20160527) +[ 0.000000] ACPI: FACS 0x00000000BFF3D000 000040 +[ 0.000000] ACPI: SSDT 0x00000000BFFFC000 0003CC (v02 LENOVO Tpm2Tabl 00001000 INTL 20160527) +[ 0.000000] ACPI: TPM2 0x00000000BFFFB000 000034 (v03 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: UEFI 0x00000000BFF53000 000042 (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: SSDT 0x00000000BFFF7000 003246 (v02 LENOVO SaSsdt 00003000 INTL 20160527) +[ 0.000000] ACPI: SSDT 0x00000000BFFF6000 0005B6 (v02 LENOVO PerfTune 00001000 INTL 20160527) +[ 0.000000] ACPI: HPET 0x00000000BFFF4000 000038 (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: APIC 0x00000000BFFF3000 0000BC (v03 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: MCFG 0x00000000BFFF2000 00003C (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: ECDT 0x00000000BFFF1000 000053 (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: SSDT 0x00000000BFFCF000 00021C (v01 LENOVO Rmv_Batt 00001000 INTL 20160527) +[ 0.000000] ACPI: SSDT 0x00000000BFFCD000 0016AD (v02 LENOVO ProjSsdt 00000010 INTL 20160527) +[ 0.000000] ACPI: BOOT 0x00000000BFFCC000 000028 (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: BATB 0x00000000BFFCB000 00004A (v02 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: SLIC 0x00000000BFFCA000 000176 (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: SSDT 0x00000000BFFC8000 0017AE (v02 LENOVO CpuSsdt 00003000 INTL 20160527) +[ 0.000000] ACPI: SSDT 0x00000000BFFC7000 00056D (v02 LENOVO CtdpB 00001000 INTL 20160527) +[ 0.000000] ACPI: SSDT 0x00000000BFFC6000 000600 (v02 LENOVO UsbCTabl 00001000 INTL 20160527) +[ 0.000000] ACPI: WSMT 0x00000000BFFC5000 000028 (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: SSDT 0x00000000BFFC4000 000141 (v02 LENOVO HdaDsp 00000000 INTL 20160527) +[ 0.000000] ACPI: SSDT 0x00000000BFFC3000 0004C5 (v02 LENOVO TbtTypeC 00000000 INTL 20160527) +[ 0.000000] ACPI: DBGP 0x00000000BFFFD000 000034 (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: DBG2 0x00000000BFFC1000 000054 (v00 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: POAT 0x00000000BFFC0000 000055 (v03 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: DMAR 0x00000000BFFBF000 0000F0 (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: ASF! 0x00000000BFFBE000 0000A0 (v32 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: FPDT 0x00000000BFFBD000 000044 (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: BGRT 0x00000000BFFBC000 000038 (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: UEFI 0x00000000BFF3B000 00013E (v01 LENOVO TP-R0I 00001310 PTEC 00000002) +[ 0.000000] ACPI: Local APIC address 0xfee00000 +[ 0.000000] No NUMA configuration found +[ 0.000000] Faking a node at [mem 0x0000000000000000-0x00000004327fffff] +[ 0.000000] NODE_DATA(0) allocated [mem 0x4327fc000-0x4327fffff] +[ 0.000000] Zone ranges: +[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] +[ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff] +[ 0.000000] Normal [mem 0x0000000100000000-0x00000004327fffff] +[ 0.000000] Device empty +[ 0.000000] Movable zone start for each node +[ 0.000000] Early memory node ranges +[ 0.000000] node 0: [mem 0x0000000000001000-0x0000000000057fff] +[ 0.000000] node 0: [mem 0x0000000000059000-0x000000000009cfff] +[ 0.000000] node 0: [mem 0x0000000000100000-0x00000000b513ffff] +[ 0.000000] node 0: [mem 0x00000000b5142000-0x00000000bea7dfff] +[ 0.000000] node 0: [mem 0x00000000bffff000-0x00000000bfffffff] +[ 0.000000] node 0: [mem 0x0000000100000000-0x00000004327fffff] +[ 0.000000] Reserved but unavailable: 5608 pages +[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x00000004327fffff] +[ 0.000000] On node 0 totalpages: 4133400 +[ 0.000000] DMA zone: 64 pages used for memmap +[ 0.000000] DMA zone: 21 pages reserved +[ 0.000000] DMA zone: 3995 pages, LIFO batch:0 +[ 0.000000] DMA32 zone: 12138 pages used for memmap +[ 0.000000] DMA32 zone: 776829 pages, LIFO batch:31 +[ 0.000000] Normal zone: 52384 pages used for memmap +[ 0.000000] Normal zone: 3352576 pages, LIFO batch:31 +[ 0.000000] Reserving Intel graphics memory at [mem 0xca800000-0xcc7fffff] +[ 0.000000] ACPI: PM-Timer IO Port: 0x1808 +[ 0.000000] ACPI: Local APIC address 0xfee00000 +[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) +[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1]) +[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1]) +[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1]) +[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1]) +[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1]) +[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1]) +[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x08] high edge lint[0x1]) +[ 0.000000] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-119 +[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) +[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) +[ 0.000000] ACPI: IRQ0 used by override. +[ 0.000000] ACPI: IRQ9 used by override. +[ 0.000000] Using ACPI (MADT) for SMP configuration information +[ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000 +[ 0.000000] smpboot: Allowing 4 CPUs, 0 hotplug CPUs +[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff] +[ 0.000000] PM: Registered nosave memory: [mem 0x00058000-0x00058fff] +[ 0.000000] PM: Registered nosave memory: [mem 0x0009d000-0x000fffff] +[ 0.000000] PM: Registered nosave memory: [mem 0xb5140000-0xb5140fff] +[ 0.000000] PM: Registered nosave memory: [mem 0xb5141000-0xb5141fff] +[ 0.000000] PM: Registered nosave memory: [mem 0xbea7e000-0xbff2cfff] +[ 0.000000] PM: Registered nosave memory: [mem 0xbff2d000-0xbff99fff] +[ 0.000000] PM: Registered nosave memory: [mem 0xbff9a000-0xbfffefff] +[ 0.000000] PM: Registered nosave memory: [mem 0xc0000000-0xc7ffffff] +[ 0.000000] PM: Registered nosave memory: [mem 0xc8000000-0xc85fffff] +[ 0.000000] PM: Registered nosave memory: [mem 0xc8600000-0xcc7fffff] +[ 0.000000] PM: Registered nosave memory: [mem 0xcc800000-0xefffffff] +[ 0.000000] PM: Registered nosave memory: [mem 0xf0000000-0xf3ffffff] +[ 0.000000] PM: Registered nosave memory: [mem 0xf4000000-0xfe00ffff] +[ 0.000000] PM: Registered nosave memory: [mem 0xfe010000-0xfe010fff] +[ 0.000000] PM: Registered nosave memory: [mem 0xfe011000-0xffffffff] +[ 0.000000] [mem 0xcc800000-0xefffffff] available for PCI devices +[ 0.000000] Booting paravirtualized kernel on bare hardware +[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370452778343963 ns +[ 0.000000] random: get_random_bytes called from start_kernel+0x95/0x535 with crng_init=0 +[ 0.000000] setup_percpu: NR_CPUS:320 nr_cpumask_bits:320 nr_cpu_ids:4 nr_node_ids:1 +[ 0.000000] percpu: Embedded 46 pages/cpu @(____ptrval____) s151552 r8192 d28672 u524288 +[ 0.000000] pcpu-alloc: s151552 r8192 d28672 u524288 alloc=1*2097152 +[ 0.000000] pcpu-alloc: [0] 0 1 2 3 +[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 4068793 +[ 0.000000] Policy zone: Normal +[ 0.000000] Kernel command line: initrd=/intel-ucode.img initrd=/initramfs-linux.img cryptdevice=/dev/nvme0n1p2:crypt_root root=/dev/mapper/crypt_root rw quiet +[ 0.000000] Calgary: detecting Calgary via BIOS EBDA area +[ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing! +[ 0.000000] Memory: 16106304K/16533600K available (12300K kernel code, 1413K rwdata, 3796K rodata, 1520K init, 644K bss, 427296K reserved, 0K cma-reserved) +[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 +[ 0.000000] Kernel/User page tables isolation: enabled +[ 0.000000] ftrace: allocating 35641 entries in 140 pages +[ 0.000000] Preemptible hierarchical RCU implementation. +[ 0.000000] CONFIG_RCU_FANOUT set to non-default value of 32 +[ 0.000000] RCU dyntick-idle grace-period acceleration is enabled. +[ 0.000000] RCU restricting CPUs from NR_CPUS=320 to nr_cpu_ids=4. +[ 0.000000] RCU priority boosting: priority 1 delay 500 ms. +[ 0.000000] Tasks RCU enabled. +[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 +[ 0.000000] NR_IRQS: 20736, nr_irqs: 1024, preallocated irqs: 16 +[ 0.000000] Offload RCU callbacks from CPUs: (none). +[ 0.000000] Console: colour dummy device 80x25 +[ 0.000000] console [tty0] enabled +[ 0.000000] ACPI: Core revision 20180531 +[ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635855245 ns +[ 0.000000] hpet clockevent registered +[ 0.003333] APIC: Switch to symmetric I/O mode setup +[ 0.003333] DMAR: Host address width 39 +[ 0.003333] DMAR: DRHD base: 0x000000fed90000 flags: 0x0 +[ 0.003333] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e +[ 0.003333] DMAR: DRHD base: 0x000000fed91000 flags: 0x1 +[ 0.003333] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da +[ 0.003333] DMAR: RMRR base: 0x000000bf4af000 end: 0x000000bf4cefff +[ 0.003333] DMAR: RMRR base: 0x000000ca000000 end: 0x000000cc7fffff +[ 0.003333] DMAR: ANDD device: 1 name: \_SB.PCI0.I2C0 +[ 0.003333] DMAR: ANDD device: 2 name: \_SB.PCI0.I2C1 +[ 0.003333] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1 +[ 0.003333] DMAR-IR: HPET id 0 under DRHD base 0xfed91000 +[ 0.003333] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping. +[ 0.003333] DMAR-IR: Enabled IRQ remapping in x2apic mode +[ 0.003333] x2apic enabled +[ 0.003333] Switched APIC routing to cluster x2apic. +[ 0.006666] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 +[ 0.023333] tsc: Detected 2900.000 MHz processor +[ 0.023333] tsc: Detected 2904.000 MHz TSC +[ 0.023333] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x29dc05e54fc, max_idle_ns: 440795291716 ns +[ 0.023333] Calibrating delay loop (skipped), value calculated using timer frequency.. 5810.00 BogoMIPS (lpj=9680000) +[ 0.023333] pid_max: default: 32768 minimum: 301 +[ 0.023333] Security Framework initialized +[ 0.023333] Yama: becoming mindful. +[ 0.023333] AppArmor: AppArmor disabled by boot time parameter +[ 0.027515] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes) +[ 0.029216] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes) +[ 0.029275] Mount-cache hash table entries: 32768 (order: 6, 262144 bytes) +[ 0.029326] Mountpoint-cache hash table entries: 32768 (order: 6, 262144 bytes) +[ 0.029530] ENERGY_PERF_BIAS: Set to 'normal', was 'performance' +[ 0.029531] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8) +[ 0.029537] mce: CPU supports 8 MCE banks +[ 0.029546] CPU0: Thermal monitoring enabled (TM1) +[ 0.029561] process: using mwait in idle threads +[ 0.029563] Last level iTLB entries: 4KB 64, 2MB 8, 4MB 8 +[ 0.029564] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 0, 1GB 4 +[ 0.029565] Spectre V2 : Mitigation: Full generic retpoline +[ 0.029566] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch +[ 0.029566] Spectre V2 : Spectre v2 mitigation: Enabling Indirect Branch Prediction Barrier +[ 0.029567] Spectre V2 : Enabling Restricted Speculation for firmware calls +[ 0.029568] Speculative Store Bypass: Mitigation: Speculative Store Bypass disabled via prctl and seccomp +[ 0.033697] Freeing SMP alternatives memory: 32K +[ 0.037565] TSC deadline timer enabled +[ 0.037569] smpboot: CPU0: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (family: 0x6, model: 0x8e, stepping: 0x9) +[ 0.056711] Performance Events: PEBS fmt3+, Skylake events, 32-deep LBR, full-width counters, Intel PMU driver. +[ 0.056743] ... version: 4 +[ 0.056744] ... bit width: 48 +[ 0.056744] ... generic registers: 4 +[ 0.056745] ... value mask: 0000ffffffffffff +[ 0.056745] ... max period: 00007fffffffffff +[ 0.056746] ... fixed-purpose events: 3 +[ 0.056746] ... event mask: 000000070000000f +[ 0.063350] Hierarchical SRCU implementation. +[ 0.083486] NMI watchdog: Enabled. Permanently consumes one hw-PMU counter. +[ 0.090015] smp: Bringing up secondary CPUs ... +[ 0.130050] x86: Booting SMP configuration: +[ 0.130051] .... node #0, CPUs: #1 #2 #3 +[ 0.210808] smp: Brought up 1 node, 4 CPUs +[ 0.210808] smpboot: Max logical packages: 1 +[ 0.210808] smpboot: Total of 4 processors activated (23241.00 BogoMIPS) +[ 0.213719] devtmpfs: initialized +[ 0.213719] x86/mm: Memory block size: 128MB +[ 0.214447] PM: Registering ACPI NVS region [mem 0xb5140000-0xb5140fff] (4096 bytes) +[ 0.214447] PM: Registering ACPI NVS region [mem 0xbff2d000-0xbff99fff] (446464 bytes) +[ 0.214447] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns +[ 0.214447] futex hash table entries: 1024 (order: 4, 65536 bytes) +[ 0.214447] pinctrl core: initialized pinctrl subsystem +[ 0.214447] RTC time: 18:37:12, date: 10/13/18 +[ 0.214447] NET: Registered protocol family 16 +[ 0.214447] audit: initializing netlink subsys (disabled) +[ 0.214447] audit: type=2000 audit(1539455832.213:1): state=initialized audit_enabled=0 res=1 +[ 0.214447] cpuidle: using governor ladder +[ 0.214447] cpuidle: using governor menu +[ 0.214447] Simple Boot Flag at 0x47 set to 0x1 +[ 0.214447] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it +[ 0.214447] ACPI: bus type PCI registered +[ 0.214447] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 +[ 0.214447] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf0000000-0xf3ffffff] (base 0xf0000000) +[ 0.214447] PCI: MMCONFIG at [mem 0xf0000000-0xf3ffffff] reserved in E820 +[ 0.214447] PCI: Using configuration type 1 for base access +[ 0.217026] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages +[ 0.217026] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages +[ 0.217026] ACPI: Added _OSI(Module Device) +[ 0.217026] ACPI: Added _OSI(Processor Device) +[ 0.217026] ACPI: Added _OSI(3.0 _SCP Extensions) +[ 0.217026] ACPI: Added _OSI(Processor Aggregator Device) +[ 0.217026] ACPI: Added _OSI(Linux-Dell-Video) +[ 0.217026] ACPI: EC: EC started +[ 0.217026] ACPI: EC: interrupt blocked +[ 0.217026] ACPI: \: Used as first EC +[ 0.217026] ACPI: \: GPE=0x16, EC_CMD/EC_SC=0x66, EC_DATA=0x62 +[ 0.217026] ACPI: \: Used as boot ECDT EC to handle transactions +[ 0.267607] ACPI: 11 ACPI AML tables successfully acquired and loaded +[ 0.276972] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored +[ 0.290313] ACPI: Dynamic OEM Table Load: +[ 0.290330] ACPI: SSDT 0xFFFF99095FEEF800 0006F6 (v02 PmRef Cpu0Ist 00003000 INTL 20160527) +[ 0.290623] ACPI: \_PR_.PR00: _OSC native thermal LVT Acked +[ 0.291170] ACPI: Dynamic OEM Table Load: +[ 0.291178] ACPI: SSDT 0xFFFF99095F87A000 0003FF (v02 PmRef Cpu0Cst 00003001 INTL 20160527) +[ 0.291703] ACPI: Dynamic OEM Table Load: +[ 0.291709] ACPI: SSDT 0xFFFF99095FEF8180 0000BA (v02 PmRef Cpu0Hwp 00003000 INTL 20160527) +[ 0.292135] ACPI: Dynamic OEM Table Load: +[ 0.292141] ACPI: SSDT 0xFFFF99095FEE9000 000628 (v02 PmRef HwpLvt 00003000 INTL 20160527) +[ 0.293893] ACPI: Dynamic OEM Table Load: +[ 0.293902] ACPI: SSDT 0xFFFF99095FFA6000 000D14 (v02 PmRef ApIst 00003000 INTL 20160527) +[ 0.295004] ACPI: Dynamic OEM Table Load: +[ 0.295004] ACPI: SSDT 0xFFFF99095F888C00 000317 (v02 PmRef ApHwp 00003000 INTL 20160527) +[ 0.295006] ACPI: Dynamic OEM Table Load: +[ 0.295006] ACPI: SSDT 0xFFFF99095F879000 00030A (v02 PmRef ApCst 00003000 INTL 20160527) +[ 0.295006] ACPI: Interpreter enabled +[ 0.295006] ACPI: (supports S0 S3 S4 S5) +[ 0.295006] ACPI: Using IOAPIC for interrupt routing +[ 0.295006] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug +[ 0.295216] ACPI: Enabled 7 GPEs in block 00 to 7F +[ 0.299155] ACPI: Power Resource [PUBS] (on) +[ 0.299415] acpi PNP0C0A:01: ACPI dock station (docks/bays count: 1) +[ 0.325862] ACPI: Power Resource [WRST] (on) +[ 0.326583] ACPI: Power Resource [WRST] (on) +[ 0.337740] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e]) +[ 0.337746] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI] +[ 0.337921] acpi PNP0A08:00: _OSC: platform does not support [PCIeHotplug SHPCHotplug PME AER PCIeCapability] +[ 0.338003] acpi PNP0A08:00: _OSC: not requesting control; platform does not support [PCIeCapability] +[ 0.338005] acpi PNP0A08:00: _OSC: OS requested [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR] +[ 0.338007] acpi PNP0A08:00: _OSC: platform willing to grant [LTR] +[ 0.338012] acpi PNP0A08:00: _OSC failed (AE_SUPPORT); disabling ASPM +[ 0.340564] PCI host bridge to bus 0000:00 +[ 0.340566] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window] +[ 0.340568] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window] +[ 0.340569] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] +[ 0.340570] pci_bus 0000:00: root bus resource [mem 0x000c0000-0x000c3fff window] +[ 0.340571] pci_bus 0000:00: root bus resource [mem 0x000c4000-0x000c7fff window] +[ 0.340572] pci_bus 0000:00: root bus resource [mem 0x000c8000-0x000cbfff window] +[ 0.340574] pci_bus 0000:00: root bus resource [mem 0x000cc000-0x000cffff window] +[ 0.340575] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff window] +[ 0.340576] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff window] +[ 0.340577] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff window] +[ 0.340578] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff window] +[ 0.340579] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e3fff window] +[ 0.340581] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff window] +[ 0.340582] pci_bus 0000:00: root bus resource [mem 0x000e8000-0x000ebfff window] +[ 0.340583] pci_bus 0000:00: root bus resource [mem 0x000ec000-0x000effff window] +[ 0.340584] pci_bus 0000:00: root bus resource [mem 0x000f0000-0x000fffff window] +[ 0.340585] pci_bus 0000:00: root bus resource [mem 0xcc800000-0xefffffff window] +[ 0.340586] pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfe7fffff window] +[ 0.340588] pci_bus 0000:00: root bus resource [bus 00-3e] +[ 0.340599] pci 0000:00:00.0: [8086:5904] type 00 class 0x060000 +[ 0.341497] pci 0000:00:02.0: [8086:5916] type 00 class 0x030000 +[ 0.341509] pci 0000:00:02.0: reg 0x10: [mem 0xe0000000-0xe0ffffff 64bit] +[ 0.341515] pci 0000:00:02.0: reg 0x18: [mem 0xd0000000-0xdfffffff 64bit pref] +[ 0.341520] pci 0000:00:02.0: reg 0x20: [io 0xe000-0xe03f] +[ 0.341535] pci 0000:00:02.0: BAR 2: assigned to efifb +[ 0.342470] pci 0000:00:14.0: [8086:9d2f] type 00 class 0x0c0330 +[ 0.342493] pci 0000:00:14.0: reg 0x10: [mem 0xe1320000-0xe132ffff 64bit] +[ 0.342562] pci 0000:00:14.0: PME# supported from D3hot D3cold +[ 0.343573] pci 0000:00:14.2: [8086:9d31] type 00 class 0x118000 +[ 0.343596] pci 0000:00:14.2: reg 0x10: [mem 0xe1348000-0xe1348fff 64bit] +[ 0.344596] pci 0000:00:15.0: [8086:9d60] type 00 class 0x118000 +[ 0.344860] pci 0000:00:15.0: reg 0x10: [mem 0xe1349000-0xe1349fff 64bit] +[ 0.346670] pci 0000:00:15.1: [8086:9d61] type 00 class 0x118000 +[ 0.346938] pci 0000:00:15.1: reg 0x10: [mem 0xe134a000-0xe134afff 64bit] +[ 0.348690] pci 0000:00:16.0: [8086:9d3a] type 00 class 0x078000 +[ 0.348714] pci 0000:00:16.0: reg 0x10: [mem 0xe134b000-0xe134bfff 64bit] +[ 0.348785] pci 0000:00:16.0: PME# supported from D3hot +[ 0.349744] pci 0000:00:1c.0: [8086:9d10] type 01 class 0x060400 +[ 0.349833] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold +[ 0.350787] pci 0000:00:1c.2: [8086:9d12] type 01 class 0x060400 +[ 0.350875] pci 0000:00:1c.2: PME# supported from D0 D3hot D3cold +[ 0.351821] pci 0000:00:1c.4: [8086:9d14] type 01 class 0x060400 +[ 0.351900] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold +[ 0.352871] pci 0000:00:1f.0: [8086:9d58] type 00 class 0x060100 +[ 0.353911] pci 0000:00:1f.2: [8086:9d21] type 00 class 0x058000 +[ 0.353926] pci 0000:00:1f.2: reg 0x10: [mem 0xe1344000-0xe1347fff] +[ 0.354894] pci 0000:00:1f.3: [8086:9d71] type 00 class 0x040300 +[ 0.354924] pci 0000:00:1f.3: reg 0x10: [mem 0xe1340000-0xe1343fff 64bit] +[ 0.354958] pci 0000:00:1f.3: reg 0x20: [mem 0xe1330000-0xe133ffff 64bit] +[ 0.355010] pci 0000:00:1f.3: PME# supported from D3hot D3cold +[ 0.355960] pci 0000:00:1f.4: [8086:9d23] type 00 class 0x0c0500 +[ 0.356015] pci 0000:00:1f.4: reg 0x10: [mem 0xe134c000-0xe134c0ff 64bit] +[ 0.356067] pci 0000:00:1f.4: reg 0x20: [io 0xefa0-0xefbf] +[ 0.357064] pci 0000:00:1f.6: [8086:15d8] type 00 class 0x020000 +[ 0.357090] pci 0000:00:1f.6: reg 0x10: [mem 0xe1300000-0xe131ffff] +[ 0.357200] pci 0000:00:1f.6: PME# supported from D0 D3hot D3cold +[ 0.358264] pci 0000:02:00.0: [10ec:522a] type 00 class 0xff0000 +[ 0.358292] pci 0000:02:00.0: reg 0x10: [mem 0xe1200000-0xe1200fff] +[ 0.358413] pci 0000:02:00.0: supports D1 D2 +[ 0.358415] pci 0000:02:00.0: PME# supported from D1 D2 D3hot D3cold +[ 0.358622] pci 0000:00:1c.0: PCI bridge to [bus 02] +[ 0.358627] pci 0000:00:1c.0: bridge window [mem 0xe1200000-0xe12fffff] +[ 0.359038] pci 0000:03:00.0: [8086:24fd] type 00 class 0x028000 +[ 0.359139] pci 0000:03:00.0: reg 0x10: [mem 0xe1100000-0xe1101fff 64bit] +[ 0.359426] pci 0000:03:00.0: PME# supported from D0 D3hot D3cold +[ 0.363442] pci 0000:00:1c.2: PCI bridge to [bus 03] +[ 0.363447] pci 0000:00:1c.2: bridge window [mem 0xe1100000-0xe11fffff] +[ 0.363541] pci 0000:04:00.0: [1179:0115] type 00 class 0x010802 +[ 0.363569] pci 0000:04:00.0: reg 0x10: [mem 0xe1000000-0xe1003fff 64bit] +[ 0.363613] pci 0000:04:00.0: enabling Extended Tags +[ 0.363779] pci 0000:00:1c.4: PCI bridge to [bus 04] +[ 0.363783] pci 0000:00:1c.4: bridge window [mem 0xe1000000-0xe10fffff] +[ 0.366578] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15) +[ 0.366673] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 *10 11 12 14 15) +[ 0.366766] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 10 *11 12 14 15) +[ 0.366856] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 10 *11 12 14 15) +[ 0.366946] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 *11 12 14 15) +[ 0.367036] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 *11 12 14 15) +[ 0.367126] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 10 *11 12 14 15) +[ 0.367218] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 *11 12 14 15) +[ 0.367784] ACPI: EC: interrupt unblocked +[ 0.367835] ACPI: EC: event unblocked +[ 0.367856] ACPI: \_SB_.PCI0.LPCB.EC__: GPE=0x16, EC_CMD/EC_SC=0x66, EC_DATA=0x62 +[ 0.367857] ACPI: \_SB_.PCI0.LPCB.EC__: Used as boot DSDT EC to handle transactions and events +[ 0.367936] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=mem,locks=none +[ 0.367936] pci 0000:00:02.0: vgaarb: bridge control possible +[ 0.367936] pci 0000:00:02.0: vgaarb: setting as boot device +[ 0.367936] vgaarb: loaded +[ 0.367936] ACPI: bus type USB registered +[ 0.367936] usbcore: registered new interface driver usbfs +[ 0.367936] usbcore: registered new interface driver hub +[ 0.367936] usbcore: registered new device driver usb +[ 0.367936] pps_core: LinuxPPS API ver. 1 registered +[ 0.367936] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> +[ 0.367936] PTP clock support registered +[ 0.367936] EDAC MC: Ver: 3.0.0 +[ 0.367936] Registered efivars operations +[ 0.394388] PCI: Using ACPI for IRQ routing +[ 0.401264] PCI: pci_cache_line_size set to 64 bytes +[ 0.401454] e820: reserve RAM buffer [mem 0x00058000-0x0005ffff] +[ 0.401455] e820: reserve RAM buffer [mem 0x0009d000-0x0009ffff] +[ 0.401456] e820: reserve RAM buffer [mem 0xb5140000-0xb7ffffff] +[ 0.401457] e820: reserve RAM buffer [mem 0xbea7e000-0xbfffffff] +[ 0.401458] e820: reserve RAM buffer [mem 0x432800000-0x433ffffff] +[ 0.401558] NetLabel: Initializing +[ 0.401558] NetLabel: domain hash size = 128 +[ 0.401559] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO +[ 0.401572] NetLabel: unlabeled traffic allowed by default +[ 0.401575] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0 +[ 0.401575] hpet0: 8 comparators, 64-bit 24.000000 MHz counter +[ 0.403335] clocksource: Switched to clocksource tsc-early +[ 0.413066] VFS: Disk quotas dquot_6.6.0 +[ 0.413079] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) +[ 0.413138] pnp: PnP ACPI init +[ 0.413344] system 00:00: [mem 0xfd000000-0xfdabffff] has been reserved +[ 0.413345] system 00:00: [mem 0xfdad0000-0xfdadffff] has been reserved +[ 0.413347] system 00:00: [mem 0xfdb00000-0xfdffffff] has been reserved +[ 0.413348] system 00:00: [mem 0xfe000000-0xfe01ffff] could not be reserved +[ 0.413350] system 00:00: [mem 0xfe036000-0xfe03bfff] has been reserved +[ 0.413351] system 00:00: [mem 0xfe03d000-0xfe3fffff] has been reserved +[ 0.413353] system 00:00: [mem 0xfe410000-0xfe7fffff] has been reserved +[ 0.413357] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active) +[ 0.413695] system 00:01: [io 0xff00-0xfffe] has been reserved +[ 0.413699] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active) +[ 0.414620] system 00:02: [io 0x0680-0x069f] has been reserved +[ 0.414621] system 00:02: [io 0xffff] has been reserved +[ 0.414623] system 00:02: [io 0xffff] has been reserved +[ 0.414624] system 00:02: [io 0xffff] has been reserved +[ 0.414625] system 00:02: [io 0x1800-0x18fe] has been reserved +[ 0.414627] system 00:02: [io 0x164e-0x164f] has been reserved +[ 0.414630] system 00:02: Plug and Play ACPI device, IDs PNP0c02 (active) +[ 0.414734] pnp 00:03: Plug and Play ACPI device, IDs PNP0b00 (active) +[ 0.414774] system 00:04: [io 0x1854-0x1857] has been reserved +[ 0.414777] system 00:04: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active) +[ 0.414796] pnp 00:05: Plug and Play ACPI device, IDs LEN0071 PNP0303 (active) +[ 0.414812] pnp 00:06: Plug and Play ACPI device, IDs LEN2046 PNP0f13 (active) +[ 0.414918] system 00:07: [io 0x1800-0x189f] could not be reserved +[ 0.414920] system 00:07: [io 0x0800-0x087f] has been reserved +[ 0.414921] system 00:07: [io 0x0880-0x08ff] has been reserved +[ 0.414922] system 00:07: [io 0x0900-0x097f] has been reserved +[ 0.414924] system 00:07: [io 0x0980-0x09ff] has been reserved +[ 0.414925] system 00:07: [io 0x0a00-0x0a7f] has been reserved +[ 0.414927] system 00:07: [io 0x0a80-0x0aff] has been reserved +[ 0.414928] system 00:07: [io 0x0b00-0x0b7f] has been reserved +[ 0.414929] system 00:07: [io 0x0b80-0x0bff] has been reserved +[ 0.414931] system 00:07: [io 0x15e0-0x15ef] has been reserved +[ 0.414932] system 00:07: [io 0x1600-0x167f] could not be reserved +[ 0.414934] system 00:07: [io 0x1640-0x165f] could not be reserved +[ 0.414935] system 00:07: [mem 0xf0000000-0xf3ffffff] has been reserved +[ 0.414937] system 00:07: [mem 0xfed10000-0xfed13fff] has been reserved +[ 0.414938] system 00:07: [mem 0xfed18000-0xfed18fff] has been reserved +[ 0.414940] system 00:07: [mem 0xfed19000-0xfed19fff] has been reserved +[ 0.414941] system 00:07: [mem 0xfeb00000-0xfebfffff] has been reserved +[ 0.414943] system 00:07: [mem 0xfed20000-0xfed3ffff] has been reserved +[ 0.414944] system 00:07: [mem 0xfed90000-0xfed93fff] could not be reserved +[ 0.414946] system 00:07: [mem 0xeffe0000-0xefffffff] has been reserved +[ 0.414949] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active) +[ 0.416391] system 00:08: [mem 0xfdaf0000-0xfdafffff] has been reserved +[ 0.416393] system 00:08: [mem 0xfdae0000-0xfdaeffff] has been reserved +[ 0.416394] system 00:08: [mem 0xfdac0000-0xfdacffff] has been reserved +[ 0.416397] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active) +[ 0.417387] system 00:09: [mem 0xfed10000-0xfed17fff] could not be reserved +[ 0.417388] system 00:09: [mem 0xfed18000-0xfed18fff] has been reserved +[ 0.417390] system 00:09: [mem 0xfed19000-0xfed19fff] has been reserved +[ 0.417391] system 00:09: [mem 0xf0000000-0xf3ffffff] has been reserved +[ 0.417393] system 00:09: [mem 0xfed20000-0xfed3ffff] has been reserved +[ 0.417394] system 00:09: [mem 0xfed90000-0xfed93fff] could not be reserved +[ 0.417396] system 00:09: [mem 0xfed45000-0xfed8ffff] has been reserved +[ 0.417397] system 00:09: [mem 0xff000000-0xffffffff] has been reserved +[ 0.417399] system 00:09: [mem 0xfee00000-0xfeefffff] has been reserved +[ 0.417400] system 00:09: [mem 0xeffe0000-0xefffffff] has been reserved +[ 0.417404] system 00:09: Plug and Play ACPI device, IDs PNP0c02 (active) +[ 0.417739] system 00:0a: [mem 0x00000000-0x0009ffff] could not be reserved +[ 0.417741] system 00:0a: [mem 0x000f0000-0x000fffff] could not be reserved +[ 0.417742] system 00:0a: [mem 0x00100000-0xcc7fffff] could not be reserved +[ 0.417744] system 00:0a: [mem 0xfec00000-0xfed3ffff] could not be reserved +[ 0.417745] system 00:0a: [mem 0xfed4c000-0xffffffff] could not be reserved +[ 0.417749] system 00:0a: Plug and Play ACPI device, IDs PNP0c01 (active) +[ 0.417886] pnp: PnP ACPI: found 11 devices +[ 0.423447] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns +[ 0.423482] pci 0000:00:1c.0: PCI bridge to [bus 02] +[ 0.423493] pci 0000:00:1c.0: bridge window [mem 0xe1200000-0xe12fffff] +[ 0.423499] pci 0000:00:1c.2: PCI bridge to [bus 03] +[ 0.423503] pci 0000:00:1c.2: bridge window [mem 0xe1100000-0xe11fffff] +[ 0.423510] pci 0000:00:1c.4: PCI bridge to [bus 04] +[ 0.423514] pci 0000:00:1c.4: bridge window [mem 0xe1000000-0xe10fffff] +[ 0.423521] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window] +[ 0.423522] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window] +[ 0.423524] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window] +[ 0.423525] pci_bus 0000:00: resource 7 [mem 0x000c0000-0x000c3fff window] +[ 0.423526] pci_bus 0000:00: resource 8 [mem 0x000c4000-0x000c7fff window] +[ 0.423527] pci_bus 0000:00: resource 9 [mem 0x000c8000-0x000cbfff window] +[ 0.423529] pci_bus 0000:00: resource 10 [mem 0x000cc000-0x000cffff window] +[ 0.423530] pci_bus 0000:00: resource 11 [mem 0x000d0000-0x000d3fff window] +[ 0.423531] pci_bus 0000:00: resource 12 [mem 0x000d4000-0x000d7fff window] +[ 0.423532] pci_bus 0000:00: resource 13 [mem 0x000d8000-0x000dbfff window] +[ 0.423533] pci_bus 0000:00: resource 14 [mem 0x000dc000-0x000dffff window] +[ 0.423535] pci_bus 0000:00: resource 15 [mem 0x000e0000-0x000e3fff window] +[ 0.423536] pci_bus 0000:00: resource 16 [mem 0x000e4000-0x000e7fff window] +[ 0.423537] pci_bus 0000:00: resource 17 [mem 0x000e8000-0x000ebfff window] +[ 0.423538] pci_bus 0000:00: resource 18 [mem 0x000ec000-0x000effff window] +[ 0.423540] pci_bus 0000:00: resource 19 [mem 0x000f0000-0x000fffff window] +[ 0.423541] pci_bus 0000:00: resource 20 [mem 0xcc800000-0xefffffff window] +[ 0.423542] pci_bus 0000:00: resource 21 [mem 0xfd000000-0xfe7fffff window] +[ 0.423543] pci_bus 0000:02: resource 1 [mem 0xe1200000-0xe12fffff] +[ 0.423545] pci_bus 0000:03: resource 1 [mem 0xe1100000-0xe11fffff] +[ 0.423546] pci_bus 0000:04: resource 1 [mem 0xe1000000-0xe10fffff] +[ 0.423705] NET: Registered protocol family 2 +[ 0.423845] tcp_listen_portaddr_hash hash table entries: 8192 (order: 5, 131072 bytes) +[ 0.423901] TCP established hash table entries: 131072 (order: 8, 1048576 bytes) +[ 0.424118] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes) +[ 0.424347] TCP: Hash tables configured (established 131072 bind 65536) +[ 0.424380] UDP hash table entries: 8192 (order: 6, 262144 bytes) +[ 0.424442] UDP-Lite hash table entries: 8192 (order: 6, 262144 bytes) +[ 0.424522] NET: Registered protocol family 1 +[ 0.424526] NET: Registered protocol family 44 +[ 0.424536] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff] +[ 0.424942] PCI: CLS 0 bytes, default 64 +[ 0.424971] Unpacking initramfs... +[ 0.581370] Freeing initrd memory: 12884K +[ 0.581433] DMAR: ACPI device "device:71" under DMAR at fed91000 as 00:15.0 +[ 0.581436] DMAR: ACPI device "device:72" under DMAR at fed91000 as 00:15.1 +[ 0.581458] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) +[ 0.581460] software IO TLB [mem 0xba0f2000-0xbe0f2000] (64MB) mapped at [(____ptrval____)-(____ptrval____)] +[ 0.581496] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x29dc05e54fc, max_idle_ns: 440795291716 ns +[ 0.581519] clocksource: Switched to clocksource tsc +[ 0.581609] Scanning for low memory corruption every 60 seconds +[ 0.582103] Initialise system trusted keyrings +[ 0.582112] Key type blacklist registered +[ 0.582155] workingset: timestamp_bits=41 max_order=22 bucket_order=0 +[ 0.583154] zbud: loaded +[ 0.583467] pstore: using lz4hc compression +[ 0.584523] Key type asymmetric registered +[ 0.584524] Asymmetric key parser 'x509' registered +[ 0.584548] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245) +[ 0.584578] io scheduler noop registered +[ 0.584579] io scheduler deadline registered +[ 0.584599] io scheduler cfq registered (default) +[ 0.584600] io scheduler mq-deadline registered +[ 0.584600] io scheduler kyber registered +[ 0.584621] io scheduler bfq registered +[ 0.585326] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4 +[ 0.585384] efifb: probing for efifb +[ 0.585399] efifb: framebuffer at 0xd0000000, using 8100k, total 8100k +[ 0.585400] efifb: mode is 1920x1080x32, linelength=7680, pages=1 +[ 0.585400] efifb: scrolling: redraw +[ 0.585402] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0 +[ 0.589010] Console: switching to colour frame buffer device 240x67 +[ 0.592483] fb0: EFI VGA frame buffer device +[ 0.592490] intel_idle: MWAIT substates: 0x11142120 +[ 0.592491] intel_idle: v0.4.1 model 0x8E +[ 0.592667] intel_idle: lapic_timer_reliable_states 0xffffffff +[ 0.592743] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input0 +[ 0.592753] ACPI: Sleep Button [SLPB] +[ 0.592782] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1 +[ 0.592787] ACPI: Lid Switch [LID] +[ 0.592814] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2 +[ 0.592818] ACPI: Power Button [PWRF] +[ 0.595758] thermal LNXTHERM:00: registered as thermal_zone0 +[ 0.595759] ACPI: Thermal Zone [THM0] (56 C) +[ 0.595968] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled +[ 0.617271] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A +[ 0.618288] nvme nvme0: pci function 0000:04:00.0 +[ 0.618304] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver +[ 0.618308] ehci-pci: EHCI PCI platform driver +[ 0.618316] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver +[ 0.618317] ohci-pci: OHCI PCI platform driver +[ 0.618324] uhci_hcd: USB Universal Host Controller Interface driver +[ 0.618600] xhci_hcd 0000:00:14.0: xHCI Host Controller +[ 0.618605] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1 +[ 0.619683] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x0000000000109810 +[ 0.619688] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported +[ 0.619847] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.18 +[ 0.619848] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 +[ 0.619849] usb usb1: Product: xHCI Host Controller +[ 0.619851] usb usb1: Manufacturer: Linux 4.18.12-arch1-1-ARCH xhci-hcd +[ 0.619852] usb usb1: SerialNumber: 0000:00:14.0 +[ 0.619942] hub 1-0:1.0: USB hub found +[ 0.619957] hub 1-0:1.0: 12 ports detected +[ 0.621487] xhci_hcd 0000:00:14.0: xHCI Host Controller +[ 0.621491] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2 +[ 0.621493] xhci_hcd 0000:00:14.0: Host supports USB 3.0 SuperSpeed +[ 0.621524] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.18 +[ 0.621526] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 +[ 0.621527] usb usb2: Product: xHCI Host Controller +[ 0.621528] usb usb2: Manufacturer: Linux 4.18.12-arch1-1-ARCH xhci-hcd +[ 0.621529] usb usb2: SerialNumber: 0000:00:14.0 +[ 0.621652] hub 2-0:1.0: USB hub found +[ 0.621664] hub 2-0:1.0: 6 ports detected +[ 0.621942] usb: port power management may be unreliable +[ 0.623087] usbcore: registered new interface driver usbserial_generic +[ 0.623091] usbserial: USB Serial support registered for generic +[ 0.623110] rtc_cmos 00:03: RTC can wake from S4 +[ 0.623649] rtc_cmos 00:03: registered as rtc0 +[ 0.623666] rtc_cmos 00:03: alarms up to one month, y3k, 242 bytes nvram, hpet irqs +[ 0.623715] intel_pstate: Intel P-state driver initializing +[ 0.624215] intel_pstate: HWP enabled +[ 0.624237] ledtrig-cpu: registered to indicate activity on CPUs +[ 0.624247] hidraw: raw HID events driver (C) Jiri Kosina +[ 0.624260] usbcore: registered new interface driver usbhid +[ 0.624260] usbhid: USB HID core driver +[ 0.624272] intel_pmc_core: initialized +[ 0.624449] NET: Registered protocol family 10 +[ 0.627177] Segment Routing with IPv6 +[ 0.627193] NET: Registered protocol family 17 +[ 0.627382] RAS: Correctable Errors collector initialized. +[ 0.627416] microcode: sig=0x806e9, pf=0x80, revision=0x8e +[ 0.627493] microcode: Microcode Update Driver: v2.2. +[ 0.627501] sched_clock: Marking stable (627489413, 0)->(610099463, 17389950) +[ 0.627684] registered taskstats version 1 +[ 0.627690] Loading compiled-in X.509 certificates +[ 0.629256] Loaded X.509 cert 'Build time autogenerated kernel key: 03cbf1b76221a3ff91b2c7e84f3aa8c21187841a' +[ 0.629270] zswap: loaded using pool lzo/zbud +[ 0.631492] Key type big_key registered +[ 0.632470] Magic number: 6:492:645 +[ 0.632643] rtc_cmos 00:03: setting system clock to 2018-10-13 18:37:13 UTC (1539455833) +[ 0.833438] nvme0n1: p1 p2 +[ 0.950042] usb 1-6: new low-speed USB device number 2 using xhci_hcd +[ 0.999448] Freeing unused kernel image memory: 1520K +[ 0.999496] Write protecting the kernel read-only data: 18432k +[ 1.000358] Freeing unused kernel image memory: 2008K +[ 1.000506] Freeing unused kernel image memory: 300K +[ 1.000677] x86/mm: Checked W+X mappings: passed, no W+X pages found. +[ 1.000677] x86/mm: Checking user space page tables +[ 1.000689] x86/mm: Checked W+X mappings: passed, no W+X pages found. +[ 1.096276] usb 1-6: New USB device found, idVendor=046d, idProduct=c00c, bcdDevice= 6.20 +[ 1.096278] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0 +[ 1.096279] usb 1-6: Product: USB Mouse +[ 1.096280] usb 1-6: Manufacturer: Logitech +[ 1.101250] input: Logitech USB Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:046D:C00C.0001/input/input3 +[ 1.101289] hid-generic 0003:046D:C00C.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB Mouse] on usb-0000:00:14.0-6/input0 +[ 1.111648] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12 +[ 1.113900] serio: i8042 KBD port at 0x60,0x64 irq 1 +[ 1.113935] serio: i8042 AUX port at 0x60,0x64 irq 12 +[ 1.117575] rtsx_pci 0000:02:00.0: enabling device (0000 -> 0002) +[ 1.118686] cryptd: max_cpu_qlen set to 1000 +[ 1.121534] AVX2 version of gcm_enc/dec engaged. +[ 1.121535] AES CTR mode by8 optimization enabled +[ 1.136018] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4 +[ 1.223527] usb 1-7: new full-speed USB device number 3 using xhci_hcd +[ 1.365442] usb 1-7: New USB device found, idVendor=8087, idProduct=0a2b, bcdDevice= 0.10 +[ 1.365446] usb 1-7: New USB device strings: Mfr=0, Product=0, SerialNumber=0 +[ 1.490197] usb 1-8: new high-speed USB device number 4 using xhci_hcd +[ 1.677374] usb 1-8: New USB device found, idVendor=5986, idProduct=111c, bcdDevice=37.27 +[ 1.677379] usb 1-8: New USB device strings: Mfr=3, Product=1, SerialNumber=2 +[ 1.677383] usb 1-8: Product: Integrated Camera +[ 1.677386] usb 1-8: Manufacturer: Bison +[ 1.677388] usb 1-8: SerialNumber: 200901010001 +[ 1.803534] usb 1-9: new full-speed USB device number 5 using xhci_hcd +[ 1.945748] usb 1-9: New USB device found, idVendor=138a, idProduct=0097, bcdDevice= 1.64 +[ 1.945753] usb 1-9: New USB device strings: Mfr=0, Product=0, SerialNumber=1 +[ 1.945756] usb 1-9: SerialNumber: ffd68ced54e5 +[ 1.969995] device-mapper: uevent: version 1.0.3 +[ 1.970065] device-mapper: ioctl: 4.39.0-ioctl (2018-04-03) initialised: dm-devel@redhat.com +[ 5.781173] random: crng init done +[ 8.033247] NET: Registered protocol family 38 +[ 16.448150] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null) +[ 16.522941] systemd[1]: systemd 239 running in system mode. (+PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid) +[ 16.537148] systemd[1]: Detected architecture x86-64. +[ 16.541943] systemd[1]: Set hostname to <arch-x270>. +[ 16.637465] systemd[1]: Listening on Process Core Dump Socket. +[ 16.637669] systemd[1]: Listening on LVM2 metadata daemon socket. +[ 16.638357] systemd[1]: Created slice Virtual Machine and Container Slice. +[ 16.638502] systemd[1]: Listening on LVM2 poll daemon socket. +[ 16.638536] systemd[1]: Started Forward Password Requests to Wall Directory Watch. +[ 16.638604] systemd[1]: Listening on Journal Audit Socket. +[ 16.638673] systemd[1]: Listening on udev Control Socket. +[ 16.654057] acpi_call: loading out-of-tree module taints kernel. +[ 16.654076] acpi_call: module verification failed: signature and/or required key missing - tainting kernel +[ 16.664035] EXT4-fs (dm-0): re-mounted. Opts: data=ordered +[ 16.664429] audit: type=1130 audit(1539455849.529:2): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=lvm2-lvmetad comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 16.666221] audit: type=1130 audit(1539455849.529:3): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-remount-fs comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 16.679048] SCSI subsystem initialized +[ 16.682772] audit: type=1130 audit(1539455849.546:4): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-random-seed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 16.684009] audit: type=1130 audit(1539455849.549:5): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-binfmt comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 16.708536] audit: type=1130 audit(1539455849.573:6): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-journald comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 16.713388] audit: type=1130 audit(1539455849.576:7): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-sysusers comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 16.721914] systemd-journald[276]: Received request to flush runtime journal from PID 1 +[ 16.730362] vboxdrv: Found 4 processor cores +[ 16.736942] audit: type=1130 audit(1539455849.603:8): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-setup-dev comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 16.749717] audit: type=1130 audit(1539455849.613:9): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-udev-trigger comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 16.753588] vboxdrv: TSC mode is Invariant, tentative frequency 2903999655 Hz +[ 16.753589] vboxdrv: Successfully loaded version 5.2.18 (interface 0x00290001) +[ 16.755313] VBoxPciLinuxInit +[ 16.755316] vboxpci: IOMMU not found (not registered) +[ 16.756183] VBoxNetAdp: Successfully started. +[ 16.758252] VBoxNetFlt: Successfully started. +[ 16.761298] audit: type=1130 audit(1539455849.623:10): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-modules-load comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 16.768366] audit: type=1130 audit(1539455849.633:11): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-sysctl comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 17.021571] ACPI: AC Adapter [AC] (on-line) +[ 17.028188] tpm_tis MSFT0101:00: 2.0 TPM (device-id 0x1B, rev-id 16) +[ 17.038242] ACPI: Battery Slot [BAT0] (battery present) +[ 17.044290] Non-volatile memory driver v1.3 +[ 17.059752] ACPI: Battery Slot [BAT1] (battery present) +[ 17.070454] intel-lpss 0000:00:15.0: enabling device (0000 -> 0002) +[ 17.078278] acpi PNP0C14:02: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01) +[ 17.078360] acpi PNP0C14:03: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01) +[ 17.080248] idma64 idma64.0: Found Intel integrated DMA 64-bit +[ 17.092662] Linux agpgart interface v0.103 +[ 17.096014] i801_smbus 0000:00:1f.4: enabling device (0000 -> 0003) +[ 17.098257] i801_smbus 0000:00:1f.4: SPD Write Disable is set +[ 17.098289] i801_smbus 0000:00:1f.4: SMBus using PCI interrupt +[ 17.098510] Adding 16777212k swap on /swapfile. Priority:-2 extents:11 across:18055164k SSFS +[ 17.114998] thinkpad_acpi: ThinkPad ACPI Extras v0.26 +[ 17.115000] thinkpad_acpi: http://ibm-acpi.sf.net/ +[ 17.115001] thinkpad_acpi: ThinkPad BIOS R0IET53W (1.31 ), EC unknown +[ 17.115002] thinkpad_acpi: Lenovo ThinkPad X270, model 20HMS03X00 +[ 17.121066] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k +[ 17.121067] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. +[ 17.127796] intel-lpss 0000:00:15.1: enabling device (0000 -> 0002) +[ 17.128193] idma64 idma64.1: Found Intel integrated DMA 64-bit +[ 17.128534] thinkpad_acpi: radio switch found; radios are enabled +[ 17.128903] thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver +[ 17.128904] thinkpad_acpi: Disabling thinkpad-acpi brightness events by default... +[ 17.135929] e1000e 0000:00:1f.6: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode +[ 17.137788] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked +[ 17.141621] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one +[ 17.142998] mei_me 0000:00:16.0: enabling device (0004 -> 0006) +[ 17.156141] thinkpad_acpi: battery 2 registered (start 0, stop 100) +[ 17.158871] thinkpad_acpi: battery 1 registered (start 0, stop 100) +[ 17.158875] battery: new extension: ThinkPad Battery Extension +[ 17.158920] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input6 +[ 17.167228] RAPL PMU: API unit is 2^-32 Joules, 5 fixed counters, 655360 ms ovfl timer +[ 17.167229] RAPL PMU: hw unit of domain pp0-core 2^-14 Joules +[ 17.167230] RAPL PMU: hw unit of domain package 2^-14 Joules +[ 17.167231] RAPL PMU: hw unit of domain dram 2^-14 Joules +[ 17.167231] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules +[ 17.167232] RAPL PMU: hw unit of domain psys 2^-14 Joules +[ 17.271439] cfg80211: Loading compiled-in X.509 certificates for regulatory database +[ 17.301725] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' +[ 17.302461] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 +[ 17.302463] cfg80211: failed to load regulatory.db +[ 17.323972] iTCO_vendor_support: vendor-support=0 +[ 17.327767] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11 +[ 17.327866] iTCO_wdt: Found a Intel PCH TCO device (Version=4, TCOBASE=0x0400) +[ 17.327999] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0) +[ 17.449061] e1000e 0000:00:1f.6 0000:00:1f.6 (uninitialized): registered PHC clock +[ 17.452497] Intel(R) Wireless WiFi driver for Linux +[ 17.452498] Copyright(c) 2003- 2015 Intel Corporation +[ 17.469171] i915 0000:00:02.0: enabling device (0006 -> 0007) +[ 17.469810] checking generic (d0000000 7e9000) vs hw (d0000000 10000000) +[ 17.469814] fb: switching to inteldrmfb from EFI VGA +[ 17.469848] Console: switching to colour dummy device 80x25 +[ 17.469926] [drm] Replacing VGA console driver +[ 17.471049] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). +[ 17.471050] [drm] Driver supports precise vblank timestamp query. +[ 17.471768] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=mem +[ 17.483466] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4) +[ 17.488143] [drm] Initialized i915 1.6.0 20180514 for 0000:00:02.0 on minor 0 +[ 17.490839] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no) +[ 17.491079] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input8 +[ 17.491268] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915]) +[ 17.504556] iwlwifi 0000:03:00.0: loaded firmware version 36.e91976c0.0 op_mode iwlmvm +[ 17.531169] intel_rapl: Found RAPL domain package +[ 17.531171] intel_rapl: Found RAPL domain core +[ 17.531172] intel_rapl: Found RAPL domain uncore +[ 17.531173] intel_rapl: Found RAPL domain dram +[ 17.569233] e1000e 0000:00:1f.6 eth0: (PCI Express:2.5GT/s:Width x1) 54:e1:ad:06:26:13 +[ 17.569240] e1000e 0000:00:1f.6 eth0: Intel(R) PRO/1000 Network Connection +[ 17.569297] e1000e 0000:00:1f.6 eth0: MAC: 12, PHY: 12, PBA No: 1000FF-0FF +[ 17.570534] e1000e 0000:00:1f.6 enp0s31f6: renamed from eth0 +[ 17.605061] fbcon: inteldrmfb (fb0) is primary device +[ 17.629004] iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 8265, REV=0x230 +[ 17.687452] iwlwifi 0000:03:00.0: base HW address: 00:28:f8:5e:78:2e +[ 17.764015] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs' +[ 17.764269] thermal thermal_zone3: failed to read out thermal zone (-61) +[ 17.765086] iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0 +[ 17.920928] psmouse serio1: synaptics: queried max coordinates: x [..5712], y [..4780] +[ 17.952056] psmouse serio1: synaptics: queried min coordinates: x [1232..], y [1074..] +[ 17.952060] psmouse serio1: synaptics: Your touchpad (PNP: LEN2046 PNP0f13) says it can support a different bus. If i2c-hid and hid-rmi are not used, you might want to try setting psmouse.synaptics_intertouch to 1 and report this to linux-input@vger.kernel.org. +[ 18.013373] psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2b1, caps: 0xf408a3/0x943300/0x12e800/0x410000, board id: 3075, fw id: 2527574 +[ 18.013377] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0 +[ 18.052332] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input7 +[ 18.055292] mousedev: PS/2 mouse device common for all mice +[ 18.317476] media: Linux media interface: v0.10 +[ 18.345468] videodev: Linux video capture interface: v2.00 +[ 18.353678] Bluetooth: Core ver 2.22 +[ 18.353696] NET: Registered protocol family 31 +[ 18.353697] Bluetooth: HCI device and connection manager initialized +[ 18.353700] Bluetooth: HCI socket layer initialized +[ 18.353702] Bluetooth: L2CAP socket layer initialized +[ 18.353707] Bluetooth: SCO socket layer initialized +[ 18.477095] usbcore: registered new interface driver btusb +[ 18.478485] Bluetooth: hci0: Firmware revision 0.1 build 244 week 24 2018 +[ 18.479011] uvcvideo: Found UVC 1.00 device Integrated Camera (5986:111c) +[ 18.486579] uvcvideo: Failed to initialize entity for entity 6 +[ 18.486580] uvcvideo: Failed to register entites (-22). +[ 18.486646] input: Integrated Camera: Integrated C as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/input/input10 +[ 18.486883] usbcore: registered new interface driver uvcvideo +[ 18.486883] USB Video Class driver (1.1.1) +[ 18.687492] psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 3/3 +[ 18.809502] Console: switching to colour frame buffer device 240x67 +[ 18.834240] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device +[ 18.886356] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC298: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker +[ 18.886359] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) +[ 18.886360] snd_hda_codec_realtek hdaudioC0D0: hp_outs=2 (0x17/0x21/0x0/0x0/0x0) +[ 18.886362] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0 +[ 18.886363] snd_hda_codec_realtek hdaudioC0D0: inputs: +[ 18.886364] snd_hda_codec_realtek hdaudioC0D0: Mic=0x18 +[ 18.886366] snd_hda_codec_realtek hdaudioC0D0: Dock Mic=0x19 +[ 18.886367] snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x12 +[ 18.887821] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 +[ 18.887822] Bluetooth: BNEP filters: protocol multicast +[ 18.887825] Bluetooth: BNEP socket layer initialized +[ 18.901111] input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/serio2/input/input9 +[ 18.944145] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1f.3/sound/card0/input11 +[ 18.944612] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input12 +[ 18.944656] input: HDA Intel PCH Dock Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input13 +[ 18.944699] input: HDA Intel PCH Dock Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input14 +[ 18.944742] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input15 +[ 18.944783] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input16 +[ 18.944824] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input17 +[ 18.944864] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input18 +[ 18.944903] input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input19 +[ 18.944943] input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input20 +[ 19.024174] IPv6: ADDRCONF(NETDEV_UP): enp0s31f6: link is not ready +[ 19.236846] IPv6: ADDRCONF(NETDEV_UP): enp0s31f6: link is not ready +[ 19.239739] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready +[ 19.454722] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready +[ 19.685114] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready +[ 19.798884] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready +[ 22.861590] kauditd_printk_skb: 111 callbacks suppressed +[ 22.861591] audit: type=1006 audit(1539455855.726:71): pid=689 uid=0 old-auid=4294967295 auid=1000 tty=tty1 old-ses=4294967295 ses=1 res=1 +[ 22.872090] audit: type=1130 audit(1539455855.736:72): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user-runtime-dir@1000 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 22.884173] audit: type=1006 audit(1539455855.749:73): pid=1215 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=2 res=1 +[ 22.915029] audit: type=1130 audit(1539455855.779:74): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user@1000 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 23.266974] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready +[ 23.487159] audit: type=1131 audit(1539455856.353:75): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 23.993815] wlp3s0: authenticate with 04:b0:e7:c5:89:50 +[ 23.998971] wlp3s0: send auth to 04:b0:e7:c5:89:50 (try 1/3) +[ 24.005085] wlp3s0: authenticated +[ 24.006781] wlp3s0: associate with 04:b0:e7:c5:89:50 (try 1/3) +[ 24.009183] wlp3s0: RX AssocResp from 04:b0:e7:c5:89:50 (capab=0x1511 status=0 aid=1) +[ 24.011998] wlp3s0: associated +[ 24.080147] wlp3s0: Limiting TX power to 23 (23 - 0) dBm as advertised by 04:b0:e7:c5:89:50 +[ 24.161885] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready +[ 25.493541] fuse init (API version 7.27) +[ 29.028292] audit: type=1131 audit(1539455861.893:76): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 30.373176] audit: type=1130 audit(1539455863.236:77): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=rtkit-daemon comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' +[ 30.705622] Bluetooth: RFCOMM TTY layer initialized +[ 30.705630] Bluetooth: RFCOMM socket layer initialized +[ 30.705634] Bluetooth: RFCOMM ver 1.11 diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/notes/error b/console_toolkit/sourcefiles/exercises/exercise_files/notes/error new file mode 100644 index 0000000000000000000000000000000000000000..ffe374b6e5d7e9867caa17a0599bd4fd5256ece6 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/notes/error @@ -0,0 +1 @@ +YOU SHOULD NOT SEE THIS diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/notes/file1.txt b/console_toolkit/sourcefiles/exercises/exercise_files/notes/file1.txt new file mode 100644 index 0000000000000000000000000000000000000000..df485dbc81dcad484df5273bf80ae9c5aa54a0d7 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/notes/file1.txt @@ -0,0 +1 @@ +This is diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/notes/file2.txt b/console_toolkit/sourcefiles/exercises/exercise_files/notes/file2.txt new file mode 100644 index 0000000000000000000000000000000000000000..f4d97296bd33e4eb97a0ec28071f3e86dee78d54 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/notes/file2.txt @@ -0,0 +1 @@ +the correct diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/notes/file3.txt b/console_toolkit/sourcefiles/exercises/exercise_files/notes/file3.txt new file mode 100644 index 0000000000000000000000000000000000000000..0f6630d43f6e4cdeac87413da297b901fdf71454 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/notes/file3.txt @@ -0,0 +1 @@ +output! diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/notes/long_file b/console_toolkit/sourcefiles/exercises/exercise_files/notes/long_file new file mode 100644 index 0000000000000000000000000000000000000000..acb58b9b601f78593762cefdd475867c93111fbb --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/notes/long_file @@ -0,0 +1,68 @@ +Lorizzle i saw beyonces tizzles and my pizzle went crizzle dolizzle sit +amizzle, consectetuer adipiscing elit. Nullizzle dizzle velizzle, boom +shackalack dang, suscipit mofo, gravida fo shizzle, shit. Pellentesque fo +shizzle my nizzle tortor. Sizzle erizzle. You son of a bizzle pimpin' da bomb +dapibizzle turpis tempizzle shut the shizzle up. Maurizzle pellentesque nibh et +pimpin'. Mofo izzle check it out. Pellentesque eleifend rhoncizzle dang. In hac +habitasse go to hizzle dictumst. Yo dapibizzle. Funky fresh tellizzle urna, +pretizzle fo, mattis ac, eleifend vitae, nunc. Shut the shizzle up suscipit. +Check it out uhuh ... yih! mah nizzle sizzle purus. + +Nunc tellus lorem, ass izzle, dizzle funky fresh, vehicula daahng dawg, its fo +rizzle. Etizzle check it out leo a sem hendrerit mattizzle. Shizzle my nizzle +crocodizzle interdizzle magna gangsta eros commodo dang. Etizzle my shizz +fermentum sizzle. Black odio. Maecenizzle quizzle things ac dolizzle iaculis +auctizzle. Bizzle sagittizzle ma nizzle urna. Bling bling sollicitudin massa fo +shizzle my nizzle purizzle. Morbi that's the shizzle stuff sit amet tellizzle. +Nizzle bow wow wow boom shackalack shiznit arcu. Cum socizzle yippiyo +penatibizzle et ma nizzle dis parturient stuff, nascetizzle uhuh ... yih! +mizzle. + +Tellivizzle ma nizzle, pizzle izzle blandit black, sizzle quizzle tempus +dizzle, ma nizzle mollizzle boofron justo check it out est. Maecenas placerat, +libero elementizzle euismod fermentizzle, ipsizzle mauris own yo' felizzle, +sizzle vehicula nisl fo shizzle sizzle maurizzle. Fo shizzle nulla check out +this, we gonna chung quis, malesuada volutpat, pulvinar izzle, check it out. +Vivamus urna. Break yo neck, yall placerizzle, nulla quis mammasay mammasa +mamma oo sa black, felis dope facilisizzle da bomb, shiznit bibendizzle fo +shizzle gizzle you son of a bizzle for sure. Fo shizzle lectizzle. Nam black +shiz bow wow wow sem ornare crunk. Integizzle cursizzle, turpizzle vel +auctizzle fizzle, pede break it down semper gizzle, ass fizzle laorizzle mi +felizzle izzle massa. Doggy bizzle my shizz. In hizzle habitasse yippiyo +info@thealternative.ch dictumst. Maecenas tortizzle sem, faucibizzle gizzle, +gangster gangsta, congue ac, quizzle. Bizzle hizzle things, yo vel, daahng dawg +da bomb, fizzle that's the shizzle, check it out. Duis izzle bizzle izzle quam +pulvinizzle my shizz. Fo shizzle stuff dolizzle daahng dawg amet, own yo' +adipiscing check out this. + +Ghetto aliquam away izzle mi. Bizzle socizzle natoque penatibus gangster my +shizz dawg parturient montes, nascetizzle ridiculizzle mus. Ut purizzle get +down get down, molestie for sure, convallis black, sollicitudin tellivizzle, +dizzle. Rizzle fo shizzle urna commodo fizzle. Donec sagittis. Crunk own yo' +orci, fringilla gangster, yippiyo a, condimentum at, owned. Away imperdizzle, +nulla sure amizzle commodo gravida, dui lectizzle ornare enim, shizznit +hendrerit yo est dizzle velizzle. Pellentesque quizzle odio. Nizzle ghetto +dolizzle gizzle metizzle. Dang facilisi. + +Nulla eu ligula. Aliquam porta commodo tellus. Aenean viverra, sapien funky +fresh cool bling bling, sizzle urna hendrerizzle we gonna chung, nizzle shizzle +my nizzle crocodizzle fo sapien at nunc. Donizzle own yo' dolizzle. Mah nizzle +quis sheezy. Sed ass faucibus fo shizzle my nizzle. Integizzle sizzle sem, own +yo' izzle, volutpizzle egizzle, auctor egizzle, nunc. Sed pharetra. Nunc +sheezy. Curabitizzle own yo' hizzle leo nec ante blandizzle i saw beyonces +tizzles and my pizzle went crizzle. Quisque brizzle tellizzle sit amizzle dawg. +Aenizzle tempus dignissizzle shut the shizzle up. + +Vivamizzle tellivizzle lacizzle crazy sem. Ma nizzle izzle dawg ac dawg dapibus +interdum. Etizzle auctor pharetra boom shackalack. Aliquam crazy feugiat +shizzle my nizzle crocodizzle. Aliquizzle fo shizzle my nizzle ass. In sizzle +gangsta nisl. Fo shizzle my nizzle elementizzle away izzle phat. Own yo' a +break it down. Boom shackalack lorizzle doggy, molestie dapibizzle, mollizzle +boom shackalack, molestie owned, mi. Yippiyo izzle felis izzle shizzle my +nizzle crocodizzle crackalackin mah nizzle. Integer phat erat. Yo shiz. Morbi +nisi tortor, break it down break yo neck, yall, pharetra fo, funky fresh the +bizzle, things. Cool dapibus yippiyo funky fresh. Mauris nisl shizzlin dizzle, +aliquizzle quizzle, vehicula izzle, euismod its fo rizzle, augue. Mah nizzle +leo. Bizzle ut sapien in erat tellivizzle mattizzle. Nizzle check out this +break yo neck, yall, facilisis we gonna chung, daahng dawg eu, adipiscing for +sure, that's the shizzle. diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/pictures/.secret_dir/cat_hidden.jpg b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/.secret_dir/cat_hidden.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bab676316af1fdf788c13c5f038a6b78866dbbfe --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/.secret_dir/cat_hidden.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:464fd713b0aaf9fc6becf3f27729f829a83133102fbf0a2e237492090e46cbcb +size 832690 diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/pictures/cat1.jpg b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/cat1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8af63f628c26a26b4401e01fe83679b09d27c2d4 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/cat1.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e7f0b881525c2bf4d89d46231c7498a12607a3901ee4592e9f666a0943a451b +size 191596 diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/pictures/cat2.jpg b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/cat2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..22cd84f73f4e6ade5858795355e8663a6384ff41 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/cat2.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2082cf2778c8e15c58c321c5c54d6d5d0128f30c53c5ab74639525cebfaab0c3 +size 98658 diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/pictures/cat3.jpg b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/cat3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d494a189a9393cffa5c4fdf24880fc47e8378e60 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/cat3.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1b0c3f85b7dd1ba3ce0b8c6c03d92736d4804f62a644cfbf213857d10bd62bc +size 285713 diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/pictures/dog1.jpg b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/dog1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3414d3b32722bf2c6ee6d98d980a8ef84fccaa5c --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/dog1.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e10ae70da9e77995bc10ff60c19ba24515c43b67a3ce2e9ed09a285c86a11baa +size 82633 diff --git a/console_toolkit/sourcefiles/exercises/exercise_files/pictures/sources b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/sources new file mode 100644 index 0000000000000000000000000000000000000000..ae433be9c22b7a5171b4c04c8e74b3ba31c6d5f9 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercise_files/pictures/sources @@ -0,0 +1,5 @@ +cat1.jpg: https://commons.wikimedia.org/wiki/File:Gatos_cats_7_cropped.jpg +cat2.jpg: https://commons.wikimedia.org/wiki/File:Gillie_hunting_(2292639848).jpg +cat3.jpg: https://commons.wikimedia.org/wiki/File:Britishblue.jpg +dog1.jpg: https://commons.wikimedia.org/wiki/File:Afra_011.jpg +hidden_cat.jpg: https://commons.wikimedia.org/wiki/File:Cat_Briciola_with_pretty_and_different_colour_of_eyes.jpg diff --git a/console_toolkit/sourcefiles/exercises/exercises.pdf b/console_toolkit/sourcefiles/exercises/exercises.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b124b91a5a5c225fcb95aafb116e5fd5e266197d --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercises.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71624cc106747df76152301034a803394af2ddd9d430b22c0b26822786c1a64c +size 306943 diff --git a/console_toolkit/sourcefiles/exercises/exercises.tex b/console_toolkit/sourcefiles/exercises/exercises.tex new file mode 100644 index 0000000000000000000000000000000000000000..66407001ff75eeb13983ce8b63dfc55e6d82fdcf --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/exercises.tex @@ -0,0 +1,804 @@ +\documentclass{TheAlternativeCourse} + +\usepackage{menukeys} +\usepackage{tabularx} +\usepackage{float} +\usepackage{caption} + +\title{Console Toolkit Exercises} +\date{} +\author{} + +\begin{document} +\maketitle + +\setlength{\parindent}{0cm} +\setlength{\parskip}{12pt} + +\section{Introduction} + +Welcome to this exercise session! This is a practical exercise on the Linux +command line. If you have any question about the exercises, feel free to ask +the helpers for assistance. + +\subsection*{Difficulty} + +The exercises are designed in such a way that you will have to find solutions +by reading the manuals and using search engines. You are expected to come up +with appropriate solutions on your own, there will be no step-by-step guided +exercises! + +There will be quite simple exercises for complete beginners at the start, +but there are also some much more difficult ones further into the exercise. +Feel free to skip ahead! + +\subsection*{Liability} + +By taking part in this exercise, you acknowledge that you alone are responsible +for your computer. TheAlternative and its parent organisation, the Student +Sustainability Commission, will not be held liable for any damages or loss of +data. + +\pagebreak + +\section{Basics} + +To solve some of the exercises, you will need to download some files. Whenever +you see an orange box like below, this means you have a task to solve. + +\begin{exercisebox}{Getting the repository} + Open a terminal and enter the following (all on one line): \\ + \texttt{curl https://files.project21.ch/LinuxDays-Public/HS18-exercise.zip + -o exercises.zip} \\\\ + Then extract the zip archive like this: \\ + \texttt{unzip exercises.zip} +\end{exercisebox} + +\subsection{Running a command} + +To run a command, you just type it into the console and hit enter. Most useful +commands require some arguments. Arguments are given after the name of the +command, separated by spaces. There are also so-called \emph{flags}, which set +some options to alter the behaviour of a command. They have the form +\texttt{-x} (single letter form) or \texttt{--long-option} (long format). + +An example of a more involved command: + +\begin{cmdbox} +\texttt{ls -l --human-readable \textasciitilde/Downloads} +\end{cmdbox} + +\subsection{Getting help} + +\texttt{man} is a command you will need throughout the following +exercises. It stands for ``manual'' and shows you what almost any given +command can do and which options are available for it. Almost all commands +provide such a ``manpage'', which is typically written by the developers +themselves. + +\begin{exercisebox}{The manual's manual} + The \texttt{man} command itself has its own manpage. Type \texttt{man man} + to access it, use the arrow keys to scroll, and press \keys{q} to exit. + Have a look around, especially at the different section numbers. + What is the section number for system calls? +\end{exercisebox} + +An alternative to using the man pages is to try and see if a command has a help +option. This is usually displayed by appending the option \texttt{--help} after +the name of the command, which will often display much shorter and concise +instructions +on how to use a command. + +\begin{exercisebox}{The help option} + Look at the help output of \texttt{ls}. What is the flag to see hidden + files? +\end{exercisebox} + +\subsection{Navigating directories} + +You can navigate your file system in the terminal, just like you could with +a graphical program. Below are the most important commands. + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + width=1.0\linewidth, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Commands for navigating directories}] + \textbf{Command} & \textbf{Description} \\ + \texttt{pwd} & Display the current working directory. \\ + \texttt{tree DIR} & Get a visualization of the directory tree under + \texttt{DIR}. \\ + \texttt{ls DIR} & List all files and directories in the current + working directory. \\ + \texttt{cd DIR} & Change the current working directory to the given + directory. \\ + \end{tcolorbox}% + \label{tab1} +\end{table} + +\begin{exercisebox}{Making yourself at home} + Have a look around your home directory and try out the mentioned commands. + You will most likely recognise the layout from your graphical file browser. + Remember you can always return to your home directory by running + \texttt{cd} without any arguments. +\end{exercisebox} + +\subsection{Modifying directories} + +Just like in graphical programs, you can create and delete directories on the +command line. + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Commands for modifying directories}] + \textbf{Command} & \textbf{Description} \\ + \texttt{mkdir DIR} & Create a new directory with the given name. \\ + \texttt{rmdir DIR} & Remove a directory. Will not work with + non-empty directories. \\ + \texttt{rm -r DIR} & Remove a directory and its contents. + {\color{exclamred}Attention! There is no trashcan on the command + line! Files and directories will be deleted irrevocably.} \\ + \texttt{cp -r SOURCE TARGET} & Copy a source directory + (recursively with all its contents) to a target. \\ + \texttt{mv SOURCE TARGET} & Move a file or directory. + Also used to rename files/directories. \\ + \end{tcolorbox}% + \label{tab2} +\end{table} + +\begin{exercisebox}{Creating your first directory} + Create a directory for the following exercises (you can call it + \texttt{console-toolkit}). Change into that directory and create a file + called \texttt{notes}. Then move the exercise file directory you downloaded + in task 2.1 into your newly created directory. +\end{exercisebox} + +\subsection{Viewing files} +If you want to view the contents of a text file, you have the following +options: + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Commands for viewing files}] + \textbf{Command} & \textbf{Description} \\ + \texttt{cat FILE} & Output a file to the terminal. \\ + \texttt{head FILE} & Output the first couple of lines to the terminal. \\ + \texttt{tail FILE} & Output the last couple of lines to the terminal. \\ + \texttt{less FILE} & Browse a file in a visual viewer. \\ + \end{tcolorbox}% + \label{tab3} +\end{table} + +\begin{exercisebox}{Log files} + \texttt{tail} is often used to inspect errors log files. Use tail to find the + last three lines of \texttt{dmesg\_log} (in the exercise files). +\end{exercisebox} + +\hintbox{\texttt{dmesg} is tool to view the log output of your kernel.} + +\subsection{Console tips \& tricks} + +There are many small things that can make your life when using the terminal +little bit easier. Following is a table with the most important keyboard +shortcuts you can use to speed up your workflow. + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Terminal keyboard shortcuts}] + \keys{\ctrl}+\keys{w} & Delete one word backwards. \\ + \keys{\ctrl}+\keys{u} & Delete the entire line. \\ + \keys{\ctrl}+\keys{l} & Clear the terminal. \\ + \keys{\ctrl}+\keys{a} & Go to the beginning of the line. \\ + \keys{\ctrl}+\keys{e} & Go to the end of the line. \\ + \keys{\ctrl}+\keys{c} & Terminate the currently runnig process. \\ + \keys{\ctrl}+\keys{d} & Quit the shell. \\ + \end{tcolorbox}% + \label{tab4} +\end{table} + +\section{Files \& Permissions} + +This section introduces you to basic commands related to files. We will first +look at a command that can be used for creating empty files. + +The \texttt{touch} command is most frequently used for creating new, empty +files. If you check the manual, you will see that it can also change certain +file timestamps (access and modification times). + +\begin{exercisebox}{The magic touch} + Switch to your home directory. Execute \texttt{touch file}. A new file + should have been created. Confirm that this is the case. +\end{exercisebox} +% +We already saw \texttt{cat} in the previous section. Another tool to look at +files is \texttt{less}. This command is great if you want to look at large +bodies of text because unlike \texttt{cat}, it has a built-in scroll function. +Once you are done looking at the file, you can quit with \keys{q}. + +\subsection{Permissions} + +We will now look at two commands to manage permissions. + +\texttt{chown} stands for ``change owner''. It is used to change the owner of a +given file. It can also change the group ownership. + +\begin{exercisebox}{Get off my lawn} + Create a new, empty file (hint: \texttt{touch}) and use \texttt{chown} to + change its ownership to the \texttt{root} user (you will probably need + \texttt{sudo} for this). Try deleting it. Then change the ownership back to + your own user. +\end{exercisebox} +% +A very similar command is \texttt{chmod}. \texttt{chmod} stands for ``change +file mode bits'' and controls the following permissions on any given file: + +\begin{itemize} + \setlength\itemsep{-9pt} + \item Read: Who can see the file data. + \item Write: Who can modify the file. + \item Execute: Who is allowed to run the file (like a program or a script) +\end{itemize} + +\hintbox{Permissions can be viewed using \texttt{ls -l}.} + +\begin{exercisebox}{{Read, Write, Execute}} + The read, write and execute permissions do different things, depending on + whether they are set for directories or for files. Find out what they mean + for files and directorues by playing around with the \texttt{chmod} + command, readings its manual or searching on the internet. +\end{exercisebox} + +\subsection{File tools} + +There are a number of other commands that are frequently used to get +information on files: + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Commands for getting information about files}] + \textbf{Command} & \textbf{Description} \\ + \texttt{wc \$file} & Display line, word, and character count of a file \\ + \texttt{diff \$file1 \$file2} & Show differences between files \\ + \texttt{ln \$target \$link\_name} & Create a link \\ + \texttt{du \$file} & Estimate file space usage \\ + \texttt{df} & Report file system disk usage \\ + \end{tcolorbox}% + \label{tab5} +\end{table} + +In the next exercise we are going to read some text from the standard input +(also called \texttt{stdin}). Reading from \texttt{stdin} means you can just +type text into the console. When you are done, hit \keys{Enter} to enter a +newline and then hit \keys{\ctrl}+\keys{d}. This is the universal end-of-file +character in Unix-like systems. It signals to the command that it the input has +finished. You can even use this key shortcut to close your terminal. + +\begin{exercisebox}{Cat tricks} + Type the command \texttt{cat -}. This starts \texttt{cat} to read from + \texttt{stdin}. Enter some text and observe what happens when you press + \keys{Enter}. \texttt{cat} will just keep reading until the end-of-file + character, so you can enter multiple lines of text. When you are done, + terminate the input as described above. +\end{exercisebox} + +\begin{exercisebox}{Counting words} + Sometimes you might want to know the length of some text. First, consult + \texttt{wc}'s manual to find out how you can read from standard input. Copy + a line of text of your choice from the \texttt{wc} manual, then use the + \texttt{wc} syntax that you looked up to read from standard input. Paste + the text and terminate the input as before. +\end{exercisebox} + +\hintbox{% +Copying and pasting in the console usually works with +\keys{\ctrl}+\keys{\shift}+\keys{c} and \keys{\ctrl}+\keys{\shift}+\keys{v}, +this depends on the terminal though.} + +\paragraph{Hardlink} +A hardlink is a pointer to a specific, physical location on a hard disk. If the +file name of the file that is linked to changes, the link still works. However, +if the file is replaced by a different file with the same name, the hardlink +will now \emph{not} point to the new file! It will still point to the location +of the old file. + +\paragraph{Symlink} +A symlink (short for symbolic link) points to a file name, to an actual file +path. If the data behind the file name is changed, the symbolic link will then +point to this new file, as long as the name stays the same. This is a higher +level concept than a hardlink, as it operates above the concept of file names. +Most of the time, a symlink is preferrable to a hardlink. + +\begin{exercisebox}{Symlinks} + Have a look at the \texttt{ln} manual to find out how to create a symbolic + link. Then create a link in your home directory to a directory you use + frequently. +\end{exercisebox} + +Lastly, two commands that are loosely related to files are \texttt{df} and +\texttt{du}. These commands are used to find out how much space files take up. +\texttt{df} shows coarse-grained disk usage as reported by the file system. +\texttt{du} counts the disk usage of individual files and directories. + +\begin{exercisebox}{Reporting disk usage} + When you run \texttt{df} and \texttt{du}, the sizes of files are reported + in multiples of blocks. The size of a block depends on your file system, + but typically is between 512 bytes and 1 kilobyte. This means that you + would have to multiply by this size the true size, in bytes. Find out how + to make the output of \texttt{df} and \texttt{du} more readable for humans + by looking at their options in the manual (hint: the option is the same for + both tools). +\end{exercisebox} + +\section{Leveraging the command line} + +\subsection{Globbing (Wildcards)} + +Globbing is a useful tool to work with files that share a pattern. For example, +to refer to all \texttt{jpg} images in a directory, you can use \texttt{*.jpg}. +The \texttt{*} means `any number of any characters', so this pattern will give +you all files that end with \texttt{.jpg}. Similarly, \texttt{dir/*} will give +you \emph{all} files in \texttt{dir}, \emph{except} hidden files. + +There are a few more useful patterns, like \texttt{?} (question mark) which +matches any \emph{single} character, or \texttt{\string{*.jpg,*.png\string}}, +which is a list that matches both \texttt{.jpg} and \texttt{.png} files. To +learn more, you can have a look at \texttt{man 7 glob}. + +\begin{exercisebox}{{Printing text, again}} + Ouput all \texttt{.txt} files in \texttt{notes/} to the terminal in + a single command. The output will tell you if you did it correctly. +\end{exercisebox} + +\begin{exercisebox}{Managing cat pictures} + Create a new directory called \texttt{cats}. Copy all cat pictures in + \texttt{pictures/} (in the exercise files) to your new \texttt{cats} + directory, with a single command. +\end{exercisebox} + +\subsection{Pipes} + +Pipes are useful to connect multiple commands together. One of the design +principles of Unix was ``do one thing, and do it well''. This means, tools +should be simple and powerful in their specific domain, but there should also +be a mechanism to combine multiple programs in an easy way. This mechanism is +the \emph{pipe}, the \texttt{|} symbol. It allows you to connect the output of +one program to the input of another program. + +For example, we can combine \texttt{du} and \texttt{sort} to work together. +\texttt{du} analyses the usage of disk space, and sort just sorts lines +it is given. This pipe analyzes your home directory and tells you which +directory uses the most space: + +\begin{cmdbox} + \texttt{du -sh * | sort -h} +\end{cmdbox} + +Here the \texttt{*} globbing pattern stands for ``every file in the current +directory''. + +\begin{exercisebox}{Counting lines in multiple files} + \texttt{wc} (word count) can be used to count the number of lines in a file + (\texttt{-l} flag). Use \texttt{cat} to output all files in the + \texttt{notes} directory (exercise files) at the same time and connect it + to \texttt{wc} to count the lines. +\end{exercisebox} + +\subsection{Find} + +Looking for specific files on your system is a task that one has to do fairly +regularly. Two very popular tool for finding files with certain properties are +\texttt{find} and \texttt{grep}. In this section, we cover \texttt{find}. As a +rule of thumb, \texttt{find} is best used when you know that your file has +certain metadata: Maybe you know approximately when you have created the file, +when you last looked at it, how large it is etc. In contrast, \texttt{grep} is +usually used when you want to look at \emph{the content} of a file. + +\texttt{find} works by essentially filtering all files through a chain of +conditions, given by flags. Working with \texttt{find} is +fairly straight forward and almost like verbally explaining what you are +looking for. + +\begin{cmdbox} + \texttt{find -mtime -1 -size +100k} +\end{cmdbox} + +This searches for all files that have been modified (\texttt{-mtime}) less than +one day ago (\texttt{-1}) and have size (\texttt{-size}) larger than 100 +Kilobytes (\texttt{+100k}). \texttt{find} has a lot of conditions where it +makes sense to specify ``greater than'' or ``smaller than''. This is specified +by prefixing the amount with a \texttt{+} or a \texttt{-}. This is why the +condition ``larger than 100 Kilobytes'' is written as \texttt{-size +100k}. + +If we additionally knew that our file was smaller than one gigabyte, we would +type: +\begin{cmdbox} + \texttt{find -mtime -1 -size +100k -size -2G} +\end{cmdbox} + +It's necessary to use \texttt{-2G} here, since file sizes are rounded up. +A file that has 800M will be rounded to 1G. The semantics of find use strictly +smaller (\texttt{<}), therefore we have to compare to 2G. + +Here is an overview of options for \texttt{find} that are useful to know. + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Useful find flags}] + \textbf{Flag} & \textbf{Description} \\ + \texttt{-name} & Matches the name of a file. \\ + \texttt{-size} & Condition on the size of a file. \\ + \texttt{-atime} & Condition on when file was last accessed. \\ + \texttt{-mtime} & Condition on when file was last modified. \\ + \texttt{-type} & Specifies type of file (directory, regular file + \ldots). \\ + \end{tcolorbox}% + \label{tab6} +\end{table} + +\begin{exercisebox}{The largest cat} + Use \texttt{find} to find all cat pictures (\texttt{cat*}) with a size over + 200 kilobytes in the exercise directory. There should be more than one! +\end{exercisebox} + +\subsection{Grep and regular expressions} + +\includegraphics[width=\textwidth]{img/regex_golf.png} +{\footnotesize xkcd 1313, https://xkcd.com/1313/} + +While working with many files in different folders, you can find yourself +losing track of what is in what file. To quickly find something in one of many +files, you can use \texttt{grep}. Grep is a tool for searching a body of text +for a specific pattern. Those patterns are specified with a syntax called +``Regular Expressions'' or regexes. + +Regexes can easily become \emph{very} complicated (there are entire books on +this topic). We'll have a look at the very basics here. Regexes are comprised +of a string of characters, e.g. \texttt{foo.bar[0-9]}. Let's look at it in more +detail: + +\begin{itemize} + \setlength\itemsep{-9pt} + \item{\makebox[1.5cm]{\: \texttt{foo\hfill}} Matches the literal word ``foo''.} + \item{\makebox[1.5cm]{\: \texttt{.\hfill}} Matches any single character.} + \item{\makebox[1.5cm]{\: \texttt{bar\hfill}} Matches the literal word ``bar''.} + \item{\makebox[1.5cm]{\: \texttt{[0-9]\hfill}} Matches a single digit between 0 and 9.} +\end{itemize} + +For example, this regex \texttt{foo.bar[0-9]} would match on all of these +strings: + +\begin{itemize} + \setlength\itemsep{-9pt} + \item \texttt{foo\_bar1} + \item \texttt{fooobar9} + \item \texttt{foozbar5} + \item \texttt{foo1bar2} +\end{itemize} + +An important thing to note is that regular expressions don't have to match the +entire string. So the example regex would also match on +\texttt{XXXXfoo1bar2XXXX}, because \texttt{foo1bar2} is part of that string. + +So how do we try that on the command line? Simple, to test out \texttt{grep}, +we can use \texttt{echo} to pipe a string into grep to match. Like this: + +\begin{cmdbox} + \texttt{echo foo1bar2 | grep foo.bar[0-9]} +\end{cmdbox} + +This should output \texttt{foo1bar2}, because grep outputs all lines from its +input that match the regex. + +There are a few command line options that you should know about \texttt{grep}. +These can also be combined, like so: \texttt{grep -rnoh PATTERN FILE}. + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Useful grep flags}] + \textbf{Command} & \textbf{Description} \\ + \texttt{-r} & Recursively look at all files under the given directory. \\ + \texttt{-o} & Only print the matching strings, not the entire line. \\ + \texttt{-h} & Don't print the filename, just the matching string/line. \\ + \texttt{-n} & Prefix the output with the linenumber where the match occured. \\ + \end{tcolorbox}% + \label{tabgrepopts} +\end{table} + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Regex building blocks}] + \textbf{Regex} & \textbf{Example} & \textbf{Description} \\ + + \textbf{Match Expressions} & & \\ + \texttt{<character literal>} & \texttt{f} & + Matches the character \texttt{<character literal>}. + The example matches on \texttt{f}. \\ + \texttt{.} & \texttt{.} & Matches any single character. \\ + \texttt{[<char1>-<char2>]} & \texttt{[a-z]} & + Matches a single character in the range from \texttt{<char1>} to + \texttt{<char2>} (inclusive). The example matches on any lowercase + character. The character range can be specified multiple times, + like so: \texttt{[a-zA-Z0-9]}. This would match any lower- or + uppercase character or digit. \\ + \texttt{[[:alnum:]]} & \texttt{[[:alnum:]]} & + Alphanumeric characters (letters and digits). \\ + \texttt{[[:alpha:]]} & \texttt{[[:alpha:]]} & Letters. \\ + \texttt{[[:digit:]]} & \texttt{[[:digit:]]} & Digits. \\ + \texttt{[[:xdigit:]]} & \texttt{[[:xdigit:]]} & Hexadecimal digits. \\ + \texttt{[[:blank:]]} & \texttt{[[:blank:]]} & Blank space (spaces and tabs). \\ + \texttt{[[:word:]]} & \texttt{[[:word:]]} & Digits, letters and underscores. \\ + + \textbf{Modifiers} & & \\ + \texttt{?} & \texttt{.?} & + The preceding expression appears zero times or exactly once. The + example would match on an empty string or any string of length one. \\ + \texttt{*} & \texttt{.*} & + The preceding expression appears zero, one or many times. The + example would match on a string of arbitrary length, including an + empty one.\\ + \texttt{+} & \texttt{.+} & + The preceding expression appears one or many times. The example + matches on a string of any length greater than zero. \\ + \texttt{\string{<num>\string}} & \texttt{\string{3\string}} & + Matches on a string if the preceding expression appears exactly + \texttt{<num>} times. \\ + \texttt{\string{<num1>,<num2>\string}} & \texttt{\string{3,6\string}} & + Matches on a string if the preceding expression appears between + \texttt{<num1>} and \texttt{<num2>} times (inclusive). \\ + \end{tcolorbox}% + \label{tabgreplarge} +\end{table} + +\paragraph{Note} When using the characters \texttt{|, +, ?} with their regex +meaning, they must be escaped with a backslash like this: \verb@\|, \+, \?@. If +you want to use any of the ofter special characters as regular characters, i.e. +to match a literal \texttt{.} you can use \verb@\.@ + +\begin{exercisebox}{Finding email addresses} + Somewhere in the exercise files, there is an email address hidden in a text + file. Create a regular expression that matches email addresses that end in + .ch and find it! +\end{exercisebox} + +\section{Remote machines} + +This section will be about working with remote machines. You will +connect to one and move files from and to it. Additionally, you will set up +your SSH so you can log in without entering a password. + +\texttt{ssh} (secure shell) is an extremely useful tool, as it allows you to +manage servers, connecting to your home computer from a laptop, running +computations on super computers, and even using graphical applications that are +installed on a different computer. \texttt{scp} (secure copy) works just like +\texttt{cp}, but allows you to copy files to and from remote machines. +\texttt{scp} is based on the SSH protocol, so it works similiarly and the +public key authentication in exercise 5.2 will automatically also apply to +\texttt{scp}. + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Remote access tools}] + \texttt{ssh user@hostname} & + Open an SSH session with a specific user on a host. \\ + \texttt{scp user@hostname:file.txt .} & + Copy a file from remote machine to the current directory. \\ + \texttt{scp file.txt user@hostname:file.txt} & + Copy a file from current directory to remote host. \\ + \end{tcolorbox}% + \label{tab7} +\end{table} + +\hintbox{% +If you don't have an ETH account, use\\ +\texttt{hackingsession@pterodactyl.vsos.ethz.ch} with password\\ +\texttt{BoredHacker} for the following exercises instead.} + +\begin{exercisebox}{Establishing an SSH connection} + Use SSH to connect to the Euler supercomputer at + \texttt{nethz-login@euler.ethz.ch}, where \texttt{nethz-login} is your + \emph{nethz} account name. You can login using your regular credentials. +\end{exercisebox} +% +It is inconvenient that you have to enter your password every time you want to +log in. You can set up SSH in a way where you \emph{don't} have to provide your +password! This is done with public key cryptography. Basically, you generate a +public key and a private key. The private key you keep safe and only for +yourself. The public key you can distribute to anyone. Now you can +authenticate yourself for anyone that has your public key: You can create a +signature with your private key, that can be verified using the public key. +However, only the owner of the private key can create the signature that is +verifiable by the public key! This can be used by an SSH server to authenticate +clients that want to open an SSH session. + +\begin{exercisebox}{Generating your key} + Generate your private/public key pair using \texttt{ssh-keygen}. + Then copy your generated public key (\texttt{.ssh/id\_rsa.pub}) to + \texttt{.ssh/authorized\_keys} on the server. Try logging in with SSH now, + it should no longer require a password. +\end{exercisebox} + + +\section{Jobs \& Processes} + +Jobs are groups of processes that are running in the current shell. Often, a +job only consists of one process but sometimes a job is a process +\emph{pipeline} consisting of multiple jobs, such as +\texttt{echo "Hello" | cat -}. Consult the \texttt{JOB CONTROL} section +of the \texttt{bash} manual if you want to study the details. + +Knowing how to control jobs is essential if you want to be able to +simultaneously run multiple processes from the same shell. + +\subsection{Job control} + +Jobs can be put into the background, started in the background, brought to the +foreground and killed. We say a job is running in the background when it is +currently running, but not blocking the shell. In other words, when a job is +running in the background, you can still use your shell normally (although the +job might produce output that will get displayed on your terminal which can be +quite annoying). + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Working with jobs}] + \texttt{jobs} & List all jobs in the current shell\\ + \texttt{cmd \&} & Start \texttt{cmd} in the background\\ + \texttt{fg} & Bring a job into the foreground\\ + \texttt{bg} & Bring a job into the background\\ + \end{tcolorbox} + \label{tabjobcmds} +\end{table} + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Controlling jobs}] + \texttt{\keys{\ctrl}+\keys{z}} & Suspend current job. Processes may ignore this.\\ + \texttt{\keys{\ctrl}+\keys{c}} & Kill current job. Processes may ignore this.\\ + \texttt{kill \%N} & Kill job, where N is its number as listed in + \texttt{jobs}.Processes may \emph{still} ignore this.\\ + \texttt{kill -9 \%N} & Kill job with number N for sure.\\ + \end{tcolorbox} + \label{tab8} +\end{table} + +You can \emph{usually} use \keys{\ctrl}+\keys{c} to terminate a job in the +foreground and \keys{\ctrl}+\keys{z} to suspend a job in the foreground. +Suspended jobs are paused until they are resumed with either \texttt{fg} or +\texttt{bg}. Note that processes can choose to overwrite these shortcuts so +they are not guaranteed to work. If they don't work, we can always use more +drastic measures \ldots + +\subsection{Processes} + +Processes operate system-wide. Each process has a unique process ID, called the +PID for short. You can think of processes as separate programs running +independent of each other. For example, an \texttt{echo} command spawns a new +process that is separated from the shell process that you are in (which is +typically \texttt{bash}). + +\begin{table}[H] + \centering + \rowcolors{1}{lightblue}{white} + \begin{tcolorbox}[% + enhanced, + fuzzy shadow={1mm}{-1mm}{0mm}{0.1mm}{black!50!white}, + width=1.0\linewidth, + tabularx={>{\centering\arraybackslash}l|>{\centering\arraybackslash}X}, + title={Managing}] + \texttt{top} & Display info about all currently running processes. Quit + with \keys{q}\\ + \texttt{htop} & A more modern equivalent of \texttt{top}. It is not + installed by default on most distributions, but can be installed it + with your package manager. \\ + \texttt{kill \texttt{PID}} & Send a termination signal to the process + \texttt{PID}. This is the preferred way to terminate a process, as it + allows it to exit normally and perform clean up. \\ + \texttt{kill -9 \texttt{PID}} & Send a killing signal to the + process \texttt{PID}. The process is killed by the operating system + immediately. Useful for unresponsive processes. \\ + \texttt{pkill \texttt{PATTERN}} & Like \texttt{kill}, but kills + processes whose names match a pattern instead. \\ + \texttt{pkill -9 \texttt{PATTERN}} & Send a kill signal instead. \\ + \texttt{ps} & Utility to display information about processes. Most + commonly used as \texttt{ps aux}. \\ + \end{tcolorbox}% + \label{tab9} +\end{table} + +\texttt{kill} and \texttt{pkill} actually send so-called signals to processes. +There are many signals that all do different things. When you call \texttt{kill +PID}, the signal \texttt{15} is sent to the process \texttt{PID}. This signal +is called the \texttt{SIGTERM} signal and is used to \emph{ask} a process to +terminate. When we write \texttt{kill -9 PID}, we are actually sending the +signal \texttt{9} which is also known as \texttt{SIGKILL} and kills a process +instantly. Read \texttt{man 7 signal} if you want to know more about signals. + + +\begin{exercisebox}{Killed in their sleep} + Start a new process by typing \texttt{sleep 1000} in your shell. Open + another shell. Use \texttt{top}, \texttt{htop} or \texttt{ps} to figure out + the PID of the \texttt{sleep} process. Kill it. +\end{exercisebox} + +\begin{exercisebox}{A job for kill} + \texttt{kill} also works on jobs. Start \texttt{sleep 1000} in the + background (or start it in the foreground, suspend it, then bring it to the + background). Then type \texttt{kill \%N} where \texttt{N} is the job's number + (probably \texttt{1}). Check the output of the \texttt{jobs} command and + confirm that the job is not displayed anymore. +\end{exercisebox} + +\section{License} + +This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 +International License. See also: +\url{http://creativecommons.org/licenses/by-sa/4.0/}. + +\vspace{0cm} +\includegraphics[width=3cm]{assets/CC-BY-SA_icon.pdf} + +\end{document} diff --git a/console_toolkit/sourcefiles/exercises/img/Light_Bulb_or_Idea_Flat_Icon_Vector.svg b/console_toolkit/sourcefiles/exercises/img/Light_Bulb_or_Idea_Flat_Icon_Vector.svg new file mode 100644 index 0000000000000000000000000000000000000000..952368fe4b0d44312a9336825c69dc5b162ec6f2 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/img/Light_Bulb_or_Idea_Flat_Icon_Vector.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c68fdce64ede22e643857ecda56dfb4a8dc270d89cb2a5b1a0797f6359672602 +size 13559 diff --git a/console_toolkit/sourcefiles/exercises/img/light_bulb.pdf b/console_toolkit/sourcefiles/exercises/img/light_bulb.pdf new file mode 100644 index 0000000000000000000000000000000000000000..68e2e7fdf38c45241524190a18595cc9eb95b2a3 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/img/light_bulb.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:328680a7ce75da7887493c5db71f10c423fdc67c758ffd48b4f27fae663f8dee +size 2535 diff --git a/console_toolkit/sourcefiles/exercises/img/regex_golf.png b/console_toolkit/sourcefiles/exercises/img/regex_golf.png new file mode 100644 index 0000000000000000000000000000000000000000..3d2ca3d126b5523b4e57519106ced0d372efd597 --- /dev/null +++ b/console_toolkit/sourcefiles/exercises/img/regex_golf.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad23ad4c339acfc50272889034f0eccab5aaccd9c9b50d800e0b07a9bf21f5fb +size 53732 diff --git a/console_toolkit/sourcefiles/slides/Makefile b/console_toolkit/sourcefiles/slides/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..0b08d6330ce69532de4c90dbdeae8adca89a6cff --- /dev/null +++ b/console_toolkit/sourcefiles/slides/Makefile @@ -0,0 +1,25 @@ +TEX=latexmk +TEXOPTS=-output-directory=build \ + -pdf \ + -latexoption=-interaction=nonstopmode \ + -latexoption=-file-line-error + +# set PREVIEW=1 to enable preview +# example usage: make PREVIEW=1 target +ifdef PREVIEW +PREVIEWOPTS=-pvc +endif + +default: pres + +# create build directory if it doesnt exist +builddir: + @[ -d build ] || mkdir build + +pres: pres.tex builddir + @$(TEX) $(TEXOPTS) $(PREVIEWOPTS) $< + mv build/pres.pdf . + +clean: + @rm -rf build/* + diff --git a/console_toolkit/sourcefiles/slides/build/pres.listing b/console_toolkit/sourcefiles/slides/build/pres.listing new file mode 100644 index 0000000000000000000000000000000000000000..3651abe76925641c22523c358957b2f17bbb3f8f --- /dev/null +++ b/console_toolkit/sourcefiles/slides/build/pres.listing @@ -0,0 +1,8 @@ +[luke@host ~]$ borg init --encryption=repokey /path/to/repo +Enter passphrase: +Repeat passphrase: +[luke@host ~]$ borg create /path/to/repo +[luke@host ~]$ borg create --stats /path/to/repo::Backup1 ~/dir_to_backup +[luke@host ~]$ borg create --stats /path/to/repo::Backup2 ~/dir_to_backup +[luke@host ~]$ borg extract /path/to/repo::Backup1 + diff --git a/console_toolkit/sourcefiles/slides/build/pres.vrb b/console_toolkit/sourcefiles/slides/build/pres.vrb new file mode 100644 index 0000000000000000000000000000000000000000..15d83b9c9c415c40765d7697f2e32334d8ae95de --- /dev/null +++ b/console_toolkit/sourcefiles/slides/build/pres.vrb @@ -0,0 +1,8 @@ +\frametitle{Sources} +\footnotesize + \begin{itemize} + \item[1] \url{https://commons.wikimedia.org/wiki/File:Linux_Filesystem_Hierarchy_Standard.png} + \item[2] \url{https://en.wikipedia.org/wiki/File:Gnome-emblem-package.svg} + \item[3] \url{https://commons.wikimedia.org/wiki/File:OneFlow_Example.png} + \item[4] \url{https://git-scm.com/images/logos/logomark-orange@2x.png} + \end{itemize} diff --git a/console_toolkit/sourcefiles/slides/img/GullBraceLeft.svg b/console_toolkit/sourcefiles/slides/img/GullBraceLeft.svg new file mode 100644 index 0000000000000000000000000000000000000000..fef94b527d4507f05b795532265cd3e988e3647d --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/GullBraceLeft.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66bc4bdd9ca21682cffa47e3b9e9e010c7f8d994ca4a5458c3dd40b56af55970 +size 9667 diff --git a/console_toolkit/sourcefiles/slides/img/borg_logo.png b/console_toolkit/sourcefiles/slides/img/borg_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..af107009e408f25da124b9168fe2e6d940522a09 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/borg_logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb4876b6f2b7089a41ed8b8667dca26d6fa1941fe4ac07911056be843ae78900 +size 24527 diff --git a/console_toolkit/sourcefiles/slides/img/cl.png b/console_toolkit/sourcefiles/slides/img/cl.png new file mode 100644 index 0000000000000000000000000000000000000000..691db7159e1fd3fbba1a6789a7a6472c16fed3af --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/cl.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8251620f236950c7d8a1256f2f392ee21d93711786a49220110b5d731033ec8b +size 44151 diff --git a/console_toolkit/sourcefiles/slides/img/consoles.png b/console_toolkit/sourcefiles/slides/img/consoles.png new file mode 100644 index 0000000000000000000000000000000000000000..553ab0589488d2d055756dddb78879705db517fd --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/consoles.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9ac86998b307f69861784eae2dfdc4627aa9ccbee60a17b927d4de3380be71f +size 162613 diff --git a/console_toolkit/sourcefiles/slides/img/dirtree.png b/console_toolkit/sourcefiles/slides/img/dirtree.png new file mode 100644 index 0000000000000000000000000000000000000000..155d657d5d2fd70adf39f9615b0cd9273ec5e344 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/dirtree.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2d324a451af250eb71fcf230ae319c19aa36e9c7c06be807a65e0f038622d9e +size 19062 diff --git a/console_toolkit/sourcefiles/slides/img/fs.png b/console_toolkit/sourcefiles/slides/img/fs.png new file mode 100644 index 0000000000000000000000000000000000000000..1ebaa73e0ae9292df9743d7d70f5775757bc144c --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/fs.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:020938e26d346873161527661b72099dc5ec973708282852096d953a3317b4fb +size 430822 diff --git a/console_toolkit/sourcefiles/slides/img/fsf.png b/console_toolkit/sourcefiles/slides/img/fsf.png new file mode 100644 index 0000000000000000000000000000000000000000..abc026897a51f7da1b6878e697dabcfd3ff49bb6 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/fsf.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6503bc8f7c400843186a3d312f1e296c279e934fdf4f9fd57b6a909601329aaa +size 29018 diff --git a/console_toolkit/sourcefiles/slides/img/git_branches.png b/console_toolkit/sourcefiles/slides/img/git_branches.png new file mode 100644 index 0000000000000000000000000000000000000000..de663fd089f323034c8eb8863075454560c28fbf --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/git_branches.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71294196d7ed3c40b7dd361be49697debfcecbdb206ed11bd53ad7fe6601679f +size 14590 diff --git a/console_toolkit/sourcefiles/slides/img/git_logo.png b/console_toolkit/sourcefiles/slides/img/git_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9e58b3e98e46657204113391f8dfb8ce088b7af0 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/git_logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e1df0456b9f527c2c9c25fd8dacd121865ee68681be439c13f616109222f62b +size 59186 diff --git a/console_toolkit/sourcefiles/slides/img/matrix.png b/console_toolkit/sourcefiles/slides/img/matrix.png new file mode 100644 index 0000000000000000000000000000000000000000..a5640f81077c8e8a99eb34c3bc39a1ca3b74f555 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/matrix.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7431df87901b37240178773ec6fb15391d9f4f271d4ffd18a94049738836a4d8 +size 124417 diff --git a/console_toolkit/sourcefiles/slides/img/package-icon.pdf b/console_toolkit/sourcefiles/slides/img/package-icon.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4cdf7b0a0c3c0af68a13fce41dd03696fc22ea65 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/package-icon.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0cc70912488c1c47f45b5cd069a78ff224d870f883927cc0e5cf4c4e3112072 +size 15354 diff --git a/console_toolkit/sourcefiles/slides/img/package-icon.svg b/console_toolkit/sourcefiles/slides/img/package-icon.svg new file mode 100644 index 0000000000000000000000000000000000000000..d8eefa303471ff8ee442728c5f8fc2a3b5154e92 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/package-icon.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:054ed06972073f511457a09e98a23a85fcd6b6e1e21bb94bbdf799e480e72090 +size 15682 diff --git a/console_toolkit/sourcefiles/slides/img/permissions_example.png b/console_toolkit/sourcefiles/slides/img/permissions_example.png new file mode 100644 index 0000000000000000000000000000000000000000..c507f54198d893be2b5c71b90406ffd0cdf4f249 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/permissions_example.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b14c7156dd9f7411dc9a40e371cfd192329ee3eb1c221f6fd82409941f14a1e +size 12817 diff --git a/console_toolkit/sourcefiles/slides/img/permissions_example.xcf b/console_toolkit/sourcefiles/slides/img/permissions_example.xcf new file mode 100644 index 0000000000000000000000000000000000000000..00696ef2edb9b1b3a5f9fb1e10d3df1ce208a8bd --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/permissions_example.xcf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7938a6a2eb0cba8893a1408024e3d07d5da3fcebf1c8bfc243c8ed0462dcb50a +size 44825 diff --git a/console_toolkit/sourcefiles/slides/img/permissions_overview.png b/console_toolkit/sourcefiles/slides/img/permissions_overview.png new file mode 100644 index 0000000000000000000000000000000000000000..566901ad5999f1d1dd6175ca9649bf8e5a56dd5a --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/permissions_overview.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db25838669a1a7e7d61f1117c3fc9bd69ce7246071292f557227b4ba3b993ba9 +size 68185 diff --git a/console_toolkit/sourcefiles/slides/img/permissions_overview.xcf b/console_toolkit/sourcefiles/slides/img/permissions_overview.xcf new file mode 100644 index 0000000000000000000000000000000000000000..0598248b432ea92fb6fa2dd7a4f556f5ce7418fb --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/permissions_overview.xcf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3151e8ad0dc5c67b3cf5012dcd6e269e0fc5d7cef053bef117e460617c3a1c05 +size 275116 diff --git a/console_toolkit/sourcefiles/slides/img/ranger.png b/console_toolkit/sourcefiles/slides/img/ranger.png new file mode 100644 index 0000000000000000000000000000000000000000..bb865b129c503774982fe8fe558f0b77d9cfc9e4 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/ranger.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a9e49da7ff4c35a2e9c5599dea04ebba028f5666d1c9cd8690069588c8eb9be +size 323557 diff --git a/console_toolkit/sourcefiles/slides/img/ranger1.png b/console_toolkit/sourcefiles/slides/img/ranger1.png new file mode 100644 index 0000000000000000000000000000000000000000..55d8d5607af7ccf46c9e0a308605247326ba32bd --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/ranger1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77345b9068ce2b198e10f195b8b83e1a2d67e6c0c4b525c6e7c4de717439eb8e +size 94581 diff --git a/console_toolkit/sourcefiles/slides/img/ranger_img_preview.png b/console_toolkit/sourcefiles/slides/img/ranger_img_preview.png new file mode 100644 index 0000000000000000000000000000000000000000..3c0d943ae02b40e323f5f5e918d44edacd20a6f9 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/ranger_img_preview.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4085da4cc728b5c6378f550bc68934e3ceb356d467c630c5df4621d4eeb289a5 +size 536721 diff --git a/console_toolkit/sourcefiles/slides/img/ssh.png b/console_toolkit/sourcefiles/slides/img/ssh.png new file mode 100644 index 0000000000000000000000000000000000000000..5ede3da524d2be0e2da0401ce3afcd2f607afaba --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/ssh.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31684dd3263b4bf9c55603e735acb64c59a644c54b3d01ef88ef5dd4bbc574ed +size 65982 diff --git a/console_toolkit/sourcefiles/slides/img/tux.png b/console_toolkit/sourcefiles/slides/img/tux.png new file mode 100644 index 0000000000000000000000000000000000000000..89baa82449a3fa1ed118f18bef6bd7acbb31d0e0 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/img/tux.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3effae7dcf993944c78fff4d83df7a003a282f782061bdafb525ca3811ab9dab +size 152666 diff --git a/console_toolkit/sourcefiles/slides/pres.pdf b/console_toolkit/sourcefiles/slides/pres.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3de7eb5b6f4b0fbcbd0691c15c8d2b08176d4a1e --- /dev/null +++ b/console_toolkit/sourcefiles/slides/pres.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:928b32e32a94c700d37a4eaec848b27abac88a9f13f79e87fb49277e7e58a06d +size 1541811 diff --git a/console_toolkit/sourcefiles/slides/pres.tex b/console_toolkit/sourcefiles/slides/pres.tex new file mode 100644 index 0000000000000000000000000000000000000000..654cdb328b67b89e50be8b158664d598fbb017d7 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/pres.tex @@ -0,0 +1,1179 @@ +\input{template} + +\title{The Console Toolkit} +\author{Nils Leuzinger} +\institute{TheAlternative, SSC | ETHZ and UZH} +\date{HS 2020} + +\begin{document} + \begin{frame} + \titlepage% + \end{frame} + + \section{Introduction} + + \begin{frame}[t,fragile]{Why the console? It's already current year!} + \begin{itemize} + \item People asked for it + \item Still an excellent interface for complex tasks + \item Many advanced tools only available on the command line + \item Can be much faster than GUI tools + \item Allows easy remote access to other computers + \item Skills portable to every Unix-like system + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{Course outline} + \begin{columns}[T] + \column{0.5\textwidth} + \textbf{Part 1} + \begin{itemize} + \item Getting used to the console + \item Navigating the file system + \item Modifiying files + \item Working with text files + \item{Users \& permissions} + \end{itemize} + \column{0.5\textwidth} + \textbf{Part 2} + \begin{itemize} + \item{Managing software} + \item{SSH} + \item{Git} + \item{Backups} + \item{Scripting} + \end{itemize} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{What is the console} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Keyboard-only interface to your computer + \item Related terms: \emph{console}, \emph{terminal}, + \emph{shell}, \emph{bash}, \emph{command prompt}, + \emph{command line interface} + \end{itemize} + \column{0.5\textwidth} + \includegraphics[width=\columnwidth]{img/matrix.png} + \end{columns} + \end{frame} + + \section{Navigation} + + \begin{frame}[t,fragile]{The 70s were interesting times, or so I'm told} + \textbf{Unix dogma: \emph{Everything is a file!}} \\ + \begin{itemize} + \item Data files + \item Directories (or ``folders'') + \item Storage devices + \item Keyboards + \item Printers + \item Cameras + \item \emph{But not network sockets \ldots} + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{File system} + \begin{columns}[T] + \column{0.5\textwidth} + \vspace{-0.6cm} + \begin{center} + \includegraphics[width=0.4\columnwidth]{img/fs.png} + {\tiny [1]} + \end{center} + \column{0.5\textwidth} + \begin{itemize} + \item File system organized as tree + \item Everything under \texttt{/}, the root directory + \item In the console, you will be at some point in the tree, + the \emph{working directory} + \end{itemize} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Working directory} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Where am I? \textrightarrow \: \texttt{pwd} + \item \underline{P}resent \underline{w}orking \underline{d}irectory + \item Also sometimes directly shown in the prompt + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ pwd +/home/luke +[luke@host ~]$ + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Listing files} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item What is in here? \textrightarrow \: \texttt{ls} + \item \emph{list} + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ ls +§\textcolor{dirblue}{Desktop}§ +§\textcolor{dirblue}{Documents}§ +§\textcolor{dirblue}{Downloads}§ +§\textcolor{dirblue}{Music}§ +§\textcolor{dirblue}{Pictures}§ +§\textcolor{dirblue}{Videos}§ +cat1.jpg +cat2.jpg +[luke@host ~]$ + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Commands \& arguments} + \vspace{0.5cm} + \texttt{\tikzmark{a}{l}s \tikzmark{b}{-}a + \tikzmark{c}{-}-human-readable \tikzmark{d}{/}home/luke/pictures}\\ + \begin{tikzpicture}[remember picture,overlay] + \node[align=left,xshift=0.4cm,yshift=-1.0cm,rounded corners, + fill=red!20,draw=red!70!black] (b1) + {\footnotesize{command}}; + \draw[red!70!black,->] (b1) edge ([yshift=-0.05cm,xshift=7.0pt]a.south); + + \node[align=left,xshift=3.0cm,yshift=-2.3cm,rounded corners, + fill=green!20,draw=green!70!black] (b2) + {\footnotesize{single letter option}}; + \draw[green!70!black,->] (b2) edge ([yshift=-0.05cm,xshift=9.5pt]b.south); + + \node[align=left,xshift=3.7cm,yshift=-0.7cm,rounded corners, + fill=green!20,draw=green!70!black] (b3) + {\footnotesize{long option}}; + \draw[green!70!black,->] (b3) edge ([yshift=-0.05cm,xshift=1.5cm]c.south); + + \node[align=left,xshift=6.7cm,yshift=-0.7cm,rounded corners, + fill=orange!40,draw=orange!70!black] (b4) + {\footnotesize{arguments}}; + \draw[orange!70!black,->] (b4) edge ([yshift=-0.05cm,xshift=1.7cm]d.south); + \end{tikzpicture} + \end{frame} + + \begin{frame}[t,fragile]{Advanced listing} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item \texttt{ls} has advanced options + \item \texttt{-a}: show hidden files + \item \texttt{-h}: print numbers in human readable format + \item \texttt{-l}: show the long output format. + \item \texttt{ls -lah} and \texttt{ls -l -a -h} are + equivalent + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\tiny] +[luke@arch-x270 ~]$ ls -lah +total 52K +drwx------ 8 luke luke 4.0K Sep 3 23:27 . +drwxr-xr-x 4 root root 4.0K Sep 3 23:26 .. +-rw-r--r-- 1 luke luke 21 Jun 4 10:54 .bash_logout +-rw-r--r-- 1 luke luke 57 Jun 4 10:54 .bash_profile +-rw-r--r-- 1 luke luke 141 Jun 4 10:54 .bashrc +-rw-r--r-- 1 luke luke 0 Sep 3 23:27 cat1.jpg +-rw-r--r-- 1 luke luke 0 Sep 3 23:27 cat2.jpg +drwxr-xr-x 2 luke luke 4.0K Sep 3 23:27 §\textcolor{dirblue}{Desktop}§ +drwxr-xr-x 2 luke luke 4.0K Sep 3 23:27 §\textcolor{dirblue}{Documents}§ +drwxr-xr-x 2 luke luke 4.0K Sep 3 23:27 §\textcolor{dirblue}{Downloads}§ +-rw-r--r-- 1 luke luke 24 Sep 3 23:28 .hidden_file +drwxr-xr-x 2 luke luke 4.0K Sep 3 23:27 §\textcolor{dirblue}{Music}§ +drwxr-xr-x 2 luke luke 4.0K Sep 3 23:27 §\textcolor{dirblue}{Pictures}§ +-rw-r--r-- 1 luke luke 3.7K Oct 23 2017 .screenrc +drwxr-xr-x 2 luke luke 4.0K Sep 3 23:27 §\textcolor{dirblue}{Videos}§ +[luke@arch-x270 ~]$ + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Getting help} + \begin{itemize} + \item Where can I find out what options are available? + \item Manual pages! + \item \texttt{man} + \item E.g.: \texttt{man ls} + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{} + \begin{bashenv}[\tiny] +LS(1) User Commands LS(1) + +NAME + ls - list directory contents + +SYNOPSIS + ls [OPTION]... [FILE]... + +DESCRIPTION + List information about the FILEs (the current directory by default). Sort entries alphabeti- + cally if none of -cftuvSUX nor --sort is specified. + + Mandatory arguments to long options are mandatory for short options too. + + -a, --all + do not ignore entries starting with . + + -A, --almost-all + do not list implied . and .. + + --author + with -l, print the author of each file + + -b, --escape + print C-style escapes for nongraphic characters + \end{bashenv} + \end{frame} + + \begin{frame}[t,fragile]{More on manual pages} + \begin{itemize} + \item{Search by typing \keys{/}} + \item{Quit by typing \keys{q}} + \item{Sometimes there are multiple manuals! \textrightarrow \: Choose the right section} + \begin{itemize} + \item{\texttt{man 1 printf} vs. \texttt{man 3 printf}} + \end{itemize} + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{Go somewhere else} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item I want to go to some other directory! \textrightarrow \: \texttt{cd} + \item \emph{Change directory} + \item Absolute path: Whole path from the root, like: + \texttt{/home/luke/pictures/cat1.png} + \item Relative path: Path relative to the current working + directory, like \texttt{pictures/cat1.png} + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ cd +[luke@host ~]$ pwd +/home/luke +[luke@host ~]$ cd /sys +[luke@host sys]$ pwd +/sys +[luke@host sys]$ cd ~ +[luke@host ~]$ pwd +/home/luke +[luke@host ~]$ cd pictures/ +[luke@host pictures]$ pwd +/home/luke/pictures + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Special places} + \begin{itemize} + \item{\makebox[1.3cm]{\:\texttt{\textasciitilde\hfill}}User's home directory} + \item{\makebox[1.3cm]{\:\texttt{. }\hfill}The current directory} + \item{\makebox[1.3cm]{\:\texttt{..}\hfill}The directory above in the tree} + \end{itemize} + \end{frame} + + \section{Modifiying files} + + \begin{frame}[t,fragile]{Copying files} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Copy command: \texttt{cp} + \item Syntax: \texttt{cp source destination} + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ cp diary diary_copy +[luke@host ~]$ cat diary_copy +Dear diary, today I downloaded +cat pictures from the internet. +[luke@host ~]$ + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Moving files} + \begin{columns}[T] + \column{0.47\textwidth} + \begin{itemize} + \item Move command: \texttt{mv} + \item Syntax: \texttt{mv source destination} + \item Use \texttt{mv} to rename files + \end{itemize} + \column{0.53\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ mv diary secret_diary +[luke@host ~]$ cat secret_diary +Dear diary, today I downloaded +cat pictures from the internet. +[luke@host ~]$ + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Creating and deleting directories} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item \texttt{mkdir} creates a new directory + \item \texttt{rmdir} removes a directory + \item \texttt{rmdir} only works for empty directories! + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ mkdir new_dir +[luke@host ~]$ ls +§\textcolor{dirblue}{new\_dir}§ +[luke@host ~]$ rmdir new_dir +[luke@host ~]$ ls +[luke@host ~]$ + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Deleting files} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item \texttt{rm} removes files and directories + \item \texttt{rm -r} removes a directory and everything in it + \emph{(recurisive)} + \item \texttt{rm} is \textcolor{red}{irreversible!} + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ ls +cat1.jpg +cat2.jpg +[luke@host ~]$ rm cat1.jpg +[luke@host ~]$ ls +cat2.jpg + \end{bashenv} + \end{columns} + \vspace{0.7cm} + \begin{WarningBox} + \texttt{rm} is a shotgun without safety! There is no trashcan. + You can delete your entire file system with \texttt{sudo rm -rf /}, + or your entire home directory with \texttt{rm -rf \textasciitilde}\:!% + \end{WarningBox} + \end{frame} + + \begin{frame}[t,fragile]{Hidden files} + \begin{itemize} + \item{Hidden files start with a dot} + \item{\texttt{.hidden\_file}} + \item{Show them using \texttt{ls -a}} + \end{itemize} + \end{frame} + + \section{Text files} + + \begin{frame}[t,fragile]{Showing text files} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Output a file's contents to the console with + \texttt{cat} + \item Used to stand for \emph{concatenate} + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ cat diary +Dear diary, today I downloaded +cat pictures from the internet. +[luke@host ~]$ + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Reading long files} + \begin{itemize} + \item What if the text doesn't fit on the terminal? + \item Use the \texttt{less} file viewer + \item Scroll up and down with \keys{\arrowkeyup}, \keys{\arrowkeydown} + \item Exit with \keys{q} + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{Editing files} + \begin{itemize} + \item Need a \emph{text editor}! + \item \emph{nano, vim, vis, emacs} + \item Simple, intuitive, no learning required? \textrightarrow\:\texttt{nano} + \item Powerful, efficient and extreme nerd cred? \textrightarrow\:\texttt{vim} + \item Obscure, eccentric and even more powerful? \textrightarrow\:\texttt{emacs} + \item Has some advantages to using a big GUI tool + \begin{itemize} + \item Navigation and editing in the same interface + \item Quick and efficient + \item Very powerful tools available + \item You can talk down on people using Notepad++ + \end{itemize} + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{Nano} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Syntax: \texttt{nano [filename]} + \item Key bindings shown on the bottom + \item Save: \keys{\ctrl} + \keys{o} + \item Save: \keys{\ctrl} + \keys{x} + \item Navigate with arrow keys \keys{\arrowkeyleft} + \keys{\arrowkeydown} \keys{\arrowkeyup} + \keys{\arrowkeyright} + \item \texttt{\textasciicircum} stands for the \keys{\ctrl} key (universal) + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\scriptsize] +[luke@host ~]$ nano diary.txt + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{} + \begin{bashenv}[\scriptsize] +~ +~ VIM - Vi IMproved +~ +~ version 8.1.333 +~ by Bram Moolenaar et al. +~ Vim is open source and freely distributable +~ +~ Become a registered Vim user! +~ type :help register<Enter> for information +~ +~ type :q<Enter> to exit +~ type :help<Enter> or <F1> for on-line help +~ type :help version8<Enter> for version info +~ +~ Running in Vi compatible mode +~ type :set nocp<Enter> for Vim defaults +~ type :help cp-default<Enter> for info on this +~ +~ + \end{bashenv} + \end{frame} + + \section{Users \& permissions} + + \begin{frame}[t,fragile]{Users \& permissions} + \begin{itemize} + \item{Linux is a \emph{multi-user operating system}} + \item{There can be many user accounts} + \item{Different users can even use the computer at the same time!} + \item{You usually only use your personal user account} + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{Users} + \begin{columns}[T] + \column{0.5\textwidth} + \textbf{Personal user} + \begin{itemize} + \item{Home directory in \texttt{/home/userx}} + \item{Can only access files in home directory} + \item{Can only stop processes started by itself} + \end{itemize} + \column{0.5\textwidth} + \textbf{Root user} + \begin{itemize} + \item{Also \emph{called the superuser}} + \item{''System administrator``} + \item{Can do anything on the system} + \item{Access to all files} + \item{Can kill any process} + \item{Home directory in \texttt{/root}} + \end{itemize} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Unix file permissions} + \vspace{0.7cm} + \begin{center} + \includegraphics[width=1.0\textwidth]{img/permissions_overview.png} + \end{center} + \end{frame} + + \begin{frame}[t,fragile]{Permissions} + \begin{columns}[T] + \column{0.5\textwidth} + \includegraphics[width=1.0\columnwidth]{img/permissions_example.png} + \column{0.5\textwidth} + \begin{itemize} + \item \texttt{r}: Permission to read file + \item \texttt{w}: Permission to write to file + \item \texttt{x}: Permission to execute file + \end{itemize} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Changing permissions} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{bashenv}[\small] +chmod {u,g,a}{+,-}{r,w,x} file +chown OWNER:GROUP file + \end{bashenv} + \vspace{0.65cm} + \begin{bashenv}[\small] +chmod +x program.sh +chmod u-x program.sh +chmod g+rw file.txt +chown luke:luke file.txt + \end{bashenv} + \column{0.5\textwidth} + \begin{itemize} + \item \texttt{chmod}: Change permissions + \item \texttt{chown}: Change owner, group + \vspace{0.8cm} + \item Allow everyone to execute + \item Remove execution permission for user + \item Allow group to read/write + \item Change ownership to user \texttt{luke}, group \texttt{luke} + \end{itemize} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Octal permissions} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{bashenv}[\small] +chmod 744 program.sh + \end{bashenv} + \begin{itemize} + \item \texttt{4: read} + \item \texttt{2: write} + \item \texttt{1: execute} + \end{itemize} + \column{0.5\textwidth} + \begin{itemize} + \item Octal representation allows setting all permissions in one go + \item Desired permissions are added up + \item \texttt{7 = read + write + execute} + \end{itemize} + \end{columns} + \end{frame} + + \section{Meta} + + \begin{frame}[t,fragile]{Tab completion} + \begin{itemize} + \item Hit \keys{\tab} to automatically complete a word you are typing + (Command, file, ...) + \item Hit \keys{\tab} twice to show all possible options + \item Extremely useful terminal feature! Use always! + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{Command History} + \begin{itemize} + \item Scroll up in your command history by pressing the + \keys{\arrowkeyup} key + \item Press \keys{\ctrl} + \keys{r} to search the history + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{Killing a running process} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Every process has a unique ID on Linux + \item View processes with \texttt{ps aux} + \item Kill a process with \texttt{kill id} + \item If ID is unknown, use \texttt{pkill name} + \item The \texttt{-9} flag works like a shotgun + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ ps -e +PID TTY TIME CMD +1 ? 00:00:04 systemd +2 ? 00:00:00 kthreadd +[luke@host ~]$ kill 16740 +[luke@host ~]$ pkill -9 emacs + \end{bashenv} + \end{columns} + \end{frame} + + \section{PATH} + + \begin{frame}[t,fragile]{The PATH variable} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item How does the shell know where programs are? + \item The shell searches the \texttt{PATH} variable + \item \texttt{ls} \textrightarrow \: \texttt{/usr/bin/ls} + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ echo $PATH +/usr/sbin:/usr/bin + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Adding your own paths} + \begin{itemize} + \item Let's say you want to add your script directory + \item Temporarily: \texttt{export PATH=\$PATH:\textasciitilde/scripts} + \item Permanently: Add the above to \texttt{\textasciitilde/.bashrc} + \end{itemize} + \end{frame} + + \begin{frame}[t, fragile]{Writing shell scripts} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Scripts are just a sequence of commands + \item Very easy automation! + \begin{itemize} + \item (for more, come to the Bash course) + \end{itemize} + \end{itemize} + \column{0.5\textwidth} + File \texttt{~/scripts/music.sh}: + \begin{bashenv}[\scriptsize] +#!/usr/bin/env bash +filename="$2.%(ext)s" +echo "$1" +youtube-dl -x "$1" -o "$filename" + \end{bashenv} + \end{columns} + \vspace{0.5cm} + \begin{bashenv}[\scriptsize] +[luke@host ~]$ cd scripts +[luke@host ~]$ chmod +x music.sh +[luke@host ~]$ ~/scripts/music.sh "https://www.youtube.com/watch?v=dQw4w9WgXcQ" music +# or: +[luke@host ~]$ ./music.sh "https://www.youtube.com/watch?v=dQw4w9WgXcQ" music + \end{bashenv} + \end{frame} + + \section{Piping and Redirection} + + \begin{frame}[t, fragile] + \frametitle{Complicated needs} + How would you design an interface that can... + \begin{itemize} + \item ...delete files larger than 100MB? + \item ...show the last 2 lines of a file? + \item ...sort files by length? + \item ...search calendar entries and create reminders? + \end{itemize} + \end{frame} + + \begin{frame}[t, fragile] + \frametitle{Complicated needs} + Many possible answers: + \begin{itemize} + \item Big GUI that does everything + \item A simple tool that users can extend themselves + \item Domain specific language that users write queries with + \item Many simple and combinable tools + \end{itemize} + Unix chooses the last two approaches + \end{frame} + + \begin{frame}[t, fragile] + \frametitle{Piping and redirection} + \begin{itemize} + \item Unix has small and orthogonal tools + \item Piping and redirection are how to combine them + \end{itemize} + \end{frame} + + + \begin{frame}[t, fragile] + \frametitle{Piping and redirection} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Piping sends output from one command to another command + \item Redirection writes to files (streams) + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\scriptsize] +[luke@host ~]$ cat numbers | sort +five +four +one +three +two +zero + \end{bashenv} + \begin{bashenv}[\scriptsize] +[luke@host ~]$ cat numbers > same_numbers + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t, fragile] + \frametitle{Piping} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Uses the pipe symbol: \texttt{|} + \item Useful for sequential composition + \item Only works in "one direction" + \item Internally connects output of one process to output of other process + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\scriptsize] +[luke@host ~]$ cat numbers | tail -n 2 +nine +ten + \end{bashenv} + \begin{bashenv}[\scriptsize] +[luke@host ~]$ cat numbers | grep "..." +one +two +six +ten + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t, fragile] + \frametitle{Piping} + + List unique owners of files in current directory: + \begin{itemize} + \item List files in directory + \item Omit first two lines + \item Truncate whitespace + \item Cut (delete) all columns except the third + \item Sort alphabetically + \item Only show unique entries + \end{itemize} + \vspace{0.1cm} + \begin{bashenv}[\scriptsize] +[luke@host ~]$ ls -l | tail -n +2 | sed 's/\s\s*/ /g' | cut -d ' ' -f 3 | sort | uniq + \end{bashenv} + \end{frame} + + \begin{frame}[t, fragile] + \frametitle{Redirection} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item{\makebox[1.7cm]{\:\texttt{> file\hfill}}} Write output to file + \item{\makebox[1.7cm]{\:\texttt{>\hspace{0cm}> file\hfill}}} Append output to file + \item{\makebox[1.7cm]{\:\texttt{< file\hfill}}} Read input from file + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ echo "Hello!" > hello.txt +[luke@host ~]$ cat hello.txt +Hello World! +[luke@host ~]$ cat < hello.txt +Hello World! + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t, fragile] + \frametitle{Redirection} + Redirection is useful! + \begin{itemize} + \item Store final or intermediate results + \item Append output to files + \end{itemize} + \vspace{0.3cm} + \begin{bashenv}[\scriptsize] +[luke@host ~]$ ls -l | tail -n +2 | sed 's/\s\s*/ /g' > result +[luke@host ~]$ cut -d ' ' -f 3 < result | sort | uniq + \end{bashenv} + \end{frame} + + \begin{frame}[t, fragile] + \frametitle{Redirection} + Redirection is useful! (cont.) + \begin{itemize} + \item Store final or intermediate results + \item Append output to files + \end{itemize} + \vspace{0.3cm} + \begin{bashenv}[\scriptsize] +[luke@host ~]$ ./logger_script >> log.txt + +[luke@host ~]$ echo "Logging done!" >> log.txt + \end{bashenv} + \end{frame} + + \section{Ranger} + + \begin{frame}[t, fragile] + \frametitle{Ranger} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item File manager on the console + \begin{itemize} + \item Usable over SSH + \end{itemize} + \item Can move files, change permissions, bulk rename... + \item Bookmarks + \item Keyshortcuts for frequent locations + \item Plugins + \item Preview functionality + \end{itemize} + \column{0.5\textwidth} + \includegraphics[width=1.0\columnwidth]{img/ranger1.png} + \end{columns} + \end{frame} + + \begin{frame}[t, fragile] + \frametitle{Ranger image preview} + \begin{center} + \includegraphics[width=0.9\textwidth]{img/ranger_img_preview.png} + \end{center} + \end{frame} + + + \section{Managing software} + + \begin{frame}[t,fragile]{How you get software on Linux} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Don't download installers from the internet! + \item Software is managed by the distribution and available + through a central repository. + \item Software is \emph{packaged} + \item Similiar to Microsoft's or Apple's app stores + \end{itemize} + \column{0.5\textwidth} + \vspace{-1cm} + \begin{center} + \includegraphics[width=0.7\columnwidth]{img/package-icon.pdf} + {\tiny [2]} + \end{center} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Installing packages} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Depends on distribution! + \item Package Manager is most important feature of a + Linux distribution + \end{itemize} + \column{0.5\textwidth} + Debian, Ubuntu, Mint: + \begin{bashenv}[\small] +sudo apt install firefox + \end{bashenv} + OpenSUSE: + \begin{bashenv}[\small] +sudo zypper install firefox + \end{bashenv} + RedHat, Fedora: + \begin{bashenv}[\small] +sudo dnf install firefox + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Searching for packages} + \begin{columns}[T] + \column{0.5\textwidth} + Debian, Ubuntu, Mint: + \begin{bashenv}[\small] +apt search firefox + \end{bashenv} + OpenSUSE: + \begin{bashenv}[\small] +zypper search firefox + \end{bashenv} + RedHat, Fedora: + \begin{bashenv}[\small] +dnf search firefox + \end{bashenv} + \column{0.5\textwidth} + \begin{itemize} + \item The basic package search is usually quite limited + \item Consult the internet for finding the right programs! + \end{itemize} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Updating packages} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item All packages can be upgraded at once + \item Do this every other week! + \end{itemize} + \column{0.5\textwidth} + Debian, Ubuntu, Mint: + \begin{bashenv}[\small] +sudo apt update +sudo apt upgrade + \end{bashenv} + OpenSUSE: + \begin{bashenv}[\small] +sudo zypper update + \end{bashenv} + RedHat, Fedora: + \begin{bashenv}[\small] +sudo dnf update + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Building from source} + \begin{itemize} + \item Sometimes software is unavailable in the repositories + \item Can download sources and compile them manually + \item Careful! No automatic updates, malware, package manager + conflicts, \ldots + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{Building from source} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Download the sources + \item Follow the build instructions in the documentation + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +git clone https://github.com/i3/i3 + \end{bashenv} + \begin{bashenv}[\small] +autoreconf -fi + \end{bashenv} + \begin{bashenv}[\small] +mkdir -p build && cd build + \end{bashenv} + \begin{bashenv}[\small] +../configure + \end{bashenv} + \begin{bashenv}[\small] +make + \end{bashenv} + \end{columns} + \end{frame} + + \section{SSH} + + \begin{frame}[t,fragile]{SSH} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item \emph{Secure shell} + \item SSH allows to log in to another computer over the network + \item Server administration, running jobs on supercomputers, + log in to your computer at home + \end{itemize} + \column{0.5\textwidth} + \begin{center} + \includegraphics[width=0.6\columnwidth]{img/ssh.png} + \end{center} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Logging in to Euler (cluster)} + \begin{bashenv}[\tiny] +[luke@host ~]$ ssh lutobler@euler.ethz.ch +Last login: Tue Sep 4 00:06:01 2018 from vpn-global-125-dhcp.ethz.ch + + ____________________ ___ + / ________ ___ /__/ / + / _____/ / / / ___ / + /_______/ /__/ /__/ /__/ + Eidgenoessische Technische Hochschule Zuerich + Swiss Federal Institute of Technology Zurich + ------------------------------------------------------------------------- + E U L E R C L U S T E R + + + https://scicomp.ethz.ch + http://tinyurl.com/cluster-support + cluster-support@id.ethz.ch + + ========================================================================= + \end{bashenv} + \end{frame} + + \begin{frame}[t,fragile]{Using SSH} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item \texttt{ssh alice@bob.ch} + \item Will ask for user password + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +[luke@host ~]$ ssh alice@bob.ch +alice@bob.ch's password: +[alice@bob ~]$ + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Login without password} + \vspace{0.5cm} + Generate an SSH key with \texttt{ssh-keygen} and copy the + key in \texttt{\textasciitilde/.ssh/id\_rsa.pub} to + \texttt{\textasciitilde/.ssh/authorized\_keys} on the server.\\ + \vspace{0.5cm} + Neat key copying trick when password login already works: + \vspace{0.2cm} + \begin{bashenv}[\scriptsize] +cat ~/.ssh/id_rsa.pub | ssh username@euler.ethz.ch 'cat - >> .ssh/authorized_keys' + \end{bashenv} + \end{frame} + + \section{Version control} + + \begin{frame}[fragile]{Git} + \begin{center} + \includegraphics[width=0.3\textwidth]{img/git_logo.png} + {\tiny [4]} + \end{center} + \end{frame} + + \begin{frame}[t,fragile]{Git} + \begin{itemize} + \item{\texttt{thesis.pdf}} + \item{\texttt{thesis\_old.pdf}} + \item{\texttt{thesis\_copy.pdf}} + \item{\texttt{thesis\_finalversion.pdf}} + \item{\texttt{thesis\_finalversion2.pdf}} + \end{itemize} + \end{frame} + + \begin{frame}[fragile]{Git} + \emph{Git is a version-control system for tracking changes in computer files + and coordinating work on those files among multiple people.} \\ + \hspace{10cm}--- Wikipedia + \end{frame} + + \begin{frame}[fragile]{Git} + \begin{center} + \includegraphics[width=0.8\textwidth]{img/git_branches.png} + {\tiny [3]} + \end{center} + \end{frame} + + \begin{frame}[t,fragile]{Git} + \begin{itemize} + \item{Track changes to your code} + \item{Comment your changes} + \item{Easily revert back to older versions} + \item{Avoid/manage conflicts when working in teams} + \item{Manage release versions and development versions} + \item{Work on different branches at the same time} + \end{itemize} + \end{frame} + + \begin{frame}[t,fragile]{Git example} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item{Initialize a git repository} + \item{Add files you want to include in a commit} + \item{Create a commit for your selected changes} + \item{Push changes to server} + \end{itemize} + \column{0.5\textwidth} + \begin{bashenv}[\small] +git init + \end{bashenv} + \begin{bashenv}[\small] +git add changed_file.txt + \end{bashenv} + \begin{bashenv}[\small] +git commit + \end{bashenv} + \begin{bashenv}[\small] +git push + \end{bashenv} + \end{columns} + \end{frame} + + \begin{frame}[t,fragile]{Sharing a repository} + \begin{itemize} + \item{You can use services like \emph{Github} or \emph{Gitlab} to collaborate + with others on your project} + \item{Or host your repositories yourself!} + \begin{itemize} + \item{You can pull from/push to any server you can access via SSH} + \end{itemize} + \end{itemize} + \end{frame} + + \section{Backup} + \begin{frame}[t, fragile]{Borg Backup} + \begin{columns}[T] + \column{0.5\textwidth} + \begin{itemize} + \item Backup data + \item Does compression and deduplication automatically + \item Possibility to encrypt + \item Runs over ssh, network storage etc. + \end{itemize} + \column{0.5\textwidth} + \begin{center} + \includegraphics[width=0.6\columnwidth]{img/borg_logo.png} + \vspace{2cm} + \end{center} + \end{columns} + \end{frame} + + \begin{frame}[t, fragile]{Borg Example} + \vspace{0.5cm} + \begin{itemize} + \item Repos are collections of backups + \item Create new backups with \texttt{borg create} + \item Restore files with \texttt{borg extract <archive>} + \end{itemize} + \vspace{0.5cm} + \begin{bashenv}[\scriptsize] +[luke@host ~]$ borg init --encryption=repokey /path/to/repo +Enter passphrase: +Repeat passphrase: +[luke@host ~]$ borg create /path/to/repo +[luke@host ~]$ borg create --stats /path/to/repo::Backup1 ~/dir_to_backup +[luke@host ~]$ borg create --stats /path/to/repo::Backup2 ~/dir_to_backup +[luke@host ~]$ borg extract /path/to/repo::Backup1 + \end{bashenv} + \vspace{0.5cm} + \end{frame} + + \section{Epilogue} + + \begin{frame}[t,fragile]{Sources} + \footnotesize + \begin{itemize} + \item[1] \url{https://commons.wikimedia.org/wiki/File:Linux_Filesystem_Hierarchy_Standard.png} + \item[2] \url{https://en.wikipedia.org/wiki/File:Gnome-emblem-package.svg} + \item[3] \url{https://commons.wikimedia.org/wiki/File:OneFlow_Example.png} + \item[4] \url{https://git-scm.com/images/logos/logomark-orange@2x.png} + \end{itemize} + \end{frame} + + % \begin{frame}[t,fragile]{INSERT TITLE} + % \begin{columns}[T] + % \column{0.5\textwidth} + % \column{0.5\textwidth} + % \end{columns} + % \end{frame} + +\end{document} diff --git a/console_toolkit/sourcefiles/slides/template.tex b/console_toolkit/sourcefiles/slides/template.tex new file mode 100644 index 0000000000000000000000000000000000000000..d8830dba88e01c7d4c43cb09491127e257898024 --- /dev/null +++ b/console_toolkit/sourcefiles/slides/template.tex @@ -0,0 +1,81 @@ +\documentclass[aspectratio=169]{beamer} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{listings} +\usepackage{xcolor} +\usepackage{hyperref} +\usepackage{graphicx} +\usepackage{textcomp} +\usepackage{tikz} +\usepackage{tcolorbox} +\usepackage{menukeys} +\usepackage{pdfpages} + +\tcbuselibrary{listings} + +\usefonttheme[onlymath]{serif} + +\usecolortheme[RGB={37,68,113}]{structure} +\usetheme{Dresden} + +\setbeamertemplate{headline}{} + +% generic colors +\definecolor{dirblue}{HTML}{9bc1ff} + +% TheAlternative colors +\definecolor{ldorange}{HTML}{F18A20} +\definecolor{ldblue}{HTML}{254471} + +%Apply TheAlt colors to theme +\setbeamercolor{section in head/foot}{fg=ldorange} +\setbeamercolor{author in head/foot}{fg=white} +\setbeamercolor{subsection in head/foot}{fg=white} +\setbeamercolor{caption name}{fg=vlg} +\setbeamercolor{caption}{fg=vlg} +\setbeamercolor{frametitle}{fg=ldblue} +\setbeamercolor{title}{fg=ldorange} +\setbeamercolor{institute}{fg=ldblue} +\setbeamertemplate{itemize item}[circle] +\setbeamercolor{itemize item}{fg=ldorange} + +% make including pdfs work +\setbeamercolor{background canvas}{bg=} + +\setbeamerfont{title}{series=\bfseries} + +\setbeamertemplate{caption}{\raggedright\insertcaption\par} +\setbeamertemplate{navigation symbols}{} +\setbeamertemplate{bibliography item}[text] + +% white-on-black lstlisting env with rounded corners +\newenvironment{bashenv}[1][\small]{% + \tcblisting{listing only,colback=black,colframe=black, + enlarge top by=0mm,left=-0mm,top=-2mm,bottom=-2mm, + listing options={language=bash, + escapechar=§, + basicstyle=#1\color{white}\ttfamily, + commentstyle=#1\color{white}\ttfamily, + backgroundcolor=\color{black}, + breaklines=true, + keepspaces=true, + showstringspaces=false, + columns=fullflexible}}} +{\endtcblisting} + +% mark a spot for e.g. drawing an arrow to it +\newcommand\tikzmark[1]{\tikz[remember picture,overlay]\node[inner xsep=0pt](#1){};} + +% \newcommand\Warning{% +% \makebox[1.4em][c]{\raisebox{-0.45em}{% +% \makebox[0pt][c]{\raisebox{0.25em}{\large!}}% +% \makebox[0pt][c]{\color{red}\Huge$\bigtriangleup$}}}% +% \hspace{0.7em}% +% } + +% a red warning box +\definecolor{lred}{HTML}{ffd6dd} +\newtcolorbox{WarningBox}{% + colframe=red, + colback=lred} + diff --git a/vimcourse_nils_2020/vimcourse_nils2020.odp b/vimcourse_nils_2020/vimcourse_nils2020.odp new file mode 100644 index 0000000000000000000000000000000000000000..66aecaffe9704bc75c76ab276ac58edeebafd96f Binary files /dev/null and b/vimcourse_nils_2020/vimcourse_nils2020.odp differ