Enjoy the Classic Snake Game in Your Linux Terminal

2 min


This is how you can install and play the classic Snake Game in Linux Terminal.

Remember the classic and simple snake game of old mobile phones? I remember playing it for hours. Hey, no other options at the time, right? Smartphones were still not in the market. And all you have is this –

Nokia 3310 with legacy snake game
Nokia 3310 with legacy snake game

But over time, the Snake Game was replaced by more advanced graphical games with various options. But nothing beats that classic snake game.

And what if I told you, you could play this game in the Linux Terminal itself? Whether you are running Ubuntu Linux, Fedora Linux or Arch Linux doesn’t matter. This game is available for most of the distros.

nsnake Game - Main Menu
nsnake Game – Main Menu

Install nSnake – Snake Game for Linux Terminal

You can install this game via the terminal using the below methods.

For Ubuntu, Linux Mint or other related distributions:

sudo apt install nsnake

For Fedora Linux and others:

sudo dnf install nsnake

For Arch Linux, this snake game is available in the Arch User repository. You can install it using the following steps.

yay -S nsnake

The above command installs the stock repository version of the game, which might not be the latest. However, if you want the latest version, you may need to compile the source via GitHub. I have added the compilation instructions at the end of this page for your reference.

Playing the game

Playing the game is very simple. Type nsnake in the terminal, which will launch the game.

To quit immediately, press q.

Following are the default key bindings.

  • Arrow keys – to move the snake
  • q – Quit the game
  • p – Pause the game

You can also configure the game in various ways, which are available via the main menu.

nsnake Linux Terminal Snake Game Settings
nsnake Linux Terminal Snake Game Settings

So, enjoy!

Compilation

To compile the latest version, use the following commands in all Linux distributions.

Oh, make sure you have git and ncurses-devel installed, which are the required packages for compilation.

git clone https://github.com/alexdantas/nSnake.git
cd nsnake
make
make install

So, do you like Snake Game? Do you prefer it over other terminal-based games? Share your views with other readers in the comment box below.


Arindam

Creator and author of debugpoint.com. Connect with me via Telegram, 𝕏 (Twitter), or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments