Solve a puzzle at the Linux command line with nudoku

Solve a puzzle at the Linux command line with nudoku

Sudokus are simple logic games that can be enjoyed just about anywhere, including in your Linux terminal.

Linux toy: Nudoku
Image credits : 

Jason Baker


Get the newsletter

Join the 85,000 open source advocates who receive our giveaway alerts and article roundups.

Welcome back to another installment in our 24-day-long Linux command-line toys advent calendar. If this is your first visit to the series, you might be asking yourself what a command-line toy even is. We’re figuring that out as we go, but generally, it could be a game, or any simple diversion that helps you have fun at the terminal.

Some of you will have seen various selections from our calendar before, but we hope there’s at least one new thing for everyone.

Every year for Christmas, my mother-in-law gives my wife a Sudoku calendar. It sits on our coffee table for the year to follow. Each day is a separate sheet (except for Saturday and Sunday, that are combined onto one page), with the idea being that you have a new puzzle every day while also having a functioning calendar.

The problem, in practice, is that it's a great pad of puzzles but not a great calendar because it turns out some days are harder than others and we just don't get through them at the necessary rate of one a day. Then, we may have a week's worth that gets batched on a lazy Sunday.

Since I've already given you a calendar as a part of this series, I figure it's only fair to give you a Sudoku puzzle as well, except our command-line versions are decoupled so there's no pressure to complete exactly one a day.

I found nudoku in my default repositories on Fedora, so installing it was as simple as:

$ sudo dnf install nudoku

Once installed, just invoke nudoku by name to launch it, and it should be fairly self-explanatory from there. If you've never played Sudoku before, it's fairly simple: You need to make sure that each row, each column, and each of the nine 3x3 squares that make up the large square each have one of every digit, 1-9.

You can find nudoku's c source code on GitHub under a GPLv3 license.

Do you have a favorite command-line toy that you we should have included? Our calendar is basically set for the remainder of the series, but we'd still love to feature some cool command-line toys in the new year. Let me know in the comments below, and I'll check it out. And let me know what you thought of today's amusement.

Be sure to check out yesterday's toy, Use your Linux terminal to celebrate a banner year, and come back tomorrow for another!

Linux toy: figlet

Need make sure your command is heard? Pipe it to a banner and it won't be missed.

About the author

Jason Baker - I use technology to make the world more open. Linux desktop enthusiast. Map/geospatial nerd. Raspberry Pi tinkerer. Data analysis and visualization geek. Occasional coder. Cloud nativist. Civic tech and open government booster.