save
This commit is contained in:
parent
764967c8e0
commit
93f402b012
9 changed files with 299 additions and 4 deletions
20
bin/recipes/net/net-up
Executable file
20
bin/recipes/net/net-up
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sudo mkdir -p /etc/systemd/network
|
||||
cat <<'EOF' | sudo tee /etc/systemd/network/20-enp0s1.network
|
||||
[Match]
|
||||
Name=enp0s1
|
||||
|
||||
[Network]
|
||||
DHCP=yes
|
||||
EOF
|
||||
|
||||
sudo systemctl enable --now systemd-networkd
|
||||
sudo systemctl enable --now systemd-resolved
|
||||
|
||||
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
||||
|
||||
sudo ip link set enp0s1 up
|
||||
sudo networkctl reload
|
||||
sudo networkctl reconfigure enp0s1
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue