手机安装termux,安装OpenSSL设置登录启动sshd,安装nps启动 并安装anLinux在并安装Ubuntu
换源 termux-change-repo
获得手机存储权限termux-setup-storage
pkg install openssh -y
pkg install vim curl wget tree net-tools -y
vi /data/data/com.termux/files/usr/etc/termux-login.sh
##
## This script is sourced by /data/data/com.termux/files/usr/bin/login before executing shell.
##
if pgrep sshd > /dev/null
then
echo 'sshd is stared!'
else
sshd
echo 'start sshd!'
fi
if pgrep nps > ~/npslog.log
then
echo 'nps is stared!'
else
nohup nps >> ~/npslog.log 2>&1 &
echo 'start nps!'
fi
chmod u+x
安装Ubuntu桌面后调整vnc分辨率
root@localhost:/usr/local/bin# cat vncserver-start
export USER=root
export HOME=/root
vncserver -geometry 1920x1080 -depth 24 -name remote-desktop :1
自启动如需使用服务管理需要安装 pkg install termux-services -y
详情请看
https://blog.csdn.net/YiBYiH/article/details/127294017