Linux/ip

From Omnia
Revision as of 22:24, 4 June 2023 by Kenneth (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Add static IP

sudo ip addr add 192.168.1.2/24 dev eth0;
sudo ip route add default via 192.168.1.1 dev eth0;

Brign interface online

ip link set dev <interface> up
ip link set dev <interface> down