Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1
-i Displays the interfaces  configured  by  ifconfig

-s Lists    a   summary of  activity    for each    protocol

-v Gives    verbose output, listing both    active  and inactive    sockets

-c Updates  output  every   second  (good   for testing and troubleshooting)

-e Gives    verbose output  for active  connections only

-C Displays information from    the route   cache   and is  good    for looking at
past connections

Several other options are available for this command, but they are used less
often.


Network Configuration Files


As previously stated, five network configuration files can be modified to
make changes to the basic network interaction of your system:


/etc/hosts—A    listing of  addresses,  hostnames,  and aliases
/etc/services—Network service and port connections
/etc/nsswitch.conf—Linux network information service
configuration
/etc/resolv.conf—Domain Name System (DNS) domain (search)
settings
/etc/host.conf—Network information search order (by default,
/etc/hosts and then DNS)

After these files are modified, the changes are active. With most configuration
files, you can add comments with a hash mark (#) preceding a comment. All
these files have man pages where you can find more information.


Adding Hosts to /etc/hosts

The /etc/hosts file is a map of IP addresses to hostnames. If you are not
using DNS or another naming service and you are connected to a large
network, this file can get quite large, and managing it can be a real headache.
A small /etc/hosts file can look something like this:

Free download pdf