VirtualBox安装Debian12
下载地址:
- VirtualBox 7.0 官网: https://www.virtualbox.org/wiki/Downloads
- Debian12 官网: https://www.debian.org/index.zh-cn.html
安装
打开VirtualBox,点击新建,根据提示安装。
安装时网络不佳建议断网,避免更新下载耗时太久。
使用putty/xshell连接服务器,需要设置网络为桥接网卡,以获取内网IP。
输入的用户密码就是root用户密码。切换root用户: su -
配置
1. Debian配置国内镜像
# 切换root用户,普通用户修改无法保存
su
# vi /etc/apt/sources.list
# 清华源
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# 刷新
apt update
2. 启用ssh服务
# 查看是否有ssh服务
systemctl status ssh
# 如果提示 ssh.service could not be found 则需要安装ssh服务
apt install openssh-server
# 获取IP地址
ip addr
# 接下来就可以用putty/xshell等工具登录
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET10 - 预览版1新功能体验(一)