Termux 安卓终端
2022年5月24日小于 1 分钟约 265 字
Termux 终端
安装 Termux
termux github
termux app下载 下载后直接安装即可
优化配置:
# 更换为清华源
# https://mirrors.tuna.tsinghua.edu.cn/help/termux/
termux-change-repo
# 选择 Tsinghua、BFSU 等国内源会自动更新
apt update && apt upgrade -y
# 安装常用基础软件
apt install vim -y
apt install python -y
# 安装服务软件
apt install openssl openssh -y
apt install nginx -y
# 开启ssh远程访问
cat $PREFIX/etc/ssh/sshd_config # PermitRootLogin yes # 如果你想运行root登录
whoami # 查看用户名
passwd # 为你的Termux会话设置密码
sshd # 启动ssh服务器
ssh 127.0.0.1 -p 8022 # 测试连接。注意 termux sshd服务默认端口是8022,而22端口可以连接但是无法登录。
日志查询
# 查询某个应用程序警告以上的日志
logcat app包名:W *:S
相关命令
# 查看监听端口
ss -ltnp
# 查看进程的启动命令
ps -o pid,args -p 8382