[
252
]
The
/usr/sbin
directory may or may not be in your
$PATH
(a set of directories your
shell looks within for commands), so if your system doesn't recognize
ifconfig
,
using the fully qualified command should produce the desired output, as follows:
Figure 10.4: Viewing interface information with the ifconfig command
Secondly, just like with the
ip
commands we practiced earlier, we can also bring an
interface down or up with
ifconfig
as well:
sudo ifconfig enp0s3 down
sudo ifconfig enp0s3 up
There are, of course, other options and variations of
ip
and
ifconfig
, so feel free to
look up the man pages for either if you want more information. For the purposes of
this section, the main thing is to remember how to view your current IP assignments,
as well as how to bring an interface up or down.
As useful as our network interfaces can be, they're useless without an IP address
assigned to them. While a network will often use DHCP to take care of this, in the
next section we'll take a look at how to assign a static IP address.
Chapter 10
Do'stlaringiz bilan baham: |