------------------------------------------------------------------
## 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
- Many networks and computers are set up to dynamically assign an IP to a computer when it connects to the network. The controller ensures that all IP's are unique. Thus it is possible that the IP of the computer could change every time it is turned on. This method requires less work.
**Static IP** - Static IP Configuration
- Our computers are given static IP's. This requires a manual setup of the network. This way, the IP address is always the same and allows more control over the network setup.
**Netmask**
- Determines your permissions on the network. (ie what you can do and who you can see)
**Gateway**
- Allows you access from inside the network to outside the network. It acts as a gateway to the outside world.
**Domain Name Servers - (DNS)**
- Translates the name or url of a computer or website (www) to the IP address of the computer. Our computers know their own DNS Servers. The DNS Servers either know the computer we want to contact or they know a computer who knows the computer we want to contact or they know a computer who knows a computer who knows a computer that knows the computer we want to contact. This is called networking- between them all they know everything.
- We list two DNS servers in case one of them goes down. This is our access to the world wide web we don't want to be without it.
------------------------------------------------------------------
#### 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:
- `ifconfig`
- `cat /etc/network/interfaces`
An easy way to change the IP address of your Linux computer is from the terminal (use the IP address that works with your VLAN):
- `sudo ifconfig eth0 144.38.219.125 netmask 255.255.255.248`
NOTE: eth0 represents the interface. Use ifconfig to locate the proper interface for your system.
To change the gateway, use this command:
- `sudo route add default gw 144.38.219.122 eth0`
You may also change the address from the interfaces file, by editing it with the VI editor:
- `sudo vi /etc/network/interfaces`
Note: The Ubuntu GUI installation does not store its network configuration in the /etc/network/interfaces file. However, the `ifconfig` command works in all installs.
After changing the IP address, restart the network interface by typing:
- `sudo service network-manager restart`
Another way: after changing the IP address, restart the network interface by typing:
- `sudo ifdown eth0; sudo ifup eth0`
------------------------------------------------------------------
#### Package Management
Installing Packages (Software) - requires sudo permissions
Linux packages have the following extensions:
- .deb for debian based software. Ubuntu is debian based.
- .rpm for redhat based software. CentOS is redhat based.
**`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:
- `apt-cache search