Argo OS Experience
Explore a real Gentoo-based environment powered by ArgoBox infrastructure
Lab Host Resource Status
Checking...This lab runs on ArgoBox's heavy compute infrastructure. A full QEMU virtual machine is provisioned on demand.
Connecting to lab engine...
Checking if real Linux environments are available
Real Container Lab
Launch an ephemeral LXC container for hands-on practice. Auto-destroys after 60 minutes.
Provisioning a real Linux container on isolated infrastructure
Failed to create lab
Challenges
Navigate the Gentoo package manager
- Run emerge --search vim to search the Portage tree for packages matching "vim"
- Each result shows the full category/package name (e.g., app-editors/vim) — Gentoo organizes every package into a category
- Note the description and homepage URL printed for each match
emerge --search vim - Run qlist -I to list every package installed on this system
- Pipe it through head -20 to see just the first 20 entries
- Each line shows category/package format — this is how Portage tracks what is installed
qlist -I | head -20 - Run cat /etc/portage/make.conf to view the main Portage configuration file
- This file controls global build settings: compiler flags (CFLAGS), USE flags, mirrors, and more
- Look for the MAKEOPTS line — it sets how many parallel compile jobs to run
cat /etc/portage/make.conf - Run equery list vim to see which version of Vim is installed
- The output shows the full category/package-version string (e.g., app-editors/vim-9.0.1234)
- You can use wildcard patterns too — try equery list "*kde*" to find all KDE-related packages
equery list vim - Run ls /var/db/repos/gentoo to see the top-level categories in the Portage tree
- Each directory is a category (app-editors, sys-apps, dev-libs, etc.) containing related packages
- Pick a category and drill down: ls /var/db/repos/gentoo/app-editors/ to see available packages in that category
ls /var/db/repos/gentoo Understand the Argo OS build configuration
- Run grep -E "CFLAGS|CXXFLAGS" /etc/portage/make.conf to see the compiler optimization flags
- CFLAGS controls C compiler flags, CXXFLAGS controls C++ — they usually match
- Look for -march=native (optimize for this CPU), -O2 (optimization level), and -pipe (use pipes instead of temp files)
grep -E "CFLAGS|CXXFLAGS" /etc/portage/make.conf - Run grep MAKEOPTS /etc/portage/make.conf to see the parallel job configuration
- MAKEOPTS="-jN" tells make to run N compile jobs simultaneously
- This is typically set to the number of CPU cores + 1 for maximum throughput
grep MAKEOPTS /etc/portage/make.conf - Run uname -r to display the running kernel version string
- The output includes the version number and any local suffix (e.g., -gentoo-dist)
- Try uname -a for full system information including architecture and hostname
uname -r - Run cat /proc/cpuinfo | head -20 to see the processor details
- Look for "model name" (the CPU model), "cpu cores" (physical cores), and "cpu MHz" (current clock speed)
- The "flags" line shows CPU feature flags — these determine what -march=native can optimize for
cat /proc/cpuinfo | head -20 - Switch to the Desktop (GUI) tab above to open the VNC connection
- You should see a full KDE Plasma desktop — right-click the desktop for the context menu
- Open the application launcher (bottom-left) to see what GUI applications are installed
Understand Gentoo's build customization system
- Run emerge --info | grep USE to see all active global USE flags
- These flags control which features are compiled into every package that supports them
- Common flags include X (X11 support), gtk (GTK toolkit), qt5 (Qt5 toolkit), systemd vs openrc, pulseaudio, bluetooth, etc.
emerge --info | grep USE - Run equery uses app-editors/vim to see all USE flags available for Vim
- Each line shows a flag name, whether it is enabled (+) or disabled (-), and a description
- Enabled flags mean that feature was compiled in; disabled flags were excluded at build time
equery uses app-editors/vim - Run ls /etc/portage/package.use/ to see per-package USE flag overrides
- Each file in this directory can override global USE flags for specific packages
- Read one of the files to see the format: category/package flag1 flag2 -flag3 (minus disables a flag)
ls /etc/portage/package.use/ A list of files, each containing USE flag overrides for specific packages
- Run head -50 /var/db/repos/gentoo/profiles/use.desc to see the first 50 global USE flag descriptions
- Each line defines one global USE flag and what it means across all packages
- There are hundreds of global USE flags — this file is the canonical reference
head -50 /var/db/repos/gentoo/profiles/use.desc - Run equery hasuse X to find all installed packages that support the X (X11) USE flag
- The output shows every installed package that recognizes this flag, whether enabled or not
- Try other flags like bluetooth, pulseaudio, or python to see their reach across the system
equery hasuse X Learn about binary package distribution and binhosts
- Run grep -i binhost /etc/portage/make.conf to find the PORTAGE_BINHOST setting
- This URL points to a server hosting precompiled binary packages (binpkgs)
- When configured, Portage can download binpkgs instead of compiling from source — much faster
grep -i binhost /etc/portage/make.conf - Run grep FEATURES /etc/portage/make.conf to see Portage feature flags
- Look for getbinpkg (download binpkgs from binhost) and binpkg-request-signature (verify package signatures)
- Other features like parallel-fetch and candy control Portage behavior during installs
grep FEATURES /etc/portage/make.conf - Run ls /var/cache/binpkgs/ to see the binary package cache directory
- Binary packages are organized by category, mirroring the Portage tree structure
- Pick a category and list it to see .gpkg.tar files — these are the actual binary packages
ls /var/cache/binpkgs/ Category directories like app-editors/, sys-libs/, dev-libs/ containing binary packages
- The --usepkg (-k) flag tells emerge to prefer binpkgs but fall back to source compilation if unavailable
- The --usepkgonly (-K) flag tells emerge to ONLY use binpkgs — it will fail if no binary exists
- Try emerge --pretend --usepkg app-editors/vim to see what Portage would do (pretend mode is safe — it only shows the plan)
emerge --pretend --usepkg app-editors/vim - Run grep EMERGE_DEFAULT_OPTS /etc/portage/make.conf to see default flags passed to every emerge command
- If --usepkg or --getbinpkg appears here, the system defaults to using binary packages
- This is how Argo OS client machines are configured — they always prefer binpkgs without having to type the flag
grep EMERGE_DEFAULT_OPTS /etc/portage/make.conf Control which package versions are available
- Run ls /etc/portage/package.accept_keywords/ to see keyword override files
- Read one of the files — each line unmasks a package for the ~amd64 (testing) keyword
- The format is: category/package ~amd64 — this tells Portage to accept testing versions
ls /etc/portage/package.accept_keywords/ - Run emerge --search firefox to find the browser package and see its available versions
- Stable packages have the amd64 keyword — these are well-tested and recommended
- Testing packages have ~amd64 (note the tilde) — they are newer but may have issues
- You can also check: eix -e www-client/firefox to see all versions and their keywords side by side
emerge --search firefox - Run ls /etc/portage/package.mask/ to see locally masked packages
- A masked package is completely hidden from Portage — it will not be installed or upgraded
- Read one of the files to see the format — each line blocks a specific version or version range
ls /etc/portage/package.mask/ - Run ls /var/db/repos/gentoo/app-editors/vim/ to see all available ebuild versions
- Each .ebuild file is a specific version — the filename encodes the version number
- Read one with cat /var/db/repos/gentoo/app-editors/vim/vim-9*.ebuild | head -40 to see the build recipe
ls /var/db/repos/gentoo/app-editors/vim/ Multiple .ebuild files, a files/ directory, metadata.xml, and a Manifest file
- Run equery changes app-editors/vim to see the commit history for this package
- Each entry shows who changed the ebuild, when, and why — useful for tracking version bumps
- Look for entries mentioning security fixes, new USE flags, or dependency changes
equery changes app-editors/vim Manage additional package repositories
- Run eselect repository list to see all known Gentoo overlays
- Overlays marked with an asterisk (*) are currently enabled on this system
- Each overlay is a supplementary package tree that can override or extend the main Gentoo repository
eselect repository list - Run ls /etc/portage/repos.conf/ to see repository configuration files
- Read the main file to see how the primary Gentoo repo is configured
- Each repo config specifies a location on disk, sync type (git/rsync), and sync URI
ls /etc/portage/repos.conf/ - Run cat /etc/portage/repos.conf/gentoo.conf to see the main Gentoo repository configuration
- Look for sync-type (rsync or git), sync-uri (the mirror URL), and location (where the tree lives on disk)
- The auto-sync setting controls whether emaint sync -a will update this repo automatically
cat /etc/portage/repos.conf/gentoo.conf - Run grep -r priority /etc/portage/repos.conf/ to see priority values assigned to each repo
- Higher priority numbers mean the overlay takes precedence when the same package exists in multiple repos
- The main Gentoo repo typically has a lower priority so overlays can override packages when needed
grep -r priority /etc/portage/repos.conf/ - Run eix --in-overlay to list packages that come from overlays rather than the main tree
- If eix is not available, check installed packages with: qlist -Iv | while read pkg; do equery which $pkg 2>/dev/null; done | grep -v gentoo | head -20
- Packages from overlays may be newer versions, custom patches, or software not yet in the main tree
eix --in-overlay 2>/dev/null || echo "Try: eselect repository list to see enabled overlays" Read and understand the Gentoo build recipes
- Run ls /var/db/repos/gentoo/app-editors/vim/ to list the contents of the Vim package directory
- Identify the .ebuild files — each one represents a specific version available for installation
- Note the metadata.xml (package metadata and USE flag descriptions), Manifest (checksums), and files/ directory (patches)
ls /var/db/repos/gentoo/app-editors/vim/ Ebuild files (.ebuild), metadata.xml, Manifest, and optionally a files/ directory with patches
- Pick the newest .ebuild file and read it: cat /var/db/repos/gentoo/app-editors/vim/vim-*.ebuild | head -80
- Look for phase functions: src_prepare() (apply patches), src_configure() (run ./configure), src_compile() (run make), src_install() (install files)
- Note the EAPI line at the top — this declares which version of the ebuild API the script uses
- Find the IUSE variable — it lists all USE flags this ebuild supports
cat /var/db/repos/gentoo/app-editors/vim/vim-*.ebuild | head -80 - In the ebuild, find the DEPEND, RDEPEND, and BDEPEND variables
- DEPEND = build-time dependencies (headers, libraries needed to compile)
- RDEPEND = runtime dependencies (libraries needed to run the installed software)
- BDEPEND = build host dependencies (tools like cmake or meson needed by the build system itself)
- Run equery depgraph app-editors/vim to visualize the dependency tree
equery depgraph app-editors/vim - Run ls /var/db/pkg/ to see all categories with installed packages
- Drill into a category: ls /var/db/pkg/app-editors/ to see installed versions
- Each package directory contains metadata files: USE (active USE flags), CONTENTS (file manifest), CFLAGS (flags used to compile)
ls /var/db/pkg/ | head -30 Category directories mirroring the Portage tree structure, but only containing packages that are actually installed
- Find an installed package: ls /var/db/pkg/app-editors/
- Read its recorded USE flags: cat /var/db/pkg/app-editors/vim-*/USE
- Read its CFLAGS: cat /var/db/pkg/app-editors/vim-*/CFLAGS
- For the full build environment: bzcat /var/db/pkg/app-editors/vim-*/environment.bz2 | head -50
cat /var/db/pkg/app-editors/vim-*/USE 2>/dev/null && echo "---" && cat /var/db/pkg/app-editors/vim-*/CFLAGS 2>/dev/null Explore the Linux kernel build system
- Run zcat /proc/config.gz | head -50 to decompress and view the first 50 lines of the running kernel config
- This file contains every CONFIG_* option used to build the currently running kernel
- Look for CONFIG_LOCALVERSION to see the custom version suffix, and CONFIG_SMP for multi-processor support
zcat /proc/config.gz | head -50 Kernel config options starting with CONFIG_*, showing y (enabled), m (module), or lines commented out with # (disabled)
- Run lsmod to see all currently loaded kernel modules
- The output shows module name, size in bytes, and how many other modules depend on it
- Look for filesystem modules (ext4, btrfs, xfs), network drivers, and GPU modules
lsmod - Run head -5 /usr/src/linux/Makefile to see the kernel version variables
- The first few lines define VERSION, PATCHLEVEL, SUBLEVEL, and EXTRAVERSION
- Together these form the full version string — compare with uname -r to verify they match
head -5 /usr/src/linux/Makefile - Run cat /proc/cmdline to see the parameters passed to the kernel at boot
- Look for root= (root filesystem), init= (init system path), and any custom parameters
- Parameters like quiet and splash control boot verbosity; others configure hardware behavior
cat /proc/cmdline - Run zcat /proc/config.gz | grep -i btrfs to check Btrfs filesystem support in the kernel
- CONFIG_BTRFS_FS=y means built-in; =m means available as a module; not present means disabled
- Try checking other features: grep -i ext4, grep -i kvm, grep -i cgroup to see virtualization and container support
zcat /proc/config.gz | grep -i btrfs What You Can Do
- Full Gentoo Linux QEMU VM with KDE Plasma desktop
- VNC desktop access (graphical) + terminal console
- Complete Portage tree with emerge, equery, eselect
- Inspect make.conf, USE flags, and package masks
- Browse the ebuild tree and package database
- Explore kernel configuration and modules
Learning Objectives
- Navigate Portage and search packages
- Read make.conf configuration
- Use the VNC desktop
- Understand USE flags
- Explore binary package system
- Use equery for package analysis
- Read and understand ebuilds
- Manage overlays and repositories
- Explore package masking
- Analyze ebuild phases
- Inspect kernel configuration
- Explore package database internals
Key Commands
emerge --searchSearch packagesemerge --infoSystem infoequery listList installedcat /etc/portage/make.confBuild configWaiting for VM desktop...
--- About Argo OS
Argo OS is a custom Gentoo-based distribution optimized for distributed compilation. The build swarm uses 70+ cores across two sites to compile packages in parallel, with binary package distribution to all machines.