How to use the ip command to bring up/down the network interface on Linux

The ip command is replacing ifconfig, which is getting deprecated and some distros have already removed it.

To bring a network interface down, simply run the following:

sudo ip link set enp0s25 down

To bring it back up:

sudo ip link set enp0s25 up

where enp0s25 is my network adapter. By the way, its TAB auto-completion is fantastic!

Enjoy!

Unknown's avatar

About Ahmed Tawfik

Cybersecurity Professional, Systems Engineer, OSS & Linux Geek
This entry was posted in Linux and tagged , , , , . Bookmark the permalink.

Leave a comment