I don't even use Plan 9.
Plan 9 is maintained by a bunch of passionate people who devote their life to this system.
The entire OS and all the tools within it are tiny by today's standards — a single person could understand all of its code. In a world full of complex technology it's easy to feel small and helpless, but fixing that bug in a program you frequently use, or adding some sort of functionality to it, all by yourself, feels empowering. If we could do that every now and then, we'd all be a little more open minded, a little more daring. A little harder to push around.
If you don't feel like using Plan 9 on a daily basis, it's still a fantastic resource for individuals to learn and experiment with any topic of operating systems. It makes for a great playground, and Bell Labs used it as such. A place to make new software or work with new hardware.
There's a non-negligible overlap between the Plan 9 and the Suckless communities — keep an eye out for fascists and tell them to suck less.
1. Mounting USB drives
USB drives mount automatically under /shr.
2. Working with Wi-Fi
This assumes all required firmware is in place and that your Wi-Fi interface is on #l1.
To bind the interface automatically on system init, add the following line to /cfg/$sysname/namespace. Note that this requires setting sysname in plan9.ini.
bind -a #l1 /net
Use the following script to connect to an access point:
#!/bin/rc
if (~ $#1 0 || ~ $1 -*) {
echo 'usage: wifi/connect ssid' >[1=2]
exit usage
}
aux/wpa -s $1 -p /net/ether1
ip/ipconfig -r ether /net/ether1
Use the following commands to disconnect:
ip/ipconfig ether /net/ether1 unbind # Probably can be skipped. kill wpa | rc
Use the following command to remove the password for an access point from factotum.
echo delkey proto=wpapsk essid=$ssid > /mnt/factotum/ctl
3. Hiding kernel messages
Create a /sys/log/consoles directory and add the following line to /cfg/$sysname/termrc:
cat /dev/kprint >>/sys/log/consoles/$sysname >[2=1] &
4. Exchanging files
4.1. Sending a file to a UNIX machine
nc -l -p 1234 > file
aux/dial tcp!$addr!1234 < file
4.2. Receiving a file from a UNIX machine
nc -l -p 1234 < file
aux/dial tcp!$addr!1234 > file
5. Recompiling the kernel (the old way)
cd /sys/src/9/pc64 mk clean mk mk install 9fs 9fat # rm /n/9fat/9bootfat # cp /386/9bootfat /n/9fat/ # chmod +al /n/9fat/9bootfat # defrag magic cp /amd64/9pc64 /n/9fat/
6. System initialization
- /$cputype/init
- /lib/namespace
- /lib/namespace.local (if exists)
- /lib/namespace.$sysname (if exists)
- /cfg/$sysname/namespace (if exists)
- cpurc or termrc
- cpurc.local or termrc.local (if exists)
- /cfg/$sysname/cpurc or /cfg/$sysname/termrc (if exists)
- /usr/$user/lib/profile
- riostart