Debian 初始化命令备忘

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

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

plain 复制代码
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
shell 复制代码
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  # 将用户添加至组
相关推荐
克里斯蒂亚诺更新13 分钟前
一个服务器访问另外一个服务器端口页面
运维·服务器
12.=0.20 分钟前
【持续更新】shell脚本 + Linux命令
linux·运维·服务器
Escalating_xu27 分钟前
【Linux 网络编程】五种 I/O 模型与非阻塞 I/O:从“等数据”到正确处理 EAGAIN
java·linux·网络
无言听风雨丶1 小时前
Linux 容器本质探秘:Cgroup 与 Namespace 深度解析与实战
linux·运维·服务器·kubernetes
万联WANFLOW1 小时前
CVE-2026-98432 等漏洞自查:AI 查出的 Linux、Windows 漏洞,运维怎么确认受不受影响
linux·运维·windows·网络安全
debugdynamo1 小时前
Netcatty:把 SSH 客户端做回工作台
运维·其他·ssh
时空无限1 小时前
ssh 直接免密输入 sudo 密码
运维·ssh
OPEN-F1 小时前
Ubuntu 自动登录后 GNOME 远程桌面连不上?一次登录钥匙环锁定的排查与永久修复
linux·运维·ubuntu
硅基手札1 小时前
【Linux 内核专栏 19】20 · 嵌入式子系统 — GPIO·pinctrl·clock·regulator
linux·运维·单片机·linux内核·嵌入式开发·调试定位
默|笙2 小时前
【Linux网络】传输层协议TCP(3)滑动窗口、流量控制
linux·网络·tcp/ip