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 is replaced by more advanced graphical games with varieties of options. But nothing beats that classic snake game.

And what if I told you, you can play this game in the Linux Terminal itself? It doesn’t matter whether you are running Ubuntu Linux, Fedora Linux or Arch Linux. 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 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 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

Plying the game is very simple. Type nsnake in 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 is available via main menu.

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

So, enjoy!


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 install

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

We bring the latest tech, software news and stuff that matters. Stay in touch via Telegram, Twitter, YouTube, and Facebook and never miss an update!

Join our Telegram channel and stay informed on the move.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.


Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email.
Notify of

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

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x