MAC

Feeling Bored? You Can Play Tetris on the Linux Terminal

0

When it comes to Linux, the terminal might be one of the most used tools of the operating system. From simple tasks like copying files to running network forensics, there's a command-line tool for almost everything.

But what may come as a surprise is that you can even play simple games like Tetris on the Linux terminal. Yes, games aren't just restricted to the graphical user interface. Curious to find out how? Let's get started.

Tetris on the Command Line

Through an ASCII rendition of the traditional Tetris game and a bit of programming, it is now possible to play this retro game on a terminal. To start, you'll need to have Git installed on your Linux system to clone the repository.

Open up the terminal and run the following commands one by one to clone the remote repository to your computer:

git clone 'https://github.com/k-vernooy/tetris' && cd tetrismakesudo make install

Output:

Installing tetris on Linux terminal

Once the installation process finishes, you can start a new game of Tetris by running the following command:

tetris

Output:

Playing tetris on Linux terminal

Refer to the table given below to understand the controls:

Key Operation

eEnable or disable ghost blockCtrl + CQuit game↑Rotate the falling block↓Soft drop←Move left→Move rightSpaceHard drop

You can optionally select a specific level if the game is too hard or easy for you. To do this, use the –start-level <level> flag, where you can replace <level> with any number between 1 to 25. Here's an example of how you can play the 21st level:

tetris --start-level 21

The Linux Command Line Can Be Fun

As daunting as the Linux terminal might seem at first, the command line is not just for running complex commands that can be hard to understand as a beginner. Simple yet fun tools can help you get accustomed while slowly enjoy the power of using the command line over GUI.

Looking for more such fun commands for your macOS terminal? We've got just the perfect roundup for you.

admin

The 6 Best Ways to Create Forms Online

Previous article

5 Tips to Deal With Technostress

Next article

You may also like

Comments

Leave a reply

Your email address will not be published. Required fields are marked *

More in MAC

Login/Sign up