鼎鼎知识库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2021.1.14Ubuntu配置固定IP方法.md 450B

3 년 전
1234567891011121314151617181920212223242526272829303132333435
  1. ```
  2. cd /etc/netplan
  3. ls
  4. ifconfig
  5. sudo apt install net-tools
  6. ifconfig
  7. eno1
  8. sudo apt install nano
  9. sudo chmod 777 01-network-manager-all.yaml
  10. nano 01-network-manager-all.yaml
  11. ```
  12. 修改配置文件
  13. ```
  14. network:
  15. version: 2
  16. renderer: NetworkManager
  17. ethernets:
  18. eno1:
  19. dhcp4: no
  20. addresses: [192.168.8.141/24]
  21. gateway4: 192.168.8.1
  22. nameservers:
  23. addresses: [192.168.8.1]
  24. ```
  25. 让生效
  26. ```
  27. sudo netplan apply
  28. ```