Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1

control its behavior.


Using Network Configuration Tools


If you add or replace networking hardware after initial installation, you must
configure the new hardware. You can do so using either the command line or
the graphical configuration tools. To configure a network client host using the
command line, you can use a combination of commands or edit specific files
under the /etc directory. To configure the hardware through a graphical
interface, you can use Ubuntu’s graphical tool for X called nm-
connection-editor, found by clicking the Network indicator and then
Edit Connections. This section introduces command-line and graphical
software tools you can use to configure a network interface and network
settings on your Ubuntu system. You’ll see how to control your NIC and
manage how your system interacts with your network.


Using the command-line configuration tools can seem difficult if you are new
to Linux. For anyone new to networking, using the nm-connection-
editor graphical tool is the way to go. Both manual and graphical methods
require super user privileges. You should not edit any scripts or settings files
used by graphical network administration tools on your system, or your
changes will be lost the next time the tool is run. Either use a manual
approach all the time and write your own network setup script or stick to
using graphical configuration utilities. Don’t switch back and forth between
the two methods.


Command-Line Network Interface Configuration


You can configure a network interface from the command line by using the
basic Linux networking utilities. You configure your network client hosts
either with commands to change your current settings or by editing a number
of system files. Traditionally, two commands, ifconfig (which many have
abandoned for ip, as discussed earlier in this chapter) and ip route, are
used for network configuration. The netstat command displays
information about the network connections.


NOTE
ifconfig has been replaced by ip, which is also covered in this section.
As you are likely to encounter older systems and admins still using
ifconfig, information on this command has been retained here as well.
Free download pdf