Site Tools


common_box_creation_commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
common_box_creation_commands [2021/12/16 07:19] Charlie Rootcommon_box_creation_commands [2022/11/29 19:14] (current) michael
Line 27: Line 27:
 </code> </code>
  
-Linux set static IP:+Linux set static IP for before Ubuntu 22:
 <code> <code>
 /etc/network/interfaces /etc/network/interfaces
Line 39: Line 39:
 </code> </code>
  
 +Linux set static IP for Ubuntu 22 and later:
 <code> <code>
-/etc/netplan/01-ethernet.yaml+/etc/netplan/00-ethernet.yaml 
 network: network:
-    version: 2 +  version: 2 
-    renderer: networkd +  renderer: networkd 
-    ethernets: +  ethernets: 
-        ens160+    <interface name>
-            dhcp4: no +      dhcp4: false 
-            addresses: [198.168.0.10/24] +      dhcp6: false 
-            gateway4: 192.168.0.1 +     addresses: 
-            nameservers: +      - 192.168.0.10/24 
-                addresses: [192.168.0.11,172.16.3.100]+     routes: 
 +      - to: default 
 +        via: 192.168.0.1 
 +     nameservers: 
 +       addresses: [192.168.0.1] 
 + 
 +Apply changes: 
 +sudo netplan apply
 </code> </code>
  
common_box_creation_commands.1639639179.txt.gz · Last modified: 2021/12/16 07:19 by Charlie Root