Debian 初始化命令备忘

本文地址:blog.lucien.ink/archives/541

以 Debian 11 为例,主要用于备忘。

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
apt update && apt install vim curl wget git cifs-utils -y

export DOWNLOAD_URL="https://mirrors.tuna.tsinghua.edu.cn/docker-ce"
curl -fsSL https://get.docker.com/ | sh

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

hostnamectl set-hostname your_host
hostname your_host
/etc/hosts

timedatectl set-timezone Asia/Shanghai

groupmod -g 3000 foo  # 添加用户组
adduser  # 添加用户
usermod -aG group_name user_name  # 将用户添加至组

你可能感兴趣的:(debian,运维,linux,docker,pip)