在Ubuntu操作系統(tǒng)中配置靜態(tài)IP地址的步驟如下:
sudo nano /etc/netplan/50-cloud-init.yaml
network:
version: 2
renderer: networkd
ethernets:
ensxx:
dhcp4: no
addresses: [靜態(tài)IP地址/子網(wǎng)掩碼]
gateway4: 網(wǎng)關(guān)地址
nameservers:
addresses: [DNS服務(wù)器地址]
sudo netplan apply
sudo systemctl restart systemd-networkd
完成以上步驟后,你的Ubuntu系統(tǒng)就會(huì)使用靜態(tài)IP地址進(jìn)行網(wǎng)絡(luò)連接。請(qǐng)確保配置信息填寫(xiě)正確,否則可能會(huì)導(dǎo)致網(wǎng)絡(luò)連接失敗。