Linux终端玩转bastet俄罗斯方块小游戏

简介: 【7月更文挑战第14天】Linux终端玩转bastet俄罗斯方块小游戏

一、bastet小游戏介绍

1.1 bastet小游戏简介

Bastet 是 Linux 的俄罗斯方块,在Linux终端命令行下,我们可以使用一个命令快速安装该游戏。我们可以选择普通版或困难版本来挑战自己。

1.2 项目预览

  • 可以看下部署好的项目预览

在这里插入图片描述

二、本次实践介绍

2.1 本地环境规划

本次实践为个人测试环境,操作系统版本为centos7.6。

hostname IP地址 操作系统版本 内核版本
ubuntu-001 192.168.3.251 Ubuntu 22.04.1 LTS 5.15.0-105-generic

2.2 本次实践介绍

1.本次实践环境为个人测试环境,生产环境请谨慎;
2.在ubuntu环境下安装bastet俄罗斯方块小游戏。

三、检查系统镜像源

3.1 检查系统镜像源

对于Ubuntu 22.04.1 LTS版本,将镜像源配置文件/etc/apt/sources.list修改内容如下。

deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

查看本地的sources.list文件。

root@ubuntu-001:~# cat /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

3.2 更新软件列表

执行以下命令,更新软件列包表。

root@ubuntu-001:~# apt update
Hit:1 https://mirrors.aliyun.com/ubuntu jammy InRelease
Hit:2 https://mirrors.aliyun.com/ubuntu jammy-security InRelease
Hit:3 https://mirrors.aliyun.com/ubuntu jammy-updates InRelease
Hit:4 https://mirrors.aliyun.com/ubuntu jammy-backports InRelease
Hit:5 https://mirrors.aliyun.com/docker-ce/linux/ubuntu jammy InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
116 packages can be upgraded. Run 'apt list --upgradable' to see them.

3.3 查询软件

查询软件源中是否有bastet软件包,我们可以看到之前已经安装过的bastet软件。

root@ubuntu-001:~# apt search  bastet
Sorting... Done
Full Text Search... Done
bastet/jammy,now 0.43-7 amd64 [installed]
  ncurses Tetris clone with a bastard algorithm

四、安装bastet小游戏

4.1 安装bastet

可以使用apt命令一键安装bastet俄罗斯方块小游戏,这里由于是测试环境,使用root账号,其他非root环境下,命令前面加上sudo

apt install  -y bastet

在这里插入图片描述

4.2 启动bastet游戏

直接在命令行输入bastet命令,自动启动bastet游戏。

bastet

在这里插入图片描述

五、试玩小游戏

5.1 选择难度

点击菜单栏,选择游戏难度,可以选择普通和困难模式。

在这里插入图片描述

5.2 开始游戏

选择模式后,按回车键确认即可开始游戏。

在这里插入图片描述

六、总结

>
在Linux系统中,通过命令行安装Bastet(一个专为终端设计的俄罗斯方块游戏),可以为用户带来既怀旧又具挑战性的娱乐体验。只需一条简单的命令,用户即可快速部署这个游戏,选择标准模式享受经典乐趣,或切换到困难模式挑战自我极限,从而在提升终端操作技能的同时,也为单调的编程或工作环境增添一抹趣味与放松。这种方式展现了Linux系统不仅强大于后台服务和开发工具,也能以轻量级游戏的形式提供娱乐,丰富了终端用户的互动体验。

相关文章
|
3天前
|
Shell Linux API
C语言在linux环境下执行终端命令
本文介绍了在Linux环境下使用C语言执行终端命令的方法。首先,文章描述了`system()`函数,其可以直接执行shell命令并返回结果。接着介绍了更强大的`popen()`函数,它允许程序与命令行命令交互,并详细说明了如何使用此函数及其配套的`pclose()`函数。此外,还讲解了`fork()`和`exec`系列函数,前者创建新进程,后者替换当前进程执行文件。最后,对比了`system()`与`exec`系列函数的区别,并针对不同场景推荐了合适的函数选择。
|
18天前
|
存储 安全 Linux
|
27天前
|
NoSQL Linux 开发工具
Linux终端革命:掌握这些命令,让工作速度飞跃提升!
本文介绍了Linux命令行操作效率提升的关键技巧,包括光标移动快捷键、Vim编辑器的高效使用、快速切换目录、跨服务器文件拷贝等。通过掌握`Ctrl + a`、`Ctrl + e`等快捷键可加快命令编辑;Vim的`:set nu`、`:20`等命令能提升文本编辑速度;`cd -`命令可在最近访问过的目录间快速切换;利用`nc`或`python -m SimpleHTTPServer`可实现在无密码权限时的文件传输。这些技巧帮助用户提高工作效率,简化日常工作流程。
56 1
|
1月前
|
Linux 数据安全/隐私保护
【Deepin 20 系统】Linux系统在开机时未进入系统前进入命令行界面(终端)
如何在Deepin 20系统启动时进入命令行界面(终端),通过在GRUB界面中编辑内核启动参数来引导系统进入多用户文本模式(运行级别3)。
65 1
|
16天前
|
存储 安全 Linux
Linux新手必备:关机重启、终端操作与快捷键大全
本文专为Linux新手打造,提供全面实用的指南,涵盖关机与重启命令(如`shutdown -h now`立即关机、`reboot`重启)、终端操作技巧(如使用`clear`清屏及Ctrl+L快捷键)、命令历史管理(利用`history`查看过往命令)及高效快捷键(如Ctrl+C复制、Ctrl+V粘贴),助您迅速掌握核心技能,成为Linux操作高手。
16 0
|
2月前
|
JavaScript 前端开发 Linux
【好玩的开源项目】Linux系统之部署捕鱼达人经典小游戏
【7月更文挑战第20天】Linux系统之部署捕鱼达人经典小游戏
50 7
|
2月前
|
Linux 测试技术 网络安全
【好玩的开源项目】Linux系统之部署吃豆人经典小游戏
【7月更文挑战第18天】Linux系统之部署吃豆人经典小游戏
66 2
|
2月前
|
Ubuntu Linux 测试技术
Linux系统之在命令行玩转Pacman4console贪吃人经典小游戏
【7月更文挑战第12天】Linux系统之在命令行玩转Pacman4console贪吃人经典小游戏
48 11
|
2月前
|
Linux 测试技术 网络安全
【好玩的开源项目】Linux系统之部署跳一跳经典小游戏
【7月更文挑战第16天】Linux系统之部署跳一跳经典小游戏
51 7
|
24天前
|
Ubuntu Linux Shell
Linux 终端入门
Linux 终端入门
14 0
下一篇
DDNS