Linux is free and your mind is valuable

One of my favorite old Linux jokes is, “Linux is free… if your time is worthless.” This quote is possibly adapted from a jwz interview dating back to 1998. In it, he said:

I think Linux is a great thing, because Linux is an alternative to [major operating systems], and because, of all the operating systems that are at all relevant today, Unix is the best of a bad lot. […] As we all know, Linux is only free if your time has no value, and I find that my time is better spent doing things other than the endless moving-target-upgrade dance.

That said, I’ve run Linux dating back to my earliest days studying formal operating systems, when I did it mainly so that I’d have access to vim, shells, a solid gcc toolchain, and good x86 hardware emulation and virtualization tools. Somewhere along the way, though, I made it a point to make my day-to-day computing, if not completely imbued by the open source movement, at least “keyhole accessible” to its thriving core, which continues to be Linux. So, for me, as a point of pride, it has been Linux on the desktop, Linux on my smartphones (that is, Android Linux), and Linux on my smart TVs (that is, webOS). As well as Linux in the obvious places, like my cloud VMs, my Raspberry Pi, my physical server, etc.

I’m not a purist, though. I still use plenty of proprietary software in my life. And plenty of proprietary hardware, too. To stay connected to the world of Apple, I keep an iPad running iPadOS and a Mac Mini running macOS. To stay connected to the world of Microsoft, I keep a dual-boot’able partition for Windows 11 Pro. But I’d say 90% of my computing happens on some Linux variant, and that makes me feel good about having a more direct relationship with computing, where I can always peel back some layers of the onion as needed.

My latest was to shift from a very-very old laptop (my trusty Lenovo X1 Carbon Gen 8) to a not-quite-so-old laptop (a Lenovo X1 Carbon Gen 11). I’ve been sticking with Lenovo as my Linux laptop for awhile now, covered in past posts like “Speed & lightness” and “Lenovo and the new Linux desktop experience”.

Linux is free to run on your laptop

By doing a little research beforehand, I got a model off the Lenovo outlet store with a screen, webcam, and Intel architecture that is well-supported by Linux (summary: avoid MIPI webcam and avoid mobile WWAN). Specifically, it runs perfect with Ubuntu 24.04.1 LTS out-of-the-box. The only “tweak” I had to make was a workaround for thermald which was erroneously refusing to start on my CPU architecture — the fix was a rather easy systemd invocation and is described here.

In typical Linux “rabbit hole” style, learning a little bit about thermald (with the help of the source code reading and summarizing features of ChatGPT4 projects, incidentally) made me better understand how my laptop approaches battery and cooling performance.

Another change that is more from the world of security is learning about SecureBoot + TPM, two semi-controversial changes to the laptop hardware landscape that Linux didn’t support well until somewhat recently. More on this available in this Twitter/X thread. So, yet again, in fortuitous Linux rabbit hole style, I learned something about modern “security” hardware I wasn’t paying close attention to beforehand.

To get all my data moved over involved using external USB3.2 SSD drives, Ubuntu 24.04.1 live USB boot environments, GNU ddrescue, and some rather convoluted invocations of mount, rsync, LUKS (for full-disk encryption), LVM (for volume management), and update-grub + update-initramfs. This could have also been viewed as a time-wasting rabbit hole, but instead it taught me more about my full-disk encryption setup and the various stages of Linux boot, and really didn’t take too long at all. I was already running Ubuntu 24.04.1 on my older laptop, so that kept things rather simple.

I’ve been tracking my system customizations in amontalenti/home — the biggest change on that front is to just embrace some of the package installation mechanisms that live outside of deb/apt. Those are:

  • snap: for finicky desktop apps
  • flatpak: for other finicky desktop apps
  • AppImageLauncher: for OTHER finicky desktop apps, usually Electron apps
  • deb-get: for proprietary apps distributed via .debs but not via apt (good for things like Zoom and Discord)
  • pipx: for command-line apps installed “globally” via PyPI
  • uv: for dev-time Python interpreters, packages, and venvs
  • cargo: for command-line apps built with Rust
  • gvm: for command-line apps built with Golang
  • zvm: for command-line apps built with Zig
  • nvm: for command-line apps built with Node, JavaScript, or TypeScript

Leaning into the fragmentation despite its drawbacks has been liberating.

This certainly seems like a rat’s next of system installers, but for the lazy and focused developer, it lets me get access to the latest security updates (even if they are not Ubuntu packaged and even if they are proprietary), while also having a wide array of desktop apps and developer tools available.

I have also been using uv as my primary Python interpreter, venv, and package manager, which has been a breeze. Things feel really good on the Linux desktop right now. Far from being a waste of time, I feel like just as Linux has become the world’s #1 #2 operating system (more context on that), it has come into its own as my #1 desktop operating system.

And especially with the help of good code assistance tools from ChatGPT, Claude, Replit, and GitHub, I’m finding it fun to “be more ambitious” with scripting away annoyances in my desktop environment, picking the right tool for the job, as needed.

As an example, I recently wrote a bit of Python + Slack automation which I would have never tackled on my own, but since I could describe what I wanted to LLMs and test/run/edit generated code simply on my laptop within seconds (via uv), I got what I wanted within mere minutes.

But then I wrote a totally different automation where it made more sense to use JavaScript codegen, since I could leverage a well-maintained npm package to do most of the work. For that, I used a nvm to get the right environment for executing generated JavaScript code.

Finally, I noticed an unpackaged desktop tool in a C/C++ project that I wanted to have available. With the help of an LLM and repeated runs of make and apt, I could get it building on my machine, despite weird build-time issues like the need to pull in and vendor a specific Qt library.

It now seems like “Linux is free… if your time is worthless” is one of the worst possible pieces of advice to modern programmers. On Linux, you’re free to operate at the source code level, and the command-line level, much more comfortably. And we now have superhuman AI-style chat assistants who know all about code, shell invocations, and Linux. On Linux, you’re free to leverage personalized generated code to control your system. On Linux, LLMs trained on internet-wide documentation about open source automation is now available as your personal automation assistant, making even the best-maintained proprietary OS manuals and help sites seem antiquated.

Do you need to run Linux directly on your hardware to get these benefits? Of course not. Mitchell Hashimoto — the creator of terraform (a popular infrastructure-as-code tool) and ghostty (a new terminal emulator for Linux) — documented on Twitter/X how he accomplishes this from his Mac hardware by using a good virtualization system and running nixOS full-screen in graphical mode when he’s doing development, while using macOS for his other proprietary and other desktop apps. Presumably he’s an iPhone user — and via his work on ghostty, he’s a Swift + XCode developer, too. So this setup allows him to stay connected to Linux while avoiding issues related to Apple’s mono-platform ecosystem approach. By the way, he describes all the gory technical details of his setup on GitHub here. Even Windows users, these days, have quite a lot of Linux support available via Windows Subsystem for Linux v2, aka WSL2. These are all neat tricks and perfect examples of Linux being “the #1 #2 operating system,” as I mentioned above.

But, running Linux directly on my own hardware has a certain appeal to me, personally. It affords me the maximum of understanding, simplicity, and control.

However you manage to get there, as a developer, you really shouldn’t ignore Linux. On Linux, freedom and playfulness have been reunited in the programmer’s mind. On Linux, every little rabbit hole is a learning opportunity, and it has never been easier to pull yourself out of one when you fall in. Linux is free… and your mind is valuable. What a joy! Happy hacking!

References

  1. Linux: It’s Only Free If Your Time Has No Value. (jwz)
  2. Free and Open-Source Software. (Wikipedia)
  3. Android (Operating System). (Wikipedia)
  4. Android connection to the Linux kernel (android.com)
  5. webOS. (Wikipedia)
  6. webOS open source edition architecture. (webosose.org)
  7. Workaround to make systemd use thermald --ignore-cpuid-check for some Intel systems. (StackExchange)
  8. “Speed & Lightness”. (amontalenti.com)
  9. “Lenovo and the New Linux Desktop Experience”. (amontalenti.com)
  10. Twitter/X Thread on SecureBoot + TPM. (twitter.com/amontalenti)
  11. Linux as the “#1 #2 operating system”. (lobste.rs comment thread)
  12. “AI-enhanced development makes me more ambitious with my projects”. (simonwillison.net)
  13. Windows Subsytem for Linux v2, aka WSL2. (Wikipedia)

Linux installers for desktop packages and dev tools

On the subject of Linux installers for dev tools, two projects do catch my eye: mise and nix-shell. But I haven’t managed to put either one into daily use yet.

Leave a Reply

Your email address will not be published. Required fields are marked *