連接有線網絡啟動
系統啟動以后停到用戶名密碼畫面,等待3分鍾所有,或者連續數據多次用戶名密碼
用戶名密碼都是ubuntu
輸入正確后,會提示修改用戶密碼,先輸入舊密碼,在連續輸入2次新密碼,進入系統
修改靜態ip
ip addr 查看網絡地址,可以看到網路地址已經存在:
但是每次啟動有可能會變,改為固定ip
使用netplan修改
vi /etc/netplan/50-cloud-init.yaml
編輯內容如下:
# This file is generated from information provided by the datasource. Changes # to it will not persist across an instance reboot. To disable cloud-init's # network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: eth0: dhcp4: false optional: true addresses: [192.168.0.17/24] gateway4: 192.168.0.1 nameservers: addresses: [192.168.0.1] version: 2
高亮部分為修改或增加部分,注意要符合yaml規范,如果寫對了會自動縮進。
保存退出【esc】 【:wq】
應用網絡
netplan apply