- 安卓手机安装termux教程, 看国光大佬的就行
https://www.sqlsec.com/2018/05/termux.html - 安装termux-api
https://www.sqlsec.com/2018/05/termuxapi.html - 在termux安装上安装linux发行版
https://www.sqlsec.com/2020/04/termuxlinux.html
另外还可以使用电脑连接手机端
在termux中
apt update
apt install openssh
然后将电脑的 id_rsa.pub 传输移动到手机的 ~/.ssh 目录下 
cat id_rsa.pub >> authorized_keys
然后在手机端看下用户名
whoami
输出类似u0_a1031
看下手机的ip
ifconfig | grep inet
这个时候就可以用电脑连接了
ssh u0_a1031@手机的ip -p 8022
连上之后手机息屏或者退出termux, 电脑的ssh就会断开
解决
termux中输入
termux-wake-unlock
更多的termux命令可以查看 https://wiki.termux.com/wiki/Termux-wake-lock
安装centos7后

固定手机ip
在普遍的linux上配置静态ip一般是修改/etc/sysconfig/network-scripts 下的文件 手机固定ip可以直接在wifi设置中,设置静态ip即可
在Termux中安装CentOS
https://www.sqlsec.com/2020/04/termuxlinux.html 在~目录下 
查看ip
 这个时候需要安装ifconfig
- 查看
ifconfig
yum search ifconfig
 2. 安装
yum install net-tools.aarch64 -y
即可使用ifconfig, 发现与termux中的ip一致
安装lrzsz
在centos中为了和电脑xshell方便传输文件,
yum install lrzsz -y
电脑–>手机 : 直接拖拽 手机–>电脑 : sz 文件名
|