暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

termux学习笔记

浪迹星辰 2022-12-08
1609

更新apt的下载源

# apt-get update
# apt-get upgrade
# apt-get install <packagename>

开启SSH服务

pkg install openssh
sshd
#查看IP,用户名,设置ssh密码,端口8022
ifconfig
whoami
passwd
#自动开启ssh
echo "sshd" >> ~/.bashrc
#申请存储卡权限
termux-setup-storage

换国内源

pkg install termux-tools
termux-change-repo

缺少rust编译环境

apt install rust build-essential binutils cmake

阿里云动态解析

#安装python
pkg install python -y
#安装包
pip install aliyun-python-sdk-core-v3
pip install aliyun-python-sdk-domain
pip install aliyun-python-sdk-alidns
pip install requests
#创建脚本
cd ~
touch dailyReport.py && chmod +x dailyReport.py && touch dailyReport.log

使用crontab进行定时任务

#防止设备休眠
termux-wake-lock
#开启crond
crond
#添加定时任务
crontab -e
#每天凌晨两点半开始运行命令python dailyReport.py >> dailyReport.log
30 2 * * * python ~/dailyReport.py >> ~/dailyReport.log


termux学习链接:x-item.com/tag/termux

ipv6动态解析:blog.zeruns.tech/archives/507.html


文章转载自浪迹星辰,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论