Android phone Termux installation Linux system and desktop installation super detailed tutorial

Keywords: Python Linux Ubuntu vim

1, Content introduction

1.1 termux introduction  

Termux   It is an Android terminal simulator and Linux environment application, which can run directly without root or setting. Automatically install the smallest basic system, use APT package manager, and use other packages.

1.2 application

linux Xiaobai's operation practice. You can learn computer level 3 and 4 linux application and development technology through this software practice. For you, this is a good tool. You can use vim,emacs,gcc,gdb,openssh,shell,python,java,C/C + +. You can install linux system on termux to learn C / C + +, Python and shell. Compared with other types of collection compiler software, I prefer to compile programs through linux tools on termux, which is not only more cool, but also more deeply understand the essence of program operation.

2, termux Download

2.1 download via F-Droid

F-Droid - Free and Open Source Android App Repository

2.2 download through Google store

Google Play  |  Android Developers

3, Installing linux system with termux

        Here, take the installation of termux Ubuntu as an example to introduce two methods of installing linux with termux https://blog.csdn.net/weixin_43372529/article/details/103317005

termux linux Installation Preparation:

pkg install vim##Download vim and later edit the environment configuration file with the VIM editor
pkg install update&&pkg install upgrade##Update software source
apt edit-sources##Edit environment file

 

 

uname -m view mobile phone architecture
uname -a view version information and set the default editor
You can add [arch=all, mobile phone architecture] after deb

sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list

sed -i 's@^\(deb.*games stable\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/game-packages-24 games stable@' $PREFIX/etc/apt/sources.list.d/game.list

sed -i 's@^\(deb.*science stable\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/science-packages-24 science stable@' $PREFIX/etc/apt/sources.list.d/science.list

pkg update

   Mirror source help:

Termux source help - USTC Mirror Help documentationhttps://mirrors.ustc.edu.cn/help/termux.html

3.1 download through Python & & git tool

pkg install proot git python -y ##Download git tool and configure python
git clone https://github.com/sqlsec/termux-install-linux ## clone termux-install-linux from git

 

cd termux-install-linux ##cd to change directory
python termux-linux-install.py ##Run the installation script using python

 

cd ~ ##Switch to the root directory
ls
cd Termux-Linux
ls
cd Ubuntu
./start-ubuntu.sh ##Execute the script

 

3.2 installation via wegt & & Git

There is no essential difference between the two methods. They are cloned from git, but the tools used are different

wget installation requires prior installation of wget

apt-get update&&apt-get upgrade##Update the software source first
apt-get install wegt##Install wegt

reference resources Detailed tutorial on installing Ubuntu on Android phones (no root required)_ Simple record - CSDN blog_ Mobile phone installation Ubuntu

4, Install desktop system

4.1 install VNC viewer, AnLinux

1. Download in the mobile Google store or go to the official website for the following operations

 

2. Installation complete

3. Follow the prompts to select Chinese

  3. Set password

 

  4. Open VNC Viewer

  5. Return to terminal connection service

vncserver :1#Open the service, corresponding to the vnc viewer address

6. After connecting, open vncviewer to enter the desktop

7. Shut down service

vncserver -kill :1#':' and the corresponding desktop address. If you don't use it, you must kill it, or there will be a problem when you enter the terminal next time

5, Problem summary

 1: Unable to locate package SSl

Solution: Mount foreign vpn

2: Apt get install Yum cannot be downloaded

Solution: source change

Installing the liunx system on the mobile phone is prone to network problems, so changing the source and attaching vpn are very important early steps

Other reference articles

[1] Guoguang   Termux advanced terminal installation, use and configuration tutorial | Guoguang

[2] Ruan Yifeng   Introduction to Termux: setting up mobile Server to download files - Ruan Yifeng's network log

 

 

Posted by jimdy on Mon, 11 Oct 2021 10:18:54 -0700