Debian开荒
0.安装
从U盘安装
这里强烈推荐Ventory,比Rufus不知道高到哪里去了. 点我查看使用说明 一路点点点就可以了
1.安装nvidia驱动
千万不要用NV官方的.run文件 包炸的。。。
sudo apt install linux-headers-$(uname -r) #安装linux-headers
sudo sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list #更改为科大源
sudo apt update & upgrade #滚一遍
sudo zypper remove "cuda*" "*cublas*" "*cufft*" "*cufile*" "*curand*" "*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*"
sudo apt-get --purge remove "*nvidia*" "libxnvctrl*"
sudo apt-get autoremove #防止有nv残留
##重要! 用DKMS将驱动装进内核 不做这一步就重启必炸
修改 /etc/apt/source.list 加入non-free源
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
# sudo apt install nvidia-cuda-dev nvidia-cuda-toolkit
#可选 安装CUDA
正式安装驱动
ls /usr/src | grep nvidia
#返回 nvidia-[版本号]
#安装
sudo dkms install -m nvidia -v [版本号]
还有一点是Debian对wayland的支持非常差 如果想用wayland的话建议转战Archlinux。KDE6将默认是wayland 所以进桌面的时候记得在左下角改成x11
2.搞一些杂七杂八的事情
# 切换到sudo用户(确保当前用户有sudo权限)
sudo su - ${USER}
# 安装依赖
sudo apt update && sudo apt install -y zsh curl git fonts-powerline
# 安装JetBrains Mono字体
mkdir -p ~/.local/share/fonts && cd ~/.local/share/fonts
curl -fLO https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/JetBrainsMono.tar.xz
tar -xf JetBrainsMono.tar.xz && rm JetBrainsMono.tar.xz
fc-cache -fv
# 安装Oh My Zsh(非root模式)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# 安装插件
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# 配置zshrc
cat <<EOT >> ~/.zshrc
# 插件设置
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
# 主题设置(使用默认主题)
ZSH_THEME="robbyrussell"
# 字体修复
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
EOT
# 设置为默认shell(需要密码确认)
chsh -s $(which zsh) $(whoami)
# 完成提示
echo "安装完成!请注销后重新登录使配置生效"
安装code chrome ....