Skip to content
Console Minesweeper clone for Plan 9
C Makefile
Branch: master
Clone or download
Latest commit bf09eef Jan 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix 9front build system and add compilation instructions Jan 13, 2019
.gitignore Fix support on Plan 9 (9front) Jan 13, 2019
9mine-9front.png Update README Jan 13, 2019
LICENSE Initial commit Jan 13, 2019 Update README Jan 13, 2019


Console Minesweeper clone for Plan 9 from Bell Labs.



This is a console port of Minesweeper for Plan 9. The main goal was to build a small game which would satisfactorily run on Plan 9, while taking advantage of it to learn more about how to write C programs for this OS.


You can either build this program for Plan 9 (using mk) or for Linux (using make and plan9port). All you need to do is compile the 9mine.c file.

On 9front

cd to the src folder, then run mk. This will build a 9mine application.

If you wish to install it to your system, just run mk install. This will move your application to your architecture’s bin/games folder. You will then be able to launch it using games/9mine.

Cross-compilation is also possible through mk. For example, to build the game for amd64, just run objtype=amd64 mk. The rest can be figured out from 9front’s FQA and the manpages.

On Linux

Make sure you have plan9port installed, and 9c / 9l are present in your $PATH.

cd to the src folder, then run make. This will produce a 9mine executable for your system’s architecture.

No installation means were provided for Linux, however it should be portable enough. The produced binary should have all Plan 9-related libraries statically linked already.


The interface is pretty straightforward, as you can see on the gif. CLI will guide you.

You can either step at an uncovered spot, put flags or doubts, and quit the game.

Passing the -d flag will start the game in Debug Mode, so you’ll get a Godview option to see all numbers and bombs in runtime as well.

Quitting the game will point the bombs in your current field.


This program was tested on the following systems:

  • Void Linux x86_64 (with plan9port);
  • 9front “Run From Zone” (2018/09/09).

I did not test it on other Plan 9 distributions. If you do, give me a heads up.


  • [ ] Display flag and bomb count
  • [ ] Add game winning logic


Thanks to Ricardo Lanziano (arpunk) for explaining a lot about Plan 9 stuff to me.


This program is free software, distributed under the BSD 2-Clause License. Copyright (C) 2019 Lucas Vieira.



You can’t perform that action at this time.