注意:
baidu AI自动生成的解决方案:未验证
Setting up Distrobox on Ubuntu 22.04 (**) https://blog.csdn.net/ken2232/article/details/139427024
PPA 仓库,为 Ubuntu 专用。debian 用不了。
------
在 debian 11 (12 OK)中运行 distrobox 的问题:
How to change the display name on the Terminal? 如何识别终端是运行在哪一个容器里? (**) https://blog.csdn.net/ken2232/article/details/139538759
-----------------------------------------------------------------
关联参考:
Setting up Distrobox on Ubuntu 22.04 (**) Setting up Distrobox on Ubuntu 22.04 (**)-CSDN博客
How to change the display name on the Terminal? 如何识别终端是运行在哪一个容器里? (**) https://blog.csdn.net/ken2232/article/details/139538759
在 debian 11 与 12 上安装 distrobox 的区别 汇总 在 debian 11 与 12 上安装 distrobox 的区别 汇总_distrobox 终端-CSDN博客
debian 11 安装 distrobox( 含:AI自动生成的解决方案) debian 11 安装 distrobox( 含:AI自动生成的解决方案)-CSDN博客
distrobox 安装 与 卸载 distrobox 安装 与 卸载_steamdeck distrobox安装-CSDN博客
Linux 终端命令提示符总结 https://blog.csdn.net/ken2232/article/details/139826193
-----------------------------------------------------------------
要点:
distrobox 的好处之一:可以简单、方便地在容器内运行 GUI 程序。
这在 Desktop 系统中,方便 app 的跨发行版使用。
-----------------------------------------------------------------
直接下载安装 << OK
1. distrobox 只是一种命令行容器管理前端。她支持 3种容器引擎。
podman, docker,?。也就是说需要安装容器引擎,它需要与容器引擎配合一起使用。
2. 到 distrobox 官网直接下载 zip 格式的安装包
解压,安装。
需要加 sudo 。否则,环境变量,需要用户自行设置。
distrobox-1.7.2.1.zip https://github.com/89luca89/distrobox/releases/tag/1.7.2.1
$ sudo ./install
[sudo] password for hm:
Installation successful!
Shell scripts are located in /usr/local/bin
Manpages are located in /usr/local/share/man/man1
3. 在容器启动时,自动运行一个用户自定义的
Linux 终端提示符命令,以区别当前终端,到底是在主机状态下?还是在容器状态下?
https://blog.csdn.net/ken2232/article/details/139826193
在 debian 12 / ubuntu 24.04 上,在主机上(容器外)、与在容器内的终端提示符,是不一样的。
在 debian 11 上,如需区分,可以自行修改。
distrobox 的主要命令,OK;其他命令,未测试。
--------
# # podman pull 下载的镜像 images,在 podman images 下可见,在 distrobox list 下不可见。需要首先运行:$ distrobox create -n u2204 -i ubuntu:22.04
#
aa@hm:~/Documents
$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/ubuntu 22.04 9d28ccdc1fc7 2 years ago 78.9 MB
aa@hm:~/Documents
$ distrobox list
ID | NAME | STATUS | IMAGE
aa@hm:~/Documents
$ distrobox create -n u2204 -i ubuntu:22.04
Creating 'u2204' using image ubuntu:22.04 [ OK ]
Distrobox 'u2204' successfully created.
To enter, run:distrobox enter u2204
Warning: Failed to download icon. Defaulting to generic one.
debian 11 安装 distrobox << NG
评点:
本文是 AI自动生成的,在 debian 11 上好像提示版本问题,安装不了。
debian 12 不论是 debian 官仓,还是 distrobox 官网,都显示是 OK 的。
在Debian 11 (Bullseye) 上安装 DistroBox,你可以遵循以下步骤:
打开终端。
添加 DistroBox 的官方仓库。为此,请复制并粘贴以下命令:
echo "deb [arch=$(dpkg --print-architecture)] http://download.distrobox.org/distrobox $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/distrobox.list
echo "deb [arch=$(dpkg --print-architecture)] http://download.distrobox.org/distrobox $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/distrobox.list
添加公钥以确保包的安全。复制并粘贴以下命令:
wget -O - http://download.distrobox.org/distrobox/gpg.key | sudo apt-key add -
更新软件包列表:
sudo apt update
安装 DistroBox:
sudo apt install distrobox
一旦安装完成,你可以通过运行 distrobox 命令来管理你的容器。例如,创建一个新的容器:
sudo distrobox create mydebian10 debian:10
这将创建一个名为 mydebian10 的新容器,其中安装了 Debian 10 系统。
请注意,你需要具有sudo权限来执行这些命令,并且在执行过程中可能会要求你输入用户密码。
提示:AI自动生成,仅供参考
安装 distrobox
评点:
本文是 AI自动生成的,还没有实验过。
既然直接安装 OK,那么,这种方法也就没有实验的必要了吧?
毕竟通过 py 方式,还是比直接安装方式要来得麻烦?
distrobox 是一个 Python 库,用于在同一台机器上创建和管理多个 Linux 发行版的环境。要安装 distrobox,您可以使用 pip 工具。以下是安装 distrobox 的步骤:
打开终端(在 Linux 或 macOS 上)或命令提示符/PowerShell(在 Windows 上)。
确保您已安装 pip。如果未安装,请先安装它。
运行以下命令来安装 distrobox:
pip install distrobox
如果您想要安装最新版本的 distrobox,可以使用以下命令:
pip install --upgrade distrobox
安装完成后,您可以通过运行 distrobox 命令来验证安装是否成功。
请注意,distrobox 可能需要特定的 Linux 内核特性,并且可能需要以超级用户权限运行安装或其他命令。如果在安装过程中遇到任何问题,请检查 distrobox 的官方文档或 GitHub 仓库以获取更多信息和解决方法。
提示:AI自动生成,仅供参考