DEPARTMENT OF COMPUTING

IT 1100 : Introduction to Operating Systems

Chapter 14


Network Settings

Every machine must have a unique IP on the network. The IP identifies all computers.

DHCP - Dynamic Host Configuration Protocol

Static IP - Static IP Configuration

Netmask

Gateway

Domain Name Servers - (DNS)


Network Configuration

During the installation process we set up the Network configuration for our computers - but sometimes we need to see what that configuration is or we need to change it due to a typo or a change in our network.

To view your current configuration in Command Line Install, use either of these commands:

To change your IPv4 address, sudo vim the yaml file found in /etc/netplan (use the IP address that works with your VLAN):

NOTE: ens4 represents the interface. Use ip a to locate the proper interface for your system.

Add the fields and configure them as shown with the IP address that works for your VLAN.
Remove the line with DHCP in it. For example:

network:
    ethernets:
        ens4:
            addresses: [ 144.38.218.131/29 ]
            gateway4:  144.38.218.129
            nameservers:
                    search:  [ cs.dixie.edu ]
                    addresses:
                            - "144.38.192.2"
                            - "144.38.192.3"
version: 2

Note that after your IP address, put /29 to indicate the CIDR. /29 is the CIDR that works with the VMs we use for this class. At home or elsewhere, this value will vary based on your IP address scheme.

After changing the IP address, restart the network interface by typing: - sudo netplan apply

Another way: after changing the IP address, restart the network interface by typing: - ip link set ens4 down; ip link set ens4 up


Package Management

Installing Packages (Software) - requires sudo permissions

Linux packages have the following extensions:

apt is a debian based program.

Remember that apt is an upgraded version of apt-get. It also includes apt-cache in the upgrade. You can choose to use the generic apt or to specify apt-get and apt-cache.

To search for possible software to install, in Ubuntu, we use the apt-cache program with the following format:

sudo apt-cache search game | less

apt searches the repository for the package or program and installs it. Using apt-get to install or upgrade will install/upgrade all required packages for the particular program you’ve chosen.

apt-get update will update the list of available programs to install. It doesn’t actually update any programs. It doesn’t hurt to always update before installing just in case.

apt-get install <name> will install a program. apt install <name>

apt-get upgrade will update the program specified.

To show all the packages installed using apt

To install an individual package or program you’ve downloaded.

To list all the installed packages

yum is similar to apt it is a redhat based command

yum install <name>


Repositories

Repositories are a collaboration of the work of many programmers. It is a combination of the Linux kernel, plus the Ubuntu distribution software, plus extra programs and packages. Repositories store this software in such a way that when we request updates to our current installation we only get the new files that need updating and don’t have to re-download all files in our system.

The Ubuntu repository components are:

Our repository url’s are stored at /etc/apt/sources.list


Textbook Time

Textbook reading is optional. It describes package management and repositories in detail.


Last Updated 10/05/2021