Linux

关注公众号 jb51net

关闭
首页 > 网站技巧 > 服务器 > Linux > Termux安装Ubuntu

Termux安装Ubuntu全过程

作者:道之极万物灭

文章介绍了在Termux中使用proot-distro安装Ubuntu的方法,包括换源、安装基础件、查看与安装不同Linux系统、进入Linux环境查看系统版本、删除与重新安装Linux环境以及修改sources.list和更新包信息等步骤

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

1、换源命令

termux-change-repo

2、安装ubuntu

2.1 先安装基础件proot-distro

 pkg install proot-distro 

2.2 查看可安装的Linux系统

 proot-distro list

2.3 安装Ubuntu

  proot-distro install ubuntu

2.4 安装完成后,进入 Linux(Ubuntu)环境

proot-distro login ubuntu

查看系统版本

cat /etc/os-release

2.5 删除Linux(Ubuntu)环境

proot-distro remove ubuntu

2.6 重新安装Linux(Ubuntu)环境

proot-distro reset ubuntu

2.7 修改/etc/apt/sources.list(ubuntu 24.04 (noble))

echo -e "
deb https://mirrors.aliyun.com/ubuntu/  noble main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/  noble main restricted universe multiverse

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

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

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

deb https://mirrors.aliyun.com/ubuntu/  noble-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/  noble-backports main restricted universe multiverse
" | tee /etc/apt/sources.list

2.8 更新包信息

apt update & apt upgrade -y

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。

您可能感兴趣的文章:
阅读全文