SSH
生成SSH密钥 密钥文件在~/.ssh目录下
ssh-keygen -t ed25519 -C "your_email@example.com"
Docker
Docker 换源
sudo mkdir -p /etc/docker
sudo tee -a /etc/docker/daemon.json << EOF
{
"registry-mirrors" : [
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn",
"https://cr.console.aliyun.com",
"https://mirror.ccs.tencentyun.com"
]
}
EOF
文件
文件压缩与解压
# 压缩成tar.xz
tar -cvf archive.tar ./folder
xz archive.tar
# 解压tar.xz
tar -xvf archive.tar.xz
网络
测试目标端口是否开放
nc -w 10 x.x.x.x 80 && echo ok ||echo no