for those of us used to ifconfig for 25 years….
# equivalent to ifconfig -a
ip addr show
ip addr add 192.168.50.5 dev eth1
ip addr del 192.168.50.5/24 dev eth1
ip route add default via 192.168.50.100
ip link set eth1 up
ip link set eth1 down
ip route show
ip route add 10.10.20.0/24 via 192.168.50.100 dev eth0
ip route del 10.10.20.0/24
you can install the ip command on MacOS with
brew install iproute2mac