2018-04-09

Ubuntu 17.10 使用固定ip

Ubuntu 17.10已經不再使用 /etc/network/interfaces 設定ip了.
取而代之的是netplan
所以要修改網卡設定的話, 開啟 /etc/netplan/01-netcfg.yaml
修改如下

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.8.101/24]
      gateway4: 192.168.8.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

修改完後, 執行下列指令測試
sudo netplan --debug generate
沒問題的話, 執行下列指令套用
sudo netplan apply

ref : https://askubuntu.com/questions/967695/ubuntu-17-10-will-not-accept-static-ip?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

沒有留言:

windows 11 不使用微軟帳號登入

試過"斷網路", 試過"用無效的email登入失敗" 最後還是改registry最好用...  在安裝畫面中, 按下 Shift+F10開啟命令提示字元視窗 然後輸入regedit 切換到 HKEY_LOCAL_MACHINE\Softw...