Main: Info Blog Temp Mail

unix 2013-07-14 10-42-25

Arch: Using a static IP address

Create the file /etc/systemd/system/network.service using your editor of choice. This example uses a static IP address and wpa_supplicant.
Description=Wireless Static IP Connectivity

ExecStart=/usr/bin/ip link set dev net0 up
ExecStart=/usr/bin/wpa_supplicant -B -i net0 -c /etc/wpa_supplicant.conf # Remove this for wired connections
ExecStart=/usr/bin/ip addr add dev net0
ExecStart=/usr/bin/ip route add default via

ExecStop=/usr/bin/ip addr flush dev net0
ExecStop=/usr/bin/ip link set dev net0 down

Do not forget to enable it!
# systemctl enable network
To test, reboot or make sure all other network daemons are stopped and then run as root
# systemctl start network / 2023-12-10_23-40-50 UTC.