Linux/ip: Difference between revisions

From Omnia
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
== Install ip tool ==
apt install iproute2
== Add static IP ==
== Add static IP ==


Line 8: Line 12:
  ip link set dev <interface> up
  ip link set dev <interface> up
  ip link set dev <interface> down
  ip link set dev <interface> down
== Install ip tool ==
apt install iproute2


== keywords ==
== keywords ==

Revision as of 22:45, 23 March 2024

Install ip tool

apt install iproute2

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

keywords