GNU/Linux
1. GNU/Linux linux
ID: ab57dccf-c9f3-4347-b9d0-5731904f3d67 CREATED: <2025-02-09 Sun 13:33>>>
At this point, I don't really care what the non-believers think - if you are not running GNU/Linux as your daily driver, you are wrong. Of course I understand the need to run dedicated Windows and MacOS machines, when it is out of your control - say you have a Macbook or need to run it for %employer. No need to stress about that. But when you are given the opportunity - given a choice, you should pick whatever Linux-based OS suits your needs best.
1.1. User Commands
ID: 4e8a9455-f1ca-4654-8cfa-562735661d69 CREATED: <2025-05-02 Fri 15:25>
In order to start working, you'll probably first have to open a session. The program login(1) will wait for you to type your username and password, and after that, it will start a shell (command interpreter) for you. In case of a graphical login, you get a screen with menus or icons and a mouse click will start a shell in a window. See also xterm(1).
1.2. Libraries
ID: 3e6b5e34-4cf0-4289-afda-bea7c2a343dd CREATED: <2025-02-14 Fri 22:11>
1.2.1. Ublk fs
ID: 46fdde04-496d-45b4-a674-367edafb8054 CREATED: <2025-03-04 Tue 17:46>
Userspace block device driver (ublk driver) — The Linux Kernel documentation
–# add device ublk.loop add -f ublk-loop.img # fmt mkfs.xfs /dev/ublkb0 mount /dev/ublkb0 .stash/ # ... umount .stash/
1.2.2. Tracing test log
ID: 292a62ff-6d56-42e2-88fa-bd13ddbc2fb1 CREATED: <2025-03-04 Tue 17:48>–
1.2.3. BPF log
ID: 97d3d07c-e576-412b-a97a-2879efa998c5 CREATED: <2025-03-04 Tue 19:02>–
1.2.4. RTLA test
ID: 378227a0-d265-4272-8013-73df72b5e49a CREATED: <2025-03-04 Tue 19:06>
The realtime Linux analysis tool — The Linux Kernel documentation
–1.2.5. ioctl
ID: 94f363d8-45a2-4d48-9e25-17b1ac50771a CREATED: <2025-07-04 Fri 20:10>
1.2.6. Keyutils crypto
ID: 5e859a3f-0c31-4796-85c6-7008b346f186 CREATED: <2025-02-14 Fri 22:12>–
1.2.7. spidev
ID: 93c4f02f-2b00-4741-98e4-f427530f4875 CREATED: <2025-07-04 Fri 20:02>
1.2.8. Netlink
ID: 25cc1e3f-60f0-401a-a8b6-ac8d5670233d CREATED: <2025-03-04 Tue 19:14>
Introduction to Netlink — The Linux Kernel documentation – Netlink Handbook — The Linux Kernel documentation
–1.3. Kernel
ID: caed860f-fcef-43a2-b080-94b01352cd43 CREATED: <2025-02-16 Sun 20:12>
Unreliable Guide To Hacking The Linux Kernel — The Linux Kernel documentation – The Linux Kernel documentation — The Linux Kernel documentation
–1.3.1. Kbuild
ID: 43020c04-f96f-4992-ad56-0bbfd4e55321 CREATED: <2025-06-22 Sun 00:11>
linux/Documentation/kbuild/kbuild.rst – Kbuild — The Linux Kernel documentation
–1.3.2. Devices
ID: ad25b130-d832-4109-84ad-7cb9900ed227 CREATED: <2025-01-17 Fri 19:15>
/dev In Linux, everything is a file.
dev contains special device files - usually block or character device.
major, minor = category, device 0, 5
mknod - create special device files
- udev
- utils
ID: f8ce343e-c866-4fff-8e39-2da32a59d56e CREATED: <2025-02-06 Thu 19:16>
dd if=/dev/zero of=myfile bs=1M count=32 losetup --show -f myfile ls -al /dev/loop0 losetup -d /dev/loop0 #teardown
echo "sup dude" > /dev/loop0 dd if=/dev/loop0 -bs=1 dd if=/dev/nvme0 of=/dev/null progress=true #pacman -S hdparm hdparm -T /dev/nvme0
modprobe scsi_debug add_host=5 max_luns=10 num_tgts=2 dev_size_mb=16
sparsefiles: create with C, dd, or truncate
truncate --help
test mkfs.btrfs on 10T dummy block device
dd if=/dev/zero of=/tmp/bb1 bs=1 count=1 seek=10T du -sh /tmp/bb1 losetup --show -f /tmp/bb1 mkfs.btrfs /dev/loop0
diagnostics
iostat # pacman -S sysstat blktrace # paru -S blktrace iotop # pacman -S iotop
bcc/ trace: Who/which process is executing specific functions against block devices?
bcc/biosnoop: Which process is accessing the block device, how many bytes are accessed, which latency for answering the requests?
at the kernel level besides BPF we got kmods and DKMS,
compression/de-duplication can be done via VDO kernel mod
- Frame Buffer Device
ID: 639e5d85-e143-421d-86be-9bc291bc2f8b CREATED: <2025-01-17 Fri 19:15>
The Frame Buffer Device — The Linux Kernel documentation
–/dev/fb*
- used by fbgrab/fbcat program
- Userspace Block Device
ID: d58cb494-ce43-49cc-859b-aa6a518ac314 CREATED: <2025-02-14 Fri 22:11>
– - Input Devices
ID: ea9bb3f9-3607-4be2-82f8-e9b3381a0524 CREATED: <2025-02-27 Thu 18:51>
–
1.3.3. Systems
ID: 1f728d2c-edf1-4502-9560-d0a6c45d5df8 CREATED: <2025-02-27 Thu 19:38>
syscalls(2) - Linux manual page – System Calls — The Linux Kernel documentation – linux/arch/x86/entry/syscalls/syscall_64.tbl
–- Core
ID: c670fcee-f9b1-4acd-ab32-3b795748b544 CREATED: <2025-03-07 Fri 15:35>
– - Storage
ID: f28b16e2-97e5-4575-a3d6-941efeb8942d CREATED: <2025-03-07 Fri 15:36>
– - ACPI hw
ID: ac0ae4dd-21d4-4b45-9751-a102a48f30e6 CREATED: <2025-03-04 Tue 19:16>
ACP - Wikipedia – ACPI Support — The Linux Kernel documentation
–Advanced Configuration and Power Interface
- SPI
ID: cde3ff32-1ad9-43ab-9ac7-05efd3f88490 CREATED: <2025-03-04 Tue 19:20>
Serial Peripheral Interface (SPI) — The Linux Kernel documentation
– - DFL hw
ID: 5499a81e-1c6e-48d5-b906-9d2155afc562 CREATED: <2025-03-04 Tue 19:19>
FPGA Device Feature List (DFL) Framework Overview — The Linux Kernel documentation
– - Networking net
ID: 8ed2735d-d259-4a78-8891-ded98f857846 CREATED: <2025-03-07 Fri 15:31>
- Human Interfaces
ID: 19f3c5da-0f20-4eca-b142-7fc71095ca18 CREATED: <2025-03-07 Fri 15:38>
– - IO io
ID: 9d49d145-2c94-4d6f-a4e1-5016df6cbedc CREATED: <2025-02-27 Thu 19:39>
Input/Output operations
- epoll
ID: 74367b29-6a50-4eb4-ac6b-1c1b96dabd89 CREATED: <2025-02-27 Thu 19:39>
– - io_uring
ID: 92c2a9aa-6584-470e-977a-3547bca79414 CREATED: <2025-02-27 Thu 19:39>
io_uring is not an event system · blog · despair labs – GitHub - noteflakes/awesome-io_uring: Awesome io_uring – Zero Copy Rx with io_uring – io_uring(7) - Linux manual page – Missing Manuals - io_uring worker pool – Lord of the io_uring
– - poll
ID: d43311bf-7f5f-4d21-aad8-4b35548813b5 CREATED: <2025-02-27 Thu 19:43>
–
- epoll
1.4. Community
ID: d494d0ab-53ee-4c01-8276-638351d86368 CREATED: <2025-03-11 Tue 21:46>
1.4.1. UAPI Group
ID: 1196e1fc-7d87-430d-9b68-c5a8a240b82e CREATED: <2025-03-11 Tue 21:46>
The Linux Userspace API (UAPI) Group | The Linux Userspace API Group
–The Linux Userspace API Group
1.5. Distros
ID: 34966e81-ab92-4b85-b11e-073784261db5 CREATED: <2025-02-22 Sat 19:31>
List of Linux distributions - Wikipedia
–Linux Distributions
1.5.1. Fedora
ID: c9fdd74c-0eb2-4d8f-bc22-0cf40996f186 CREATED: <2025-02-22 Sat 19:32>
Fedora Linux | The Fedora Project
–- RHEL is based on Fedora
- RH has influence over roadmap
1.5.2. bootc
ID: 101c2239-6e98-4899-b552-17e8ae9c55c8 CREATED: <2025-04-16 Wed 18:52>
Fedora/CentOS bootc Documentation :: Fedora Docs – bootc-dev
–- CoreOS
ID: ca6795ee-4b2c-4ec3-9bdc-f6be67c2f1ec CREATED: <2025-02-22 Sat 19:32> AKA: FCOS PROPERTIES: :header-args :export both :eval no-export :session coreos :async t
–- Configuring Users
-
cargo install coreos-installer
core
- Ignition documentation
- Provisioning Fedora CoreOS on QEMU
- requires ignition config file
- should provide ssh key for core user
fetch the qcow2 image
# stream = stable,testing,next coreos-installer download -s $stream -p qemu -f qcow2.xz --decompress -C ~/.stash/scratch/
/home/ellis/.stash/scratch/fedora-coreos-41.20250215.3.0-qemu.x86_64.qcow2
setup a new vm
IGNITION_CONFIG=$config IMAGE=$image # for x86/aarch64: IGNITION_DEVICE_ARG="-fw_cfg name=opt/com.coreos/config,file=${IGNITION_CONFIG}" # for s390x/ppc64le: IGNITION_DEVICE_ARG="-drive file=${IGNITION_CONFIG},if=none,format=raw,readonly=on,id=ignition -device virtio-blk,serial=ignition,drive=ignition" qemu-system-x86_64 -m 2048 -cpu host -nographic -snapshot \ -drive "if=virtio,file=${IMAGE}" ${IGNITION_DEVICE_ARG} \ -nic user,model=virtio,hostfwd=tcp::2222-:22
launch it
qemu-img create -f qcow2 -F qcow2 -b "${IMAGE}" my-fcos-vm.qcow2 qemu-system-x86_64 -m 2048 -cpu host -nographic \ -drive if=virtio,file=my-fcos-vm.qcow2 ${IGNITION_DEVICE_ARG} \ -nic user,model=virtio,hostfwd=tcp::2222-:22
- IoT
ID: 79c00d69-0624-4e85-a237-79e73e612dca CREATED: <2025-02-22 Sat 19:34>
–
1.5.3. Arch Linux
ID: 6ef3fb84-6805-46f7-ad13-8929a023b43c CREATED: <2025-02-22 Sat 19:39>
Arch Linux -> Pacman
–- Arch (btw)
- jack of all trades master of none
- still, what I use for my daily driver since 2016
- rolling release OS, relatively stable even when running bleeding edge
- obviously there are harder setups to manage, but I find manually installing Arch from scratch to be a good stat check for system devs.
- High quality Wiki
- Archiso
ID: 06ee60a3-9a98-40d2-893b-39ce992fc0dc CREATED: <2025-06-08 Sun 19:23>
–- supports cloud-init service
- sshd on by default
- ABS
ID: 03215632-83da-48c0-9f36-df72a9e956b5 CREATED: <2025-07-09 Wed 17:04> AKA: Arch build system
–The Arch build system (ABS) is a system for building and packaging software from source code. While pacman is the specialized Arch tool for binary package management, the Arch build system is a collection of tools for compiling source into installable .pkg.tar.zst packages.
The Arch build system can be compared to ports for *BSD, which automates the process of building software from source code. The system uses a port to download, unpack, patch, compile, and install the given software. A port is merely a small directory on the user's computer, named after the corresponding software to be installed, that contains a few files with the instructions for building and installing the software from source. This makes installing software as simple as typing make or make install clean within the port's directory.
The Arch build system is based on a similar concept. It comprises a collection of git repositories for every package available in Arch Linux. Each repository contains a PKGBUILD file (and sometimes other files), and does not contain the software source nor binary. By running makepkg inside a directory, the software sources are downloaded, the software is compiled, and then packaged within the build directory. Then you can use pacman to install the package.
- Pacman
ID: 8bbcda66-0611-42a8-9f99-10d1cd7d82e2 CREATED: <2025-07-09 Wed 17:06>
–
1.5.4. Ubuntu
ID: 5d1223c7-0ded-44b9-b494-3a3593a2fe02 CREATED: <2025-02-22 Sat 19:39>–
1.5.5. Debian
ID: f03769bc-abf2-4f58-809f-b672c66120f3 CREATED: <2025-02-22 Sat 19:39>–
1.5.6. Alpine
ID: 4e717401-7b7b-4ce6-83c7-6f8420e01b93 CREATED: <2025-02-22 Sat 19:40>–
- TIL (the hard way): Alpine Linux does not ship Bash by default - Adrià Mercader
- there's like a hundred different ways to encounter this error - the default alpine shell is dash masquerading as sh. the error message may also mention /bin/sh not found in $PATH.
1.5.7. Adélie
ID: b54a3fef-192f-4767-bec2-c10058e69a89 CREATED: <2025-03-04 Tue 15:27>–
1.5.8. Gentoo
ID: 5cbe7ad4-008a-4ed7-889d-e7ec5663dfd1 CREATED: <2025-02-22 Sat 19:40>–
1.5.9. Slackware
ID: 21e5a881-54d0-410e-b48a-f32ee26ef90d CREATED: <2025-02-22 Sat 19:43>–
2. Plan 9
ID: 3c707aa1-be3a-4258-bcd8-195216e658b5 CREATED: <2025-03-06 Thu 09:11>
:EDGES: Plan 9 from Bell Labs – Plan 9 — The Documents (Volume 2)
–3. OpenBSD
ID: 82110e71-748d-4dd6-ba91-22a6a41df76c CREATED: <2025-06-22 Sun 14:56>–