主题
系统设置
更新软件包列表
bash
apt updateSwap
一键创建并启用 Swap,4G 可按需修改:
bash
curl -fsSL https://raw.githubusercontent.com/Cretezy/Swap/master/swap.sh | sh -s -- 4G国内加速版:
bash
curl -fsSL https://gh-proxy.com/https://raw.githubusercontent.com/Cretezy/Swap/master/swap.sh | sh -s -- 4G脚本默认使用 /swapfile,并写入 /etc/fstab 以开机启用;仅用于首次创建,已有该文件或对应配置时不要重复执行。
设置主机名
bash
# 查看主机名
hostnamectl
# 设置主机名
hostnamectl set-hostname HOSTNAME修改主机名后,同步检查 /etc/hosts 中的本机映射。
