How to Play Chess in Your Linux Terminal (With Multiplayer Support … – MUO – MakeUseOf
Chess is the original 4X RPGgiving you command of territory and an army, together with a mission to explore and expand across the board, exploit your enemy's weakness, and then exterminate your opponent.
While it's simple to play online chess in a browser, you can also stage a two-player chess game in your terminal, either with an opponent in the same room or via SSH, meaning your opponent could be anywhere in the worldor beyond. Here's how.
Chess is one of the greatest games of all time, with a history going back to the 6th Century Gupta Empire in India. Although the rules have been refined over time, chess has remained popular due to its accessibility, and the cerebral challenge of pitting one person's skills against another.
If you've never played chess before, don't fret; you can easily learn to play Chess on your phone.
Traditionally, chess is a two-player game, played using a physical board with 64 squares, and two armies of 16 pieces.
Before the advent of the internet, if you wanted to play chess with someone who wasn't in the same room as you, each player would have to have their own chess board and communicate their moves via a letter telegram, phone, or a message in the newspaper.
Today, you can use mobile apps to instantly join chess games, or open a web browser and join one of the many online chess sessions on dedicated sites.
But mobile apps can be costly, and not everyone has a computer with a web browseror even a graphical desktop.
With Gambit, you can create a chess game in your terminal, and play with the person sitting next to you. Alternatively, you can serve or join a game over SSH, meaning you can play instantly against anyone in the world.
Gambit is written in Google's Go language, so before you start, make sure that you have Go installed on your Linux system.
If your distro supports Snap, the easiest way to install Go is with:
With Go installed, you can install Gambit with:
This command will install the Gambit binary to ~/go/bin/gambit.
You can make the binary accessible from any terminal location by creating a symbolic link with the ln command:
You can then start Gambit with:
Alternatively, you can install Gambit by cloning its GitHub repository:
Then, use the cd command to navigate to the new directory:
Finally, start Gambit with:
If you're a fan of Snap packages, you can install Gambit with the snap command as follows:
If you've read this far, it's probably safe to say that you know at least the basics of how to play chess.
The game starts as soon as you open Gambit, and you'll see a chess board, complete with representations of the chess pieces in either white or black with a white outline.
When it's your turn to move, click on a piece. You'll see a colored dot representing the spaces your piece can move to. Click on one to move your piece.
Alternatively, if your machine doesn't have a mouse, you can use the keyboard to type out the square the piece you want to move is on, then type out the square onto which you want to move the piece.
The only minor gripe we have with playing chess this way is that the chessboard squares are all black, rather than black and white. This can make it a little difficult to easily visualize paths for your pieces.
If you're playing against an opponent on the same computer, you can press the Ctrl + F key combo to flip the board around to give them a better view of the action.
But if you're sitting next to someone, it's probably just as easy, and slightly more satisfying, to break out a real chess board and set up the pieces. It's in playing remote players that Gambit comes into its own.
Secure Shell (SSH) is a protocol used to connect to remote devices securely, and with it, you can host a chess game with Gambit and have other players connect to it.
Before you start, you'll need to create an SSH key. It's not in the documentation, but Gambit will reject keys created with the RSA algorithm. You'll need to use the newer ECDSA algorithm with a minimum key size of 256 bits to host a chess game over SSH with Gambit.
On the host machine, enter:
Choose whether you want to use a password, and then hit Enter. You can find your new key pair in the "~/.ssh/" directory.
If you're playing against an opponent on a different network, the host will need to open port 53531 on their router and forward connections to the host machine's IP address. This requires you to have some basic knowledge about port forwarding on a router.
To start the Gambit server, enter:
Gambit will start the server on port 53531, and players can connect to the game with:
...where room_name is a name picked by the first player to join.
Back on the host machine, you won't find a chessboard in your existing terminal window. Open a second window or tab, then enter:
You can now play a game against your opponent.
If you know your opponent and schedule regular matches against them, Gambit makes it super easy to create or connect to a match.
If your friends don't play chess, don't use Linux, or if you just don't have any friends, you can play solitaire in your terminal instead!
Read more here:
How to Play Chess in Your Linux Terminal (With Multiplayer Support ... - MUO - MakeUseOf
- Magnus Carlsen Beats ChatGPT in Chess Without Losing a Piece - Time Magazine - July 20th, 2025 [July 20th, 2025]
- Humpy, Harika, Divya, Vaishali in Chess Women's World Cup QF: Indian Sports LIVE, July 20 - ESPN - July 20th, 2025 [July 20th, 2025]
- Quick Analysis: How Praggnanandhaa beat Magnus Carlsen for 2nd time in three days in Las Vegas Freestyle Chess event - The Indian Express - July 20th, 2025 [July 20th, 2025]
- Magnus Carlsen: The face (and pants) of chess - Morning Brew - July 20th, 2025 [July 20th, 2025]
- The Indian city thats pumping out chess champions - Morning Brew - July 20th, 2025 [July 20th, 2025]
- Hans Niemann hits back at critics after 'hate-watching' accusations at Freestyle Chess event: 'What would you call...' - Firstpost - July 20th, 2025 [July 20th, 2025]
- Vishy Anand on Magnus Carlsens fist smash moment: Like falling and injuring yourself 2 metres before finish line - The Indian Express - July 20th, 2025 [July 20th, 2025]
- Praggnanandhaa vs Magnus Carlsen: How Indias rising chess star eclipsed World No.1 twice in a week at Las Vegas Freestyle event - The Indian Express - July 20th, 2025 [July 20th, 2025]
- 'Musical Chess' teaches Upstate students the game of chess using music - WYFF - July 20th, 2025 [July 20th, 2025]
- Detroit to host wild final chess tournament and the game isnt over until the king burns - Detroit Free Press - July 18th, 2025 [July 18th, 2025]
- A former NBA star has a grand master plan to make chess cooler - The Washington Post - July 18th, 2025 [July 18th, 2025]
- 18 year-old weeps after becoming youngest-ever world chess champion - Detroit Free Press - July 18th, 2025 [July 18th, 2025]
- Google's AI Refuses to Even Play Chess Against 1977 Atari, After Hearing What It Did to Other Cutting-Edge AIs - Futurism - July 18th, 2025 [July 18th, 2025]
- Judit Polgrs Team Triumphs at Star-Studded NBAChess Crossover Festival - Hungary Today - July 18th, 2025 [July 18th, 2025]
- Las Vegas Grand Slam: How is Freestyle Chess different from other formats? Here's what you need to know - Firstpost - July 18th, 2025 [July 18th, 2025]
- This Hidden-Gem Indie Film With 86% on RT Was Hailed as 'The Weirdest Movie Ever Made' (& You Need to Mentally Prepare for It) - Comic Book... - July 18th, 2025 [July 18th, 2025]
- FIDE Womens Chess World Cup: Zhu Jiner wins to bring parity with Divya Deshmukh - Times of India - July 18th, 2025 [July 18th, 2025]
- Biggest Chess Site In The World Bans 100,000 Accounts A Month For Cheating - Kotaku - July 18th, 2025 [July 18th, 2025]
- Levon Aronian scored a 2:0 victory over GM Magnus Carlsen in the tiebreak at the ongoing "Freestyle Chess Grand Slam Tour" tournament in Las... - July 18th, 2025 [July 18th, 2025]
- Chess | Hans Niemann on Magnus Carlsen losing two games in Vegas 'Best day of my life' - Times of India - July 18th, 2025 [July 18th, 2025]
- Magnus Carlsen is chess powerful disruptor and he wants to go mainstream: Change is needed - The Athletic - The New York Times - July 16th, 2025 [July 16th, 2025]
- Google Gemini crumbles in the face of Atari Chess challenge admits it would 'struggle immensely' against 1.19 MHz machine, says canceling the match... - July 16th, 2025 [July 16th, 2025]
- English breakfast: Serving 1.c4 on the chessboard - The Indian Express - July 16th, 2025 [July 16th, 2025]
- Derrick Rose is looking for purpose in retirement. Chess might provide an answer for the ex-NBA MVP. - Chicago Tribune - July 16th, 2025 [July 16th, 2025]
- Chess Day, Discovery Day and a free football camp: 3 things to do this weekend in Baton Rouge - The Advocate - July 16th, 2025 [July 16th, 2025]
- Google's Gemini AI backed out of a chess match against a 46 year-old Atari 2600 engine after suffering a crisis of confidence: 'Canceling the match is... - July 16th, 2025 [July 16th, 2025]
- Freestyle Chess Kicks Off Landmark Week in Las Vegas - Chess News | ChessBase - July 16th, 2025 [July 16th, 2025]
- Biel Chess Festival: All draws in the Masters, all decisive games in the Challengers - Chess News | ChessBase - July 16th, 2025 [July 16th, 2025]
- Defending The Honor Of The Reversed Grunfeld - Chess.com - July 16th, 2025 [July 16th, 2025]
- 10 Fascinating Facts About Chess to Know Ahead of Its Broadway Revival - Broadway Shows - July 16th, 2025 [July 16th, 2025]
- How to bet on chess at the Esports World Cup: Sportsbooks, odds, and more - esports.gg - July 16th, 2025 [July 16th, 2025]
- Alexandr Fier triumphs in Caiob - Chess News | ChessBase - July 16th, 2025 [July 16th, 2025]
- India-China: Two Cant Wango, Its All Chess Moves - Times of India - July 16th, 2025 [July 16th, 2025]
- Gemini AI refuses to play chess with Atari after hearing ChatGPT lost - Boy Genius Report - July 16th, 2025 [July 16th, 2025]
- Derrick Rose teams up with Magnus Carlsen to host NBAchess crossover event at Las Vegas - Times of India - July 16th, 2025 [July 16th, 2025]
- Humpy, Divya progress to Chess WC pre-quarterfinals, other Indians to fight in playoffs: Indian Sports, July 14 - ESPN - July 14th, 2025 [July 14th, 2025]
- 17-year-old chess champion win 53rd Chess Open at Philadelphia - The New Indian Express - July 14th, 2025 [July 14th, 2025]
- My Experiences Writing a Second Book "Secrets of Trapping Pieces: Fundamentals" - Chess.com - July 14th, 2025 [July 14th, 2025]
- Chessnut Move : A Robotic Chess Set with Pieces That Move Themselves - Geeky Gadgets - July 14th, 2025 [July 14th, 2025]
- Wimbledon 2025: Where Amanda Anisimova v Iga Swiatek final will be won or lost - BBC - July 12th, 2025 [July 12th, 2025]
- When Magnus Carlsen beat ChatGPT at chess in 53 moves without losing a piece: I sometimes get bored - The Indian Express - July 12th, 2025 [July 12th, 2025]
- Niemann Joins Ranks Of Freestyle Winners Ahead Of Grand Slam - Chess.com - July 12th, 2025 [July 12th, 2025]
- Copilot and ChatGPT went against a 4 KB Atari chess game from the 70s with an embarrassing effort from Microsoft's AI - Windows Central - July 12th, 2025 [July 12th, 2025]
- Im a statistics professor who became embroiled in the world of online chess drama - The Conversation - July 12th, 2025 [July 12th, 2025]
- Chess: Magnus Carlsen beats ChatGPT without losing a piece, AI tool predicts World No. 1's rating - Times of India - July 12th, 2025 [July 12th, 2025]
- PG&E contractor madness and a bit about chess - Red Bluff Daily News - July 12th, 2025 [July 12th, 2025]
- In Her Own Words: Ashley Lynn Priore empowers women through chess - The Business Journals - July 12th, 2025 [July 12th, 2025]
- Queen on the chess board: Rockets coach Ben Sullivan on emerging star Amen Thompson - Rockets Wire - July 12th, 2025 [July 12th, 2025]
- Magnus Carlsen has a message for Ronaldo ahead of Esports World Cup: 'Don't know what Ronaldo has done on chessboard' - Firstpost - July 12th, 2025 [July 12th, 2025]
- I'm a statistics professor who became embroiled in the world of online chess drama - Phys.org - July 10th, 2025 [July 10th, 2025]
- Gukesh 'deserved D' for his Norway Chess performance but 'given that he survived...': Vishy Anand grades world champion - Hindustan Times - July 10th, 2025 [July 10th, 2025]
- Uniting continents behind bars: 5th FIDE Intercontinental Online Chess Championship for Prisoners - FIDE - July 10th, 2025 [July 10th, 2025]
- Magnus Carlsen after Zagreb win: When nobody else has a great performance, my B-game is usually enough - The Indian Express - July 10th, 2025 [July 10th, 2025]
- Chess reigns as Pennsylvania's top board game, board game renaissance attracts all ages - WFMZ.com - July 10th, 2025 [July 10th, 2025]
- Le Wins Leon Masters; Oro Impresses Vs. Anand - Chess.com - July 10th, 2025 [July 10th, 2025]
- Mentor Anand raises Gukeshs grade from D minus to B after Norway Chess wins over Carlsen & Arjun - The Economic Times - July 10th, 2025 [July 10th, 2025]
- Done in 64 seconds: How final Gukesh vs Magnus Carlsen battle in Zagreb ended in 14 moves, and barely lasted a minute - The Indian Express - July 10th, 2025 [July 10th, 2025]
- Bobby Fischer The Man Behind the Moves - Chess.com - July 10th, 2025 [July 10th, 2025]
- FIDE announces the list of players at the 2025 Grand Swiss International Chess Federation - FIDE - July 10th, 2025 [July 10th, 2025]
- Viswanathan Anands grade for Gukesh after Norway Chess: Ill give him a B he deserved a D, but got a lot of answers correct - The Indian Express - July 8th, 2025 [July 8th, 2025]
- Acts of generosity emerge from crash in Wyoming and a chess tournament in Seattle - CBS News - July 8th, 2025 [July 8th, 2025]
- 12-Year-Old Chess Master Is First Wyoming Girl Invited To National Tournament - Cowboy State Daily - July 8th, 2025 [July 8th, 2025]
- Magnus Carlsen and Gukeshs Zagreb event in numbers: World champion started with 0.3% chance of winning; world no 1 lost just twice in 27 games - The... - July 8th, 2025 [July 8th, 2025]
- Meet Renjith Balakrishnan: The man who left his job at Facebook to start his own chess ecosystem - ChessBase India - July 8th, 2025 [July 8th, 2025]
- Gukesh settles for pragmatic 3rd place; Magnus Carlsen shrugs and clucks his way to Zagreb victory - The Indian Express - July 8th, 2025 [July 8th, 2025]
- THE WEEK IN CHESS 1600 7th July 2025 by Mark Crowther - The Week in Chess - July 8th, 2025 [July 8th, 2025]
- A car accident leads to generosity and 2 brothers use chess to make a difference - CBS News - July 8th, 2025 [July 8th, 2025]
- Chess | 'My B-game is usually enough' - Magnus Carlsen takes a swipe at competitors after winning SuperUn - The Times of India - July 8th, 2025 [July 8th, 2025]
- SuperUnited Croatia Rapid and Blitz 2025 - The Week in Chess - July 8th, 2025 [July 8th, 2025]
- FIDE Women's World Cup: Everything you need to know! - Chess News | ChessBase - July 8th, 2025 [July 8th, 2025]
- All you need to know about Ella Carlsen, chess superstar Magnus Carlsens wife - Indulgexpress - July 8th, 2025 [July 8th, 2025]
- A 1979 Game Just Handed AI One Of Its Most Humiliating Losses Yet - Screen Rant - July 8th, 2025 [July 8th, 2025]
- Magnus Carlsen says he defeated Gukesh by playing old-man chess; Garry Kasparov says Indian played some terrible games today - The Indian Express - July 6th, 2025 [July 6th, 2025]
- Chess | 'Shocking' - Magnus Carlsen takes another swipe at World Champion Gukesh - Times of India - July 6th, 2025 [July 6th, 2025]
- Chess Master at the park - The Advocate - July 6th, 2025 [July 6th, 2025]
- Its in her blood! Explaining the crazy story behind PinkPantheress viral chess picture - The Tab - July 6th, 2025 [July 6th, 2025]
- Science of Chess: Winning Streaks, Losing Streaks, and Skill - Chess.com - July 6th, 2025 [July 6th, 2025]
- How Gukesh turned grindmaster to take 3-point lead at Zagreb after three days of rapid chess - The Indian Express - July 6th, 2025 [July 6th, 2025]
- Chess will never be ruled by a queen - The Times - July 6th, 2025 [July 6th, 2025]
- Whos a 'real' doctor? How Chess grandmaster Vidit Gujrathi vs The Liver Doc's viral war of words began... - The Economic Times - July 6th, 2025 [July 6th, 2025]