记录一下 Debian 虚拟机环境搭建
1. Set up
-
将用户加入 sudoer
sudo usermod -a -G <username>
-
配置
apt
代理vim /etc/apt/apt.conf Acquire::http::Proxy "http://127.0.0.1:7890"; Acquire::https::Proxy "https://127.0.0.1:7890";
-
安装一些常用软件
sudo apt update sudo apt install -y git zsh curl htop
-
安装
oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
-
Shell 代理
export https_proxy=127.0.0.1:7890
export http_proxy=127.0.0.1:7890
2. Go 环境搭建
-
Go 安装
apt
库中的版本较低建议自己到官网下载最新版安装wget https://go.dev/dl/go1.23.2.linux-amd64.tar.gz tar -zxvf go1.23.2.linux-amd64.tar.gz sudo mv go /usr/local # 将 Go bin 放到环境变量中 vim ~/.zshrc export PATH=${PATH}:/usr/local/go/bin:${HOME}/go/bin # 查看 Go 版本 go version
-
Go tools install
# gopls 以上版本有 Bug 会导致 vsocde Go Extension 卡死 go install golang.org/x/tools/gopls@v0.14.2 go install github.com/go-delve/delve/cmd/dlv@latest
3. C++ 开发环境搭建
-
一些常用软件安装
sudo apt install -y cmake make gcc g++ bear clangd