记录常用系统管理指令
下载镜像
Debian
if [ -d /etc/apt/mirrors ]; then
echo "https://mirrors.cernet.edu.cn/debian/" > /etc/apt/mirrors/debian/debian.list
echo "https://mirrors.cernet.edu.cn/debian-security/" > /etc/apt/mirrors/debian/debian-security.list
else
sed -i 's/deb.debian.org/mirrors.cernet.edu.cn/g' /etc/apt/sources.list /etc/apt/sources.list.d/debian.sources
sed -i 's#security.debian.org#mirrors.cernet.edu.cn/debian-security#g' /etc/apt/sources.list /etc/apt/sources.list.d/debian.sources
fiUbuntu
TDB
Node
npm config set registry https://registry.npmmirror.com/
pnpm config set registry https://registry.npmmirror.com/Rust
export RUSTUP_DIST_SERVER="https://rsproxy.cn"
export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"清理缓存
Rust
cargo install cargo-cache
cargo cache --autoclean-expensiveNode
npm cache ls
npm cache clean --force
pnpm store path
pnpm store prune
# run inside folder with package.json
bun pm cache
bun pm cache rmDotNet
dotnet nuget locals all --list
dotnet nuget locals all --clear证书管理
/etc/init.d/acme renewsystemctl start --no-block pve-daily-update.service
journalctl -u pve-daily-update.service -f重启网络
systemctl status systemd-networkd
systemctl restart systemd-networkd
# PVE
ifreload -a