cat /dev/screen | topng > screencap.png

Posted on .

If you've never heard of Plan 9 from Bell Labs maybe this post isn't for you (or maybe it is). If you have any interest in Unix-like operating systems, then Plan 9 might be worth checking out.

For this you need a Raspberry Pi (I have a 3B+), an SD card, keyboard, mouse and an HDMI monitor. My work environment is GNU/Linux, so all commands are meant to be run on a GNU/Linux system. Insert the SD card in your system, make sure it’s not mounted and figure out its device name (you can typically do lsblk to figure this out).

$ wget https://9p.io/sources/contrib/miller/9pi.img.gz
$ gunzip -dc 9pi.img.gz | sudo dd bs=1M of=/dev/sda

Eject the SD card, put it into your Pi and plug in the power. The system should boot almost immediately.

The first thing to configure is some networking. Thankfully, the documentation p9wiki-networking can guide us:

term% ip/ipconfig

should exit with no output, any errors are reported.

To enable DNS, run:

term% ndb/dns -r

There’s this wonderful person, Sigrid, who writes applications for Plan 9. To get it simply do:

term% 9fs ftrv.se
term% ls /n/ftrv.se

and a whole list folders should show up.

This is what it looks like right after boot (plus the small terminal to take a screenshot):

Plan 9 on Raspberry Pi screenshot

(click to enlarge)

What’s next? Dig in and learn. Plan 9 feels quite different from GNU/Linux, but it’s still similar enough that I occasionally try commands that I usually use (and fail). For example, cp does not move folders, only files. Use dircp instead.

I started using GNU/Linux when I was 21 and was a pretty comfortable Windows user. The switch felt huge and nothing worked as I was used to, but this also meant that all the problems I faced could be solved with a fresh outlook that wasn’t obstructed by any preconceived notions. Getting into Plan 9 requires a little more conscious effort to forget that you’re not on a Unix system.

It’s refreshing though.

If you are interested in more, check out Devine who posted a long thread on Mastodon on his journey with Plan 9. It’s what got me started (again) on Plan 9. The wiki p9wiki is also a great resource.


Articles from blogs I follow around the net

In praise of Plan 9

Plan 9 is an operating system designed by Bell Labs. It’s the OS they wrote after Unix, with the benefit of hindsight. It is the most interesting operating system that you’ve never heard of, and, in my opinion, the best operating system design to date. Even …

via Drew DeVault's blog November 12, 2022

Making Hare more debuggable

Hare programs need to be easier to debug. This blog post outlines our plans for improving the situation. For a start, we’d like to implement the following features: Detailed backtraces Address sanitization New memory allocator DWARF support These are rou…

via Blogs on The Hare programming language November 4, 2022

Go’s Version Control History

A tour of Go’s four version control systems.

via research!rsc February 14, 2022

Generated by openring