Score:1

Which terminal (command-line) games come preinstalled/prepackaged with Ubuntu?

cn flag

I'm writing a terminal-based utility that will be used over ssh. I'd like to plant an easter egg that will open a game to play if they send it certain options. I need the game to be available by default on Ubuntu 18.04 or later, without installation, and in the terminal so it works over ssh. Which terminal games, if any, come pre-installed?

Note: an alternative to using a pre-installed game would be to have my program call sudo apt update && sudo apt install some_game. The problem with this, however, is two-fold:

  1. The user of my program will have to enter their sudo password, which might seem odd or make them leery.
  2. Security: I'd prefer not to have to install programs that aren't required on the system. Let's say it's a server, for instance. I'm not sure how secure all programs are which can be installed with sudo apt install.
cn flag
no need for apt. you can download the source and install it in /home or in /opt using that user as the owner. sandbox the game and it will be secure enough
cocomac avatar
cn flag
I don't know of any that are preinstalled. But why not bundle this game into your app? Like, (assuming the license allows it), why not include said game with your app, and then have your app run it? Why does it need to be preinstalled?
Gabriel Staples avatar
cn flag
@cocomac, I suppose it doesn't need to be preinstalled. I just figured it would be easier for it to be that way. I can just have my program run `sudo apt update && sudo apt install <game>` the first time they run it.
guiverc avatar
cn flag
I doubt any games are found in `main` as there are costs involved with having packages there, some of which don't exist in 'universe' (where most games are found). Packages included in 'universe' are only found on Ubuntu [*flavors*](https://ubuntu.com/download/flavours) by default (ie. on 18.04 'main' packages come with 5 years of *guaranteed* support; for 'universe' it was 9 months for some, 3 years for most, but capable of being 5 too if community wish to update packages). This is what can be found on 18.04.6 desktop - https://releases.ubuntu.com/18.04/ubuntu-18.04.6-desktop-amd64.manifest
guiverc avatar
cn flag
*but note when looking at the manifest; some install options may mean not all packages available on the ISO are actually installed*
Jeff avatar
mx flag
@GabrielStaples You have to install the games manually. There are no games that are preinstalled.
Score:2
vn flag

There isn't any command line games installed in Ubuntu by default.

So the best option would be (as Cocomac suggested), to include your own CLI game in your application - this could very well be something rather simple written in Bash or Python.

For instance, here is an example of a game written in Bash: Housenka

Another example: Tutorial to create Minesweeper

Gabriel Staples avatar
cn flag
Thank you! Upvoted. I found another one: [Command-line snake game?](https://askubuntu.com/a/835994/327339)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.