Master of Magic's Motto

"Every beginning is difficult, but only the bravest reach for their power."

Starting the Linux Adventure - Preparing for Gentoo Installation

Greetings, young mages!

First of all, do not be intimidated by the amount of text in today's Chapter, but to turn an ordinary sorcerer into a true Witcher, one must acquire solid foundations, which is why at the beginning I will explain every spell and gesture in detail. Future meetings will not be as detailed in descriptions but more concise and focused on strategic spellcasting. To start your Linux adventure, follow these steps to prepare a bootable USB or CD for Gentoo Linux installation:

  1. Download the ISO image:
    • If you want to perform the installation on a virtual machine or use a second computer (tablet, phone), download the Arch Linux ISO.
    • If you want to install Gentoo on the same computer where you will be learning black magic, download a distribution with a graphical environment that will help you follow the instructions during installation.
    • Requirements: For a direct installation on a computer (without a VM), you need a 4GB or larger USB drive.
    • Visit gentoo.org, archlinux.org or NeonKDE
    • Find the "Download" section and click the latest ISO image to download the file.

Attention!
What to choose?

Remember that experimenting with operating systems can result in complete data loss! In Linux, you are the master of the underworld, so one careless typo and you can wipe your hard drives. There are also tools that can help you recover them, but we will get to that in the future, and now you need to install the system somewhere.
  1. Installation in a VM:
    • 99% of you have a Windows computer, so the safest option is to use a virtual machine. Below I have shown you a brief description of how to run QEMU where you can experiment with spells, but you can use any virtualization system such as VirtualBox or VMWare, but this option is very slow because the computer has to handle two operating systems.
    • If you have a second computer at your disposal where you are not afraid to experiment, this option is the best and most convenient.
    • In Linux, USB block devices are located in the /dev/ directory and named sd.. followed by sequential letters - sda, sdb, sdc, etc... As I hope you know, disks can be divided into partitions, but the physical device is the disk, not the partition. A partition is a logical device.
      Partitions in Linux are numbered sequentially after the letter, for example:
      /dev/sda1, /dev/sda2...
      /dev/sdb1, /dev/sdb2... ..., /dev/sdb78
      /dev/sdc
      ...
      ...
      Graphically, it looks something like this:

      Screenshot from gparted

      The difference is that my disk is not connected to a serial bus (SATA and SCSI disks) but to a PCIe bus, so the system names them differently, usually "nvme", and the naming convention is similar:
      nvme0n1p1 - the first partition of the first disk connected to the first controller (numbering starts from 0)
      nvme1n1p5 - the fifth partition of the first disk connected to the second controller.
      The downloaded ISO image is an image of a device (some data carrier on which someone previously prepared a bootable system). Bootable, meaning one from which you can start the computer.
      When you restore (write) the downloaded ISO image, you restore the device image to another device - your USB drive. Your USB drive likely has one partition, and the system detects it as /dev/sda1. But since you are restoring the image of the entire device, you restore it to the entire device /dev/sda, not to the partition /dev/sda1.
      How to check the name of your USB drive?
      The easiest way is to look in the /dev directory - this is the directory where all system device files are located. We will discuss the /dev directory and the system tree later, but now you need to check which letter your USB drive has been assigned.

      cd /dev
      Remove the USB drive from the computer and go to the /dev directory. Here we learn the first command "cd" - change directory, which allows us to navigate between directories, and from now on it will be familiar to you.
      ls -l sd*
      The "ls" (list) spell displays the contents of a directory. This command (like most Linux commands) has parameters. You can see the list of parameters by typing ls --help. --help is a standard parameter, and if the program is not some punk invention written in a basement under a blanket, the --help parameter will work.
      Here we also need to pay attention to "-" and "--". Command parameters have short and long versions. For short versions, a single "minus" is used, for example, "ls -ar" means the same as "ls --all --reverse"
      The "ls" spell will list the contents of the /dev directory.
      The "-l" parameter will force a long output format, meaning it will format the command output as a list.
      "sd*" will limit the result to file names starting with "sd", and the asterisk replaces all characters.
      You can type all three versions of the command one by one to see the difference.
      So, remove the USB drive from the port and type:
      ls -l sd*
      And see which devices are visible in your system. If you don't have any sd* devices, the command will display a message that there is no such file or directory.
      Then reinsert the USB drive and type the same command again. This time, a new device should appear, which is your USB drive, and this name must be provided as the "of" parameter of the "dd" command.
      We will discuss the "dd" command itself later.

  2. Create a bootable drive:
    • On Windows: Use Rufus to create a bootable USB drive:
      • Select the ISO file and your USB drive.
      • Click Start and wait for the process to complete.
    • On macOS/Linux: Use the dd command in the terminal:
    • !!!! Attention. Linux is case-sensitive !!! Now go to the directory where you downloaded the ISO:
      cd ~/Downloads
      or cd ~/Desktop - just go to the directory where you downloaded the ISO. Here are some more magical commands and gestures:
      pwd
      This command shows the current directory you are in.
      TAB (press the tab key)
      Check how the tab key works in bash - it is a very helpful gesture. Commands work better with a wand, and the shell works better with the tab key. The tab key "completes" or lists (casts the "ls" spell), which significantly speeds up work. For example:
      
      cd /home/tom/Downloads - we go to the "Downloads" directory in the home directory of the user "tom"
      ls - list the contents of the "Downloads" directory
                               ==> here we see the list of items in Downloads and type the command:
      dd if=[TAB] - press the tab key, and after pressing [TAB] we will see the result of the ls command, then continue typing:
      dd if=ar[TAB] - press [TAB] again, and at this point, all files starting with "ar" will be displayed, and if there is only one, its name will be automatically inserted into the command line, and we will get something like this:
      dd if=archlinux-2025.02.01-x86_64.iso - now we can continue typing the command:
      dd if=archlinux-2025.02.01-x86_64.iso of=/dev/sdX bs=4M status=progress
      
      We will discuss what the above commands mean later, but now we need a runtime environment, so for now, just open the terminal (the black window of black magic), insert your USB drive into the computer (i.e., into the USB port ;)), find its name, and type in the terminal what is below.
    • Replace X in /dev/sdX with the name of your USB device, i.e., /dev/sda or /dev/sdb, c, d...

    • Be careful!
      Make sure you select the correct device!
      sudo dd if="path and name of the downloaded ISO image" of=/dev/sdX bs=4M status=progress

    • Boot from the drive:
      • Restart your computer and enter the BIOS/UEFI (usually by pressing F2, F9, F12, Del or Esc during startup). If you don't know, check online which key to press during startup to enter the BIOS.
      • On some computers, especially newer ones, you may need to disable "Secure boot" [SB]. SB in theory is a very good option that prevents unauthorized software from running on the computer. Unfortunately, in practice, thieving corporations - such as the one from Redmont, influence hardware manufacturers and use SB to block the ability to install other operating systems on computers. Fortunately, today you can still disable SB in the BIOS.
      • Set USB or CD/DVD as the first boot device.
      • Save changes and restart. The system will boot into the Gentoo or Arch Linux environment.
      • If you are installing in a virtualized VM environment, create a 50GB disk, point the virtual machine to the downloaded ISO image as the CD drive, and start the VM. How to do this?
      • Install QEMU (or another virtual machine)
      • In the black magic window, cast the spells:
        cd ~
        - Go to the home directory
        mkdir OOS
        - Create the OOS directory (or any other)
        cd OOS
        - Enter the OOS directory
        qemu-img create -f qcow2 gentoo.img 50G
        You can also copy the downloaded ISO image to the same directory. In Windows, I assume you know how to do this. In Linux and Mac:
        mv ~/Downloads/image.iso ~/OOS/(enter the correct path to the downloads directory and the ISO file name)
        If you have created a hard disk image and downloaded the ISO image, you can start the environment to build your own black magic portal:

        Linux:

        qemu-system-x86_64 -m 4G -smp 4 -enable-kvm -cpu host -drive file=gentoo.img -cdrom archlinux.iso -boot order=d -nic user,model=virtio-net-pci,hostfwd=tcp::2222-:22 -display gtk,zoom-to-fit=on -vga virtio -usb -device usb-tablet -drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/x64/OVMF_CODE.4m.fd  -drive if=pflash,format=raw,file=/usr/share/OVMF/x64/OVMF_VARS.4m.fd

        Windows:

        qemu-system-x86_64.exe -m 4G -smp 4 -cpu host -drive file=gentoo.img -cdrom archlinux.iso -boot order=d -nic user,model=virtio-net-pci,hostfwd=tcp::2222-:22 -display gtk,zoom-to-fit=on -vga virtio -usb -device usb-tablet -drive if=pflash,format=raw,readonly=on,file="C:\Program Files\qemu\share\edk2-x86_64-secure-code.fd" -drive if=pflash,format=raw,file="C:\Program Files\qemu\share\edk2-x86_64-vars.fd"
        

        Explanation:

        qemu-system-x86_64: choose your CPU type. If your computer hardware is from Windows and is less than 15 years old, then 99% the option qemu-system-x86_64 is the right one for you. If you have older hardware with a 32-bit processor, choose qemu-system-i386. For older Macs with Intel processors, choose qemu-system-x86_64, for newer ones (with M2, M3, M4) choose qemu-system-aarch64 QEMU can emulate almost any available processor type, so choose the right one.

        Command / Option Description
        Linux
        qemu-system-x86_64 Run QEMU in 64-bit mode.
        -m 4G Allocate 4GB of RAM.
        -smp 4 Set 4 CPU cores.
        -enable-kvm Use KVM for better performance.
        -cpu host Use the host's real CPU.
        -drive file=disk.img,format=qcow2,if=virtio Disk image `disk.img` in QCOW2 format with VirtIO interface.
        -cdrom system.iso ISO image `system.iso` as a CD-ROM drive.
        -boot order=d Boot first from CD-ROM.
        -nic user,model=virtio-net-pci,hostfwd=tcp::2222-:22 NAT network emulation with VirtIO driver, port forwarding 22 to 2222 localhost
        -display gtk,zoom-to-fit=on Run QEMU in a GTK window with automatic size adjustment.
        -vga virtio VirtIO graphics driver for better performance.
        -usb -device usb-tablet Improved mouse handling in the QEMU window.
        -drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/x64/OVMF_CODE.4m.fd
        -drive if=pflash,format=raw,file=/usr/share/OVMF/x64/OVMF_VARS.4m.fd
        UEFI BIOS firmware files
        Windows
        qemu-system-x86_64.exe Run QEMU in 64-bit mode on Windows.
        -m 4G Allocate 4GB of RAM.
        -smp 4 Set 4 CPU cores.
        -cpu qemu64 Use the emulated `qemu64` processor (better compatibility with Windows).
        -drive file=disk.img,format=qcow2,if=ide Disk image `disk.img` in QCOW2 format with IDE interface for better compatibility.
        -cdrom system.iso ISO image `system.iso` as a CD-ROM drive.
        -boot order=d Boot first from CD-ROM.
        -netdev user,id=net0,hostfwd=tcp::2222-:22 Create a network device in user mode, port forwarding 22 to 2222 localhost
        -device e1000,netdev=net0 Emulate an Intel e1000 network card.
        -display sdl Run QEMU in an SDL window (more compatible on Windows).
        -vga std Standard graphics driver for better compatibility.
        -usb -device usb-tablet Improved mouse handling in the QEMU window.
        -drive if=pflash,format=raw,readonly=on,file="C:\Program Files\qemu\share\edk2-x86_64-secure-code.fd"
        -drive if=pflash,format=raw,file="C:\Program Files\qemu\share\edk2-x86_64-vars.fd"
        UEFI BIOS firmware files


        Read more about QEMU

With the bootable drive ready, you are prepared to dive into the world of Linux. Let the adventure begin!

Session 1: The Beginning of the Adventure

Storyline

The Awakening of the Witchers

Message from the Elder Mage

Witchers, after centuries of waiting, the time has come to rebuild the power of the Gray Beards.

Each of you, young mage, must understand that magic is built on solid foundations – Gentoo will become your shield and sword. You will decide how to wield the power of your system. Walk carefully but with confidence, for great spells begin with small incantations.

You have just stepped onto the path of the witcher's craft, but instead of potions and silver swords, you will delve into the secrets of operating systems. Your first challenge will be mastering Gentoo Linux, a system as wild and demanding as a cave troll. But do not fear! With the help of the sages of Kaer Morhen (that is, me and this book), you will uncover every secret of this system, from installation to kernel configuration. Remember, young adepts, that Gentoo is not a toy.

It is a powerful tool that, in the wrong hands, can cause more harm than good. Therefore, it is important to approach it with due caution and respect. Do not rush, read the instructions carefully, and do not hesitate to ask if you do not understand something. After all, even Geralt of Rivia was not born with knowledge of all the signs and potions. He had to learn them, just as you are now learning Linux. And when you master Gentoo, no system will scare you! You will be able to create your own configurations, optimize the system for your needs, and fix problems that are unsolvable for others. You will become true system witchers, ready to face any challenge.

Goals

Session Plan

Theoretical Introduction

Linux is an open-source operating system that has gained popularity due to its flexibility, security, and stability. Its hierarchical file system structure allows for intuitive data management, and the variety of terminal tools makes it ideal for both servers and personal computers. Linux is designed to work in a network and functions like a network.
The /dev directory represents hardware devices as files, increasing flexibility in hardware management. Operators such as ".", "..", and "~" make navigating the file system easier. Imagine Linux as a vast continent, full of diverse lands, cities, and villages, with their own customs, languages, and cultures.

To travel freely across this continent, you must know its map – the directory tree and important files. At the top of this hierarchy is the root directory, denoted by "/". From there, all paths branch out to different corners of the system.
The Linux system tree is a collection of directories, each (conventionally) intended for something specific. Below is the tree and a brief description of the most important top-level folders.


    /
    |-/boot - location for boot files (boot loader, kernel)
    |-/dev - device folder - sounds strange but will be explained shortly
    |-/etc - folder for all system variables and configuration files
    |-/home - folder for user home directories
    |-/lib - location for system libraries
    |-/mnt - mount point for resources
    |-/opt - location for "alternative" libraries
    |-/proc - a virtual file system that provides information about the system and running processes
    |-/root - the system administrator has a special place here
    |-/sys - a virtual file system that provides an interface for hardware management
    |-/tmp - location for temporary files
    |-/usr - contains most user programs and system libraries that are not essential for system boot
    |-/var - short for "variable", location for data that changes frequently during system operation
    
The above description is superficial, and everything will be explained in the future, but the /dev directory deserves special attention.

Probably most of you are accustomed to Windows drive letters like C:, D:,E:, etc. Probably no one remembers anymore that there were also A: and B:, which were reserved for floppy drives. The approach where the operating system is "tied" like a dog to a disk worked 30 years ago. And I know you might think I'm not objective because, in my opinion, a worse system than Windows has yet to appear. However, the worst thing about this system is the way Windows separates the software layer from the hardware layer. In Windows, you cannot remove the C: drive because the system runs on it. The user stores their files on it, so they must have administrator rights to write to the disk. They must also have administrator rights to send data to the sound card, network card, or graphics card. And if the user has administrator rights, it's a simple step into the abyss, with eyes closed, because any process run by the user, including viruses, can obtain these administrator rights. This system will never be secure because it is designed that way. It cannot be secure because it will not work. And that's the end of the debate about Windows security, and everything related to Windows security is patching holes with putty and duct tape, and it works until it starts leaking from another side.

Linux runs in RAM. When the computer starts, the BIOS is loaded first, which directly manages the hardware - it decides when to turn on the RAM, when to turn on the disks, wake up the processor, coprocessor, buses, etc. Then the BIOS looks for the boot partition (both Windows and Linux have such a partition) and from it runs the bootloader (also all x86 and x86_64 systems have bootloaders, but in Windows, the bootloader is hidden from the user, so they don't know what's happening in their computer). The bootloader, in turn, has the boot options of the system kernel with boot parameters written in its configuration file, for example:

linux (hd1,gpt1)/gentoo.img root=/dev/sda3
This roughly means:
Load the Linux kernel named gentoo.img into RAM, which is located on the first partition of the first hard drive, with the partition table written in GPT format, and then mount the third partition of the disk as the root partition (/) and continue the system boot process. Here is a brief explanation of the system boot process. After loading the kernel into memory, the kernel is just a file in memory. Only then does the decompression and addressing process in RAM space begin, and the system starts running. During kernel boot, hardware components are detected, and files representing these components are created in the /dev directory. No disk resources are mounted yet. After the kernel is running in RAM, we have a basic Linux system running, and only then does the system mount the root partition (/) specified in the bootloader. In the next step, the system reads the system settings saved on the disk, for example, to mount the device /dev/sda4 as the /usr directory and the partition /dev/sdb1 as the home directory. After mounting the resources, system services (daemons) are started (in the correct order), such as the network service, system logger, hardware management manager, and all others,

So, the BIOS loads the kernel into RAM, and in it, the directory tree and system files are created, and the entire operating system works in it. NOT ON THE HARD DRIVE. Therefore, Linux does not run on the disk but in the computer's operational memory. You can imagine it as a cargo airport, with a control tower where the kernel receives shipments (data) from a terminal (e.g., from the network), looks where they are addressed or addresses them, and directs them to the next terminal (e.g., to the disk), so they reach their destination.

Airport
I mentioned earlier that in Linux, everything is a file, including hardware devices. The hard drive, network card, or monitor – everything can be found in the /dev directory. Every element of your system is in one place - everything is organized and easily accessible. And if you want to move quickly between directories, use operators like ".", "..", "~", ">", "|", and other commands. They are like witcher signs that allow you to teleport to different places.

This one small detail, that in Linux everything is a file, makes conquering the fortress that is the operating system a real challenge. Why?

In Linux, a process run by a user inherits the rights of that user (previously granted by the administrator), no more. So if the user has access to the printer file (/dev/lp0) and the cdrom file (/dev/cdrom), then the process run by the user (e.g., a CD burning program or text editor) also has these rights, and the user can print and burn CDs or listen to music. But in Linux, the hard drive is also a file in the system, the CPU is a file, the USB port is a file, everything is a file, and everything is in the /dev directory. And we can assign rights to files - read rights, write rights, change the owner and groups. So if the user "tom" downloads malicious software, they become its owner, and if the software requests access to any resource, the kernel checks what "tom" is allowed to do, and if "tom" does not belong to the group of users allowed to use the printer, it says "Tom, you are free in your own home". And that is what solidifies our fortress.


    /

    |-/dev
    |    |-sda
    |    |   |-sda1
    |    |   |-sda2
    |    |   |-sda3
    |    |   |-sda4
    |    |-sdb
    |        |-sdb1
    |        |-sdb2
    |-/home
        |-tom
        |-not_tom
    

For example, the user "tom" (since Linux is case-sensitive, it is customary to use lowercase letters in user names) can be denied write access to the device /dev/sda1. They can also be denied write access anywhere in the system except the /home/tom folder. And since every process run by the user inherits their rights, no virus will have write access anywhere except the user's home directory, and even if their folder is full of viruses, the system is safe. And by deleting the user's directory, we get rid of all the junk in the system.
However, any system can be ruined, and while Windows security is based on patching holes, in Linux, the system is secure, but a talented administrator can effectively change that ;).

🔥 Security Comparison: Windows vs Linux

🔍 Feature 🪟 Windows 🐧 Linux
Popularity among hackers 🎯 High – a big target 🔍 Lower
Source code ❌ Closed – less audited ✅ Open – more eyes on bugs
Automatic application startup ❌ Possible ✅ Requires granting permissions
Drivers ❌ External – potential vulnerabilities ✅ Built into the kernel
Permissions ❌ Easy to bypass (UAC) ✅ Good user separation
Hardware access ❌ Complicated API ✅ "Everything is a file"

If we list the /dev directory, we will see something like this:


ls /dev
acpi_thermal_rel  dm-0         fuse       i2c-11  i2c-9         mqueue     nvme0n1p2  ptp0      stdout  tty16  tty27  tty38  tty49  tty6    ttyS12  ttyS23  ttyS6        userio  vcsa3  vga_arbiter
autofs            dm-1         gpiochip0  i2c-12  iio:device0   mtd        nvme0n1p3  pts       tpm0    tty17  tty28  tty39  tty5   tty60   ttyS13  ttyS24  ttyS7        v4l     vcsa4  vhci
block             dma_heap     hidraw0    i2c-13  input         mtd0       nvme0n1p4  random    tpmrm0  tty18  tty29  tty4   tty50  tty61   ttyS14  ttyS25  ttyS8        vcs     vcsa5  vhost-net
btrfs-control     dri          hidraw1    i2c-16  kmsg          mtd0ro     nvme0n1p5  rfkill    tty     tty19  tty3   tty40  tty51  tty62   ttyS15  ttyS26  ttyS9        vcs1    vcsa6  vhost-vsock
bus               drm_dp_aux0  hidraw2    i2c-17  kvm           mtd1       nvme0n1p6  rtc       tty0    tty2   tty30  tty41  tty52  tty63   ttyS16  ttyS27  ttyUSB0      vcs2    vcsu   video0
char              drm_dp_aux1  hidraw3    i2c-2   log           mtd1ro     nvme0n1p7  rtc0      tty1    tty20  tty31  tty42  tty53  tty7    ttyS17  ttyS28  ttyUSB1      vcs3    vcsu1  video1
console           drm_dp_aux2  hpet       i2c-3   loop-control  net        nvme0n1p8  serial    tty10   tty21  tty32  tty43  tty54  tty8    ttyS18  ttyS29  udmabuf      vcs4    vcsu2  video2
core              drm_dp_aux3  hugepages  i2c-4   mapper        ng0n1      nvram      shm       tty11   tty22  tty33  tty44  tty55  tty9    ttyS19  ttyS3   uhid         vcs5    vcsu3  video3
cpu               drm_dp_aux4  hwrng      i2c-5   media0        null       port       snapshot  tty12   tty23  tty34  tty45  tty56  ttyS0   ttyS2   ttyS30  uinput       vcs6    vcsu4  watchdog
cpu_dma_latency   fb0          i2c-0      i2c-6   media1        nvme0      ppp        snd       tty13   tty24  tty35  tty46  tty57  ttyS1   ttyS20  ttyS31  urandom      vcsa    vcsu5  watchdog0
cuse              fd           i2c-1      i2c-7   mei0          nvme0n1    psaux      stderr    tty14   tty25  tty36  tty47  tty58  ttyS10  ttyS21  ttyS4   usb          vcsa1   vcsu6  zero
disk              full         i2c-10     i2c-8   mem           nvme0n1p1  ptmx       stdin     tty15   tty26  tty37  tty48  tty59  ttyS11  ttyS22  ttyS5   userfaultfd  vcsa2   vfio
     

What you see are files that represent devices in my laptop. And since they are files, we can perform operations on most of them as we do on files - we can copy their contents to other files or send files to devices. A simple example?
ffmpeg -i file.mp4 -f rawvideo -pix_fmt rgb24 > /dev/fb0
The above spell (the ffmpeg program) decompresses file.mp4 into a "raw" image and sends the "result" of decompression to the device /dev/fb0, i.e., to the monitor screen. cat file.wav > /dev/snd/controlC0 The above command will "play" the sound file on the sound card, which is the control0 file in the /dev/snd/ directory. Here you also learn a new command "cat", which reads the contents of a file. Typing: cat file.txt You will see the contents of file.txt on the screen, but typing:
cat file.txt > file2.txt
You will copy the contents of file.txt to file2.txt.
And what will you do by typing:
cat /dev/sda > /dev/sdb

Exactly! You will copy the sda device to the sdb device, and if these are USB drives, you will copy one USB drive to another. Of course, this is inefficient, because assuming the USB drive is 32GB and there is a 2MB file on it, it makes no sense to copy 32GB to transfer a 2MB file. But when making backups of hard drives, this approach makes sense, but not with the "cat" command but with the previously mentioned "dd" command, which is designed for this purpose because it is "sensitive" to read errors. dd is a popular tool for data recovery from damaged media.

On the Internet, you will find hundreds of descriptions of Linux spells and I/O operators, so there is no point in duplicating what someone has already done.
And this is what is great about open source - everyone can see it, everyone can read it, but no one bothers. It is on this laziness that companies like Microsoft, Apple, and Google thrive, doing everything for the user, while at the same time stealing their data, decision-making, and self-awareness, because who among you knows what is happening under the hood of your computer? What happens is decided by the open-source code, which anyone can review. It's like witcher recipes available to everyone, not just the chosen ones. Everyone can read, modify, and improve them. That's why Linux is so flexible and constantly evolving.

There are many different Linux distributions, just as there are many witcher schools. Each has its specializations and teaching methods. Gentoo is like the School of the Wolf, known for demanding training and focus on individual development. Arch Linux is like the School of the Cat, valuing agility and independence. Ubuntu is like the School of the Bear, friendly to beginners and offering a lot of support. And the metaphor "everything is a file" is the key to understanding Linux. Imagine that you can change the brightness of the monitor by editing a text file, or control the CPU temperature by writing a specific value to another file. In Linux, everything is possible if you know the right terminal commands – the spells of this system.

But more on that in the next tale ;)

Workshops

  • Display the current directory:
    pwd
  • Display the contents of a directory with details:
    ls -la
  • Go to the parent directory:
    cd ..
  • Create a new directory:
    mkdir magic_tower
  • Create a new text file:
    touch magic_tower/save.txt
  • Add content to the file:
    nano magic_tower/save.txt

Homework

Create any directory structure reflecting the hierarchy of your personal witcher fortress. In each, create a file describing what the folder is for.

Useful Links