Unix Icon

Unix

Unix is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix.
18 Stories
All Topics

Unix punkx.org

The UNIX Pipe Card Game

An actual card game to teach actual kids how to actually combine unix commands with pipes.

task: print the most common line from a file, we need to first cat the file (in our case the file is card 03.txt), then sort it, uniq count it, then do numeric sort, then tail -1:

answer: cat 03.txt | sort | uniq -c | sort -n | tail -1

Print it yourself or… actually it’s sold out for now so you’ll have to print it yourself.

The UNIX Pipe Card Game

Changelog Interviews Changelog Interviews #484

Wisdom from 50+ years in software

Today we have a special treat. A conversation with Brian Kernighan! Brian’s been in the software game since the beginning of Unix. Yes, he was there at Bell Labs when it all began. And he is still at it today, writing books and teaching the next generation at Princeton.

This is an epic and wide ranging conversation. You’ll hear about the birth of Unix, Ken Thompson’s unique skillset, why Brian thinks C has stood the test of time, his thoughts on modern languages like Go and Rust, what’s changed in 50 years of software, what makes platforms like Unix and the web so powerful, his take as a professor on the trend of programmers skipping the university track, and so much more.

Seriously, this is a must-listen.

Learn rtpg.co

Writing your own sudo

Learn how sudo works by writing your own version in Python!

One might think that sudo is actually some binary deeply integrated into the kernel, relying on a special purpose-built system call to achieve its functionality. After all, it lets you use root without even providing the password for that account! But thanks to one bit inside file permissions, sudo can exist without any of this.

Terminal browsix.org

Browsix – Unix in a browser tab

Your first thought when reading that headline might’ve been _WebAssembly. Mine was! But no, that is not how Browsix does its thing:

Browsix is a framework that bridges the considerable gap between conventional operating systems and the browser, enabling unmodified programs expecting a Unix-like environment to run directly in the browser. Browsix does this by mapping low-level Unix primitives, like processes and system calls, onto existing browser APIs, like Web Workers and postMessage.

They have examples of this tech enabling a terminal in the browser, a Latex editor, and even a client/server-based meme generator written in JS and Go.

Terminal vitalyparnas.com

Clever uses of pass, the Unix password manager

Turns out the pass command on your local Linux box can be used for a bunch of encryption-related things in addition to what most of us use it for: managing a user’s password.

One cool example is you can hide API keys from shoulder surfers (and history’s memory) by storing the key encrypted on disk and using pass to access it at runtime:

curl -H "API-Key: $(pass provider/api_key)" ...

Practices raku-advent.blog

Following the Unix philosophy without getting left-pad

An excellent analysis of the age-old dependency management problem:

At this point, I hope the tension is pretty clear: on the one hand, it’s great to keep components small, simple, and composable. On the other hand, it’s terrible to bury yourself in a tangle of different packages, no matter how tiny they are. The Unix philosophy and killing your dependencies pull in opposite directions.

But the author doesn’t stop there. They also offer a potential solution, which shouldn’t be a surprise to anyone, requires a compromise.

Brett Cannon snarky.ca

Introducing the Python launcher for Unix

Brett Cannon:

… over 3 years ago I set out to re-implement the Python Launcher for Unix in Rust. On July 24, 2021, I launched 1.0.0 of the Python Launcher for Unix… This gives you a py command on Unix which will always use the newest version of Python.

He goes on to describe some workflow niceties that a built in and also what this project is not about:

The Launcher is purely a convenience and not meant to be The Launcher For All Things; this should never end up in a Docker container.

Productivity github.com

A Unix-style personal search engine and web crawler for your digital footprint

Apollo is a different type of search engine. Traditional search engines (like Google) are great for discovery when you’re trying to find the answer to a question, but you don’t know what you’re looking for.

However, they’re very poor at recall and synthesis when you’ve seen something before on the internet somewhere but can’t remember where. Trying to find it becomes a nightmare - how can you synthezize the great material on the internet when you forgot where it even was? I’ve wasted many an hour combing through Google and my search history to look up a good article, blog post, or just something I’ve seen before.

If you scan Apollo’s README, you’ll know the author has put a lot of thought into this project. The more I grokked it, the more I thought of Monocle (which we’re doing an episode about soon). Turns out, it’s a direct inspiration (along with Serenity OS for the design).

Command line interface prithu.xyz

The beauty of Unix pipelines

I would like to show some examples of this philosophy in action – of how one can use different unix tools together to accomplish something powerful.

This post takes you step-by-step through printing a leaderboard of authors based on number of commits to a git repo, browsing memes on reddit, setting your desktop wallpaper, and getting a random movie from an IMDB list.

Jeffrey Paul sneak.berlin

Stupid unix tricks

Jeffrey Paul shares a ⛴ load of goodies. I particularly like this idea:

I have a Makefile in my home directory… that I use to store common tasks related to my local machine… The one I use most often, though, is make clean, which takes everything in ~/Desktop and moves it into ~/Documents/$YYYYMM (creating the month directory in the process if it doesn’t exist), and also empties trashes.

Reader beware: 4154 words, approximately a 23 minute read

Rust github.com

An open source Spotify client running as a Unix daemon

Spotifyd streams music just like the official client, but is more lightweight, and supports more platforms. Spotifyd also supports the Spotify Connect protocol, which makes it show up as a device that can be controlled from the official clients.

There was previously a spotifyd written in C, but apparently Spotify killed the library it used, so they had to rewrite from scratch. ¯\(ツ)

Player art
  0:00 / 0:00