安卓手机上通过Termux运行Linux系统linux手机「安卓手机上通过Termux运行Linux系统」 - 文章中心
安卓手机上通过Termux运行Linux系统linux手机「安卓手机上通过Termux运行Linux系统」
2025-02-24

Termux是一个适用于 Android 的终端模拟器,其环境类似于 Linux 环境。 无需Root或设置即可使用。 Termux 会自动进行最小安装 - 使用 APT 包管理器即可获得其他软件包。

官网:https://termux.dev/​

GitHub:https://github.com/termux/termux-app

地址:https://f-droid.org/packages/com.termux/

地址:https://github.com/termux/termux-app/releases/

参考:https://help.mirrors.cernet.edu.cn/termux/

pkg install vim proot-distro -y

 
 

输入proot-distro list查看可安装的系统

 

输出示例如下

~ $ 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 (bookworm)

 

    Alias: debian

    Installed: no

    Comment: Stable release.

 

  * Debian (bullseye)

 

    Alias: debian-oldstable

    Installed: no

    Comment: Old stable release.

 

  * deepin

 

    Alias: deepin

    Installed: no

    Comment: Supports only 64-bit CPUs.

 

  * Fedora

 

    Alias: fedora

    Installed: no

    Comment: Version 40. Supports only 64-bit CPUs.

 

  * Manjaro

 

    Alias: manjaro

    Installed: no

    Comment: Currently available only for AArch64.

 

  * OpenKylin

 

    Alias: openkylin

    Installed: no

    Comment: Version 'nile'. Supports only 64-bit CPUs.

 

  * OpenSUSE

 

    Alias: opensuse

    Installed: no

    Comment: Rolling release (Tumbleweed).

 

  * Pardus

 

    Alias: pardus

    Installed: no

    Comment: Version 'yirmibir'. Not available for ARM 32 bit.

 

  * Ubuntu (24.04)

 

    Alias: ubuntu

    Installed: no

    Comment: LTS release (noble). Not available for x86 32-bit (i686) CPUs.

 

  * Ubuntu (22.04)

 

    Alias: ubuntu-oldlts

    Installed: no

    Comment: Previous LTS release (jammy). Not available for x86 32-bit (i686) CPUs.

 

  * Void Linux

 

    Alias: void

    Installed: no

 

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

 

proot-distro install debian

 

 

然后经历漫长的等待后安装成功。

大概这个样子: 

24c788152ff44bec99418187ee0bdb7d.jpg

 

proot-distro login debian

 

输出

~ $ proot-distro login debian

root@localhost:~# 

进入后,参考:https://help.mirrors.cernet.edu.cn/debian/

exit

 

输出

root@localhost:~# exit

logout

~ $

编辑“$PREFIX/etc/profile.d/启动Debian.sh”

echo '#!/data/data/com.termux/files/usr/bin/bash

proot-distro login debian' > $PREFIX/etc/profile.d/启动Debian.sh

 
 
 

proot-distro backup debian --output Debian.tar.gz

 
 

proot-distro restore Debian.tar.gz

 

 

 

 

  I   II   III   IV