VirtualBox7虚拟机安装ubuntu22.04
下载 VirtualBox 7 Ubuntu 22.04 Server 安装 按向导默认选项一路下一步即可。 配置静态 IP vim /etc/netplan/00-installer-config.yaml network: ethernets: enp0s3: dhcp4: false addresses: [192.168.7.109/24] gateway4: 192.168.7.1 nameservers: addresses: [8.8.8.8, 114.114.114.114] version: 2 netplan apply 配置远程登录(SSH) 1. 安装 openssh-server apt-get install openssh-server 2. 允许 root 登录 vim /etc/ssh/sshd_config # 将 PermitRootLogin prohibit-password 改为: PermitRootLogin yes 3. 启动并开机自启 systemctl restart ssh && systemctl enable ssh