Android终端模拟器Termux上使用Ubuntu

Termux 上安装各种 Linux 系统是通过 proot-distro 工具来实现的,所以先安装一下 proot-distro 工具。

shell 复制代码
~ $ pkg install proot-distro 

查看Termux支持安装那些Linux

shell 复制代码
~ $ proot-distro list

Supported distributions:

  * Alpine Linux

    Alias: alpine
    Installed: no
    Comment: Rolling release branch (edge).

  * Arch Linux

    Alias: archlinux
    Installed: no
    Comment: Currently available only AArch64 and ARM ports.

  * Artix Linux

    Alias: artix
    Installed: no
    Comment: Currently available only for AArch64.

  * Debian

    Alias: debian
    Installed: no
    Comment: A stable release (bookworm).

  * deepin

    Alias: deepin
    Installed: no
    Comment: Supports only 64-bit CPUs.

  * Fedora

    Alias: fedora
    Installed: no
    Comment: Version 39. Supports only 64-bit CPUs.

  * Manjaro

    Alias: manjaro
    Installed: no
    Comment: Currently available only for AArch64.

  * OpenSUSE

    Alias: opensuse
    Installed: no
    Comment: Rolling release (Tumbleweed).

  * Pardus (yirmibir)

    Alias: pardus
    Installed: no

  * Ubuntu

    Alias: ubuntu
    Installed: no
    Comment: Standard release (mantic). Not available for x86 32-bit (i686) CPUs.

  * Void Linux

    Alias: void
    Installed: no

Install selected one with: proot-distro install <alias>

这里我们选择安装 Ubuntu 系统

shell 复制代码
~ $ proot-distro install ubuntu

安装完成后,登录 Ubuntu 系统

shell 复制代码
~ $ proot-distro login ubuntu
root@localhost:~# 

查看一下 Ubuntu 版本

shell 复制代码
root@localhost:~# cat /etc/os-release 
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo

最后提一句,安装过程如果出现下面的错误

shell 复制代码
CANNOT LINK EXECUTABLE "curl": library "libssl.so.1.1" not found: needed by /data/data/com.termux/files/usr/lib/libssh2.so in namespace (default)

可以执行一下完整的升级操作,再安装

shell 复制代码
apt full-upgrade
相关推荐
一切皆是定数27 分钟前
Android车载——VehicleHal初始化(Android 11)
android·gitee
一切皆是定数30 分钟前
Android车载——VehicleHal运行流程(Android 11)
android
problc30 分钟前
Android 组件化利器:WMRouter 与 DRouter 的选择与实践
android·java
图王大胜1 小时前
Android SystemUI组件(11)SystemUIVisibility解读
android·framework·systemui·visibility
程序员南飞2 小时前
ps aux | grep smart_webrtc这条指令代表什么意思
java·linux·ubuntu·webrtc
服装学院的IT男5 小时前
【Android 13源码分析】Activity生命周期之onCreate,onStart,onResume-2
android
Arms2065 小时前
android 全面屏最底部栏沉浸式
android
服装学院的IT男6 小时前
【Android 源码分析】Activity生命周期之onStop-1
android
ChinaDragonDreamer8 小时前
Kotlin:2.0.20 的新特性
android·开发语言·kotlin
网络研究院10 小时前
Android 安卓内存安全漏洞数量大幅下降的原因
android·安全·编程·安卓·内存·漏洞·技术