【记录】虚拟机安装Debian

Last updated on July 23, 2026 pm

观察了挺久,对于码农之外的人,pi-agent很不错。但这些agent在powershell环境下用起来总归是事倍功半,因此先虚拟机安装debian环境为搭建pi-agent做点准备。同时快照功能还能在AI删库后快速还原。

准备文件

安装注意事项

1、安装时选的镜像换源不干净,会卡住,搜教程在安装时换源,推荐阿里源
2、虚拟机不需要swap分区,分区时删掉它

sudo自动化

1
2
3
4
5
6
7
8
id -un
su
USER_NAME= id -un 的输出结果
sudo usermod -aG sudo "$USER_NAME"
cat > /etc/sudoers.d/$USER_NAME <<EOF
$USER_NAME ALL=(ALL:ALL) NOPASSWD: ALL
EOF
chmod 440 "/etc/sudoers.d/$USER_NAME"

换安全的源

  • 按安装的debian的版本改一下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
sudo su
cat > /etc/apt/sources.list <<EOF
deb https://mirrors.aliyun.com/debian/ trixie main contrib non-free non-free-firmware
deb-src https://mirrors.aliyun.com/debian/ trixie main contrib non-free non-free-firmware

deb https://mirrors.aliyun.com/debian-security/ trixie-security main contrib non-free non-free-firmware
deb-src https://mirrors.aliyun.com/debian-security/ trixie-security main contrib non-free non-free-firmware

deb https://mirrors.aliyun.com/debian/ trixie-updates main contrib non-free non-free-firmware
deb-src https://mirrors.aliyun.com/debian/ trixie-updates main contrib non-free non-free-firmware

deb https://mirrors.aliyun.com/debian/ trixie-backports main contrib non-free non-free-firmware
deb-src https://mirrors.aliyun.com/debian/ trixie-backports main contrib non-free non-free-firmware
EOF

exit
sudo apt update

常用的软件

1
2
sudo apt install wget curl git unzip net-tools
sudo apt install build-essential

中文输入法

1
2
3
sudo im-config -n fcitx5
sudo apt install gnome-shell-extension-appindicator
sudo reboot

conda


【记录】虚拟机安装Debian
https://hexo.limour.top/installing-debian-on-vmware
Author
Limour
Posted on
July 23, 2026
Updated on
July 23, 2026
Licensed under