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
- FIDE reveals host city for Gukesh vs Sindarov World Championship clash; youngest-ever title match in ches - The Times of India - July 28th, 2026 [July 28th, 2026]
- This 15-year-old chess prodigy from Tamil Nadu wanted to quit because it was too expensive; his father, w - The Times of India - July 28th, 2026 [July 28th, 2026]
- 3D chess: The interwoven tanker effects of Iranian, Houthi and Ukrainian attacks - Lloyd's List - July 28th, 2026 [July 28th, 2026]
- Chess Champion Hated the Game, Until It Saved the Day - Anash.org - July 28th, 2026 [July 28th, 2026]
- Chess on wheels: The psychology of the Tour de France - BBC - July 28th, 2026 [July 28th, 2026]
- This Netflix Documentary Tells The Story of The Jewish Queen of Chess - Kveller - July 28th, 2026 [July 28th, 2026]
- USA vs. Uzbekistan: WR Chess Rapid & Blitz Miami 2026 | Match - All the Information - Chess.com - July 28th, 2026 [July 28th, 2026]
- The Geneva Convention: Gukesh And Sindarov Will Meet For World Championship In Switzerland - World Chess - July 28th, 2026 [July 28th, 2026]
- Titled-Tuesday-Blitz-July-28-2026 - Chess.com - July 28th, 2026 [July 28th, 2026]
- World Chess Championship to Be Held in Switzerland - teleSUR English - July 28th, 2026 [July 28th, 2026]
- 11-Year-Old Bodhana Sivanandan Breaks 38-Year Chess Record With Win Over French Grandmaster - communitynews.org - July 28th, 2026 [July 28th, 2026]
- Geneva to host Gukesh vs Sindarov World Chess Championship match in Nov-Dec 2026 - The Indian Express - July 28th, 2026 [July 28th, 2026]
- Global Chess League to take place in India's Silicon Valley: Carlsen, Sindarov and Anand in the mix - Chess News | ChessBase - July 28th, 2026 [July 28th, 2026]
- The politics of playing chess in movies - The Boston Globe - July 28th, 2026 [July 28th, 2026]
- Its nice to be able to admire chess pieces as works of art, on top of being instruments of play - Le Louvre - July 28th, 2026 [July 28th, 2026]
- Ord Minnett Reaffirms Their Buy Rating on Newmont Corporation CHESS (NEM) - The Globe and Mail - July 28th, 2026 [July 28th, 2026]
- Citi Sticks to Their Buy Rating for Newmont Corporation CHESS (NEM) - The Globe and Mail - July 28th, 2026 [July 28th, 2026]
- Author Raul A. Castillos New Book, "Chess: Simple and Easy," is an Intuitive Guide Designed to Help Beginners and Seasoned Players Alike... - July 28th, 2026 [July 28th, 2026]
- Macquarie Keeps Their Buy Rating on Newmont Corporation CHESS (NEM) - The Globe and Mail - July 28th, 2026 [July 28th, 2026]
- Newmont Corporation CHESS (NEM) Gets a Buy from UBS - The Globe and Mail - July 28th, 2026 [July 28th, 2026]
- Woodward and Tang retain US junior titles with convincing performances - Chess News | ChessBase - July 28th, 2026 [July 28th, 2026]
- Global Chess League Building team chemistry will be key to success, says Nihal Sarin - Sportstar - July 28th, 2026 [July 28th, 2026]
- Chess: Bodhana Sivanandan, 11, breaks world age record from 38 years ago - The Guardian - July 24th, 2026 [July 24th, 2026]
- Russian head of FIDE suspends activity over EU sanctions - Reuters - July 24th, 2026 [July 24th, 2026]
- White to move and mate in two #852 Common Sense in Chess - Daily Kos - July 24th, 2026 [July 24th, 2026]
- Chess, Hacking, and More: Jason M. Hough on Writing Protagonists with Niche Skills - CrimeReads - July 24th, 2026 [July 24th, 2026]
- Alireza Firouzja clinches Chennai Grand Masters title ahead of Arjun Erigaisi - The Indian Express - July 24th, 2026 [July 24th, 2026]
- Its a Shallow World but Im a Big Girl Now: Chess Smith Turns Betrayal into a Pure Pop Celebration on Im Dead To You (And Thats OK) - Atwood Magazine - July 24th, 2026 [July 24th, 2026]
- International Scientific Conference Theory and Practice of Chess Education - European Chess Union - July 24th, 2026 [July 24th, 2026]
- From classics to computers: N Srinath on the evolution of chess training - The Times of India - July 24th, 2026 [July 24th, 2026]
- Aronian and Finek convincingly win 2026 Triathlons in Biel - Chess News | ChessBase - July 24th, 2026 [July 24th, 2026]
- USC Trojans' Most Important Chess Piece in Their Secondary - Sports Illustrated - July 24th, 2026 [July 24th, 2026]
- Jewish chess legend Judit Polgar declines offer to become Hungarys president - The Times of Israel - July 24th, 2026 [July 24th, 2026]
- World Chess Day marks the final countdown to the historic Samarkand Chess Olympiad - sportanddev - July 24th, 2026 [July 24th, 2026]
- What is the real magic of social chess? FIDE panel shares stories of change - FIDE - July 24th, 2026 [July 24th, 2026]
- Review: Mastering the London System by Elisabeth Phtz - Chess News | ChessBase - July 24th, 2026 [July 24th, 2026]
- Chess trial rescheduled for Oct. as Harrison Courthouse upended by effects of flooding in neighboring counties - WV News - July 24th, 2026 [July 24th, 2026]
- Gukesh, Pragg headline as India announce team for 2026 Chess Olympiad - The Indian Express - July 24th, 2026 [July 24th, 2026]
- Basilisk signs world No. 8 Anish Giri, Pairing Him With Vincent Keymer on Stacked Chess Roster - GamesBeat - July 24th, 2026 [July 24th, 2026]
- Mans World promised chess lessons, but detectives say it was offering something else - WPLG Local 10 - July 24th, 2026 [July 24th, 2026]
- Gukeshs struggle not a surprise for Niemann: Never really best in the world - The Indian Express - July 24th, 2026 [July 24th, 2026]
- Upcoming tournaments and events - Chess News | ChessBase - July 24th, 2026 [July 24th, 2026]
- Viswanathan Anand takes over as FIDE interim president after EU sanctions on Dvorkovich - The Indian Express - July 24th, 2026 [July 24th, 2026]
- India's 99th GM! Sleepless nights, depressing times, and then chess Grandmaster: The making of Rathanvel VS - The Times of India - July 20th, 2026 [July 20th, 2026]
- Is online gaming ruining chess? Players say its not quite as black and white as that - The Independent - July 20th, 2026 [July 20th, 2026]
- Hungarian Prime Minister proposed that chess player Judit Polgr become president - () - July 20th, 2026 [July 20th, 2026]
- Judit Polgar, The Leading Light Of Women's Chess, Nominated for Hungarian Presidency - World Chess - July 20th, 2026 [July 20th, 2026]
- Chess hero Judit Polgar could shatter another glass ceiling as Hungary president - The Indian Express - July 20th, 2026 [July 20th, 2026]
- Magyar announced that he would propose the chess player as Hungary's president - LIGA.net - July 20th, 2026 [July 20th, 2026]
- Could Russia be about to lose its grip on chess leadership? - DW.com - July 20th, 2026 [July 20th, 2026]
- A Mom Found Out Her Sons Chess Club Coach Had Been Entering Students Into Paid Tournaments Under His Own Company Without Parental Consent Forms -... - July 20th, 2026 [July 20th, 2026]
- Start the chess game in the politics of Budapest. Who does Peter Magyar propose for the presidency of Hungary? - Informat.ro - July 20th, 2026 [July 20th, 2026]
- Vishy Anand: Feels like were all beating Gukesh on the head (with his bad form) - The Indian Express - July 20th, 2026 [July 20th, 2026]
- Canadian Open Chess Championship 2026 | Open - All the Information - Chess.com - July 18th, 2026 [July 18th, 2026]
- Will There One Day be a Chess Chabad House? - Chabad - July 18th, 2026 [July 18th, 2026]
- Passport, visa, Rs 67 lakh worth of gear lost, stranded alone in Europe: Survival of 16-year-old Md Imran, India's upcoming chess Grandmaster - The... - July 18th, 2026 [July 18th, 2026]
- How a Chess Club is Bringing Unlikely Pairs Together in Port Hueneme - News Channel 3-12 - July 18th, 2026 [July 18th, 2026]
- Throw it all out: My parents stuff is more than clutter - The Washington Post - July 18th, 2026 [July 18th, 2026]
- Anonymous NFL coach credits Bengals for making wide receiver Ja'Marr Chase 'the ultimate chess piece' thanks to key evolution - A to Z Sports - July 18th, 2026 [July 18th, 2026]
- Analysts Offer Insights on Technology Companies: Life360 Shs Chess Depository Interests Repr 3 Sh (OtherLIFX), Block (XYZ) and Rambus (RMBS) - The... - July 18th, 2026 [July 18th, 2026]
- Detroit Lions may have quietly created the offensive chess piece nobody saw coming - A to Z Sports - July 16th, 2026 [July 16th, 2026]
- Chessnut Evo Review: 6 Weeks With the AI Chess Board That Got Me Off My Phone - Man of Many - July 16th, 2026 [July 16th, 2026]
- Gainesville teen sets sights on U.S. Junior Chess Championships - The Independent Florida Alligator - July 16th, 2026 [July 16th, 2026]
- Biel: Aronian and Finek outright winners in rapid segment - Chess News | ChessBase - July 16th, 2026 [July 16th, 2026]
- Invitation to the 13th Lebu Open - Chess News | ChessBase - July 16th, 2026 [July 16th, 2026]
- Opinion: Poilievre can only smile and nod after Carneys chess move - Winnipeg Free Press - July 16th, 2026 [July 16th, 2026]
- Passport, visa, Rs 67 lakh worth of gear lost, stranded alone in Europe: Survival of 16-year-old Md Imra - The Times of India - July 16th, 2026 [July 16th, 2026]
- Rochester Chess Festival draws hundreds to the Med City - KTTC | Rochester, MN - July 13th, 2026 [July 13th, 2026]
- The 1858-Rated Kid Who Beat a Super-GM - The Underdog - Chess News | ChessBase - July 13th, 2026 [July 13th, 2026]
- Drunk Frat Boyz and Evil Chess Nerds | Interview: Rebeccah Heinrichs - American Enterprise Institute - AEI - July 13th, 2026 [July 13th, 2026]
- Chess park: When Bobby Haywood preceded Bobby Fischer, and then vanished - The Indian Express - July 13th, 2026 [July 13th, 2026]
- Chess: Firouzja wins in Zagreb as Carlsen passes 15-year milestone at the top - The Guardian - July 11th, 2026 [July 11th, 2026]
- Biel Chess Festival 2026 | ACCENTUS Chess960 Masters (ACC) - All the Information - Chess.com - July 11th, 2026 [July 11th, 2026]
- When Erling Haaland isnt playing in the World Cup, he's investing in chess and starring in a movie - Fortune - July 11th, 2026 [July 11th, 2026]
- Fifty years ago: Korchnoi's defection to the west - Chess News | ChessBase - July 11th, 2026 [July 11th, 2026]
- Hatsune Miku Plays Every Piece on the Board in This Six-Figure Chess Set - Hypebeast - July 11th, 2026 [July 11th, 2026]
- South Africa explores historic bid for first African Chess Olympiad International Chess Federation - FIDE - July 11th, 2026 [July 11th, 2026]
- Newtown Chess Club Returns After Six Years - The Newtown Bee - July 11th, 2026 [July 11th, 2026]
- Chess, concentration, and community: An interview with Timur Turlov International Chess Federation - FIDE - July 11th, 2026 [July 11th, 2026]
- Professional players converge on Rochester for weekend-long chess festival - KTTC | Rochester, MN - July 11th, 2026 [July 11th, 2026]