Linux for System Administrators by Viorel Rudareanu and Daniil Baturin

Linux for System Administrators by Viorel Rudareanu and Daniil Baturin

Author:Viorel Rudareanu and Daniil Baturin
Language: eng
Format: epub
Publisher: Packt Publishing Ltd.
Published: 2023-08-28T00:00:00+00:00


Using the ip command

In modern Linux distributions, all network discovery and setup are done either with utilities from the iproute2 package or with high-level tools such as NetworkManager. We will omit the legacy tools such as ifconfig and focus on the ip utility from iproute2.

Even though that utility is named ip, its functionality is much broader, and it provides an interface to all features of the kernel network stack that are related to network interfaces, addresses, and routing.

One thing to note is that in some distributions such as Fedora, that utility may be installed in /sbin or /usr/sbin—directories meant for administrative tools and often absent from the $PATH environment variable in shell configurations for unprivileged users. Thus, attempts to execute it from an unprivileged shell will result in a command not found error even though iproute2 is installed. In that case, you may want to either add /sbin to your $PATH or always run sudo ip instead. Commands that change network settings indeed require administrative privileges but commands for viewing them usually do not.

Note that changes you make with ip only remain active until the next reboot and permanent changes must be made in distribution-specific configuration files instead or added to a script executed at boot time. If you are experimenting on a desktop or a laptop computer with NetworkManager running, then it may also override your changes on, for example, Wi-Fi reconnects.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.