Lab 7

Part I

In this assignment you will install a CLI version of Linux, often known as a headless version (no GUI).

Create a new VM using 1024MB RAM, 1 CPU, 16GB Hard Drive, the bionic_server image. You will also create the following partitions on the machine: 6G on /, 3G on /home, 2G swap.

Follow the quick_guide instructions found here.

After the install is complete, ssh into the machine (remember that you may have to go through the ssh server if you are connecting from a machine outside our network).

  1. If you get a connection refused error then your OpenSSH did not install during the initial setup of your Linux server.

    • To Fix this
      • login into the machine using your VNC Viewer and run
      • sudo apt update
      • sudo apt install openssh-server.
  2. If you get a connection timeout then you probably have an ip typo or network configuration error

    • To fix this

      • login into the machine using your VNC Viewer and
      • Check your Internet connection by typing ifconfig.
      • View the network configuration by cat /etc/netplan/50-cloud-init.yaml. The dhcp4 argument should be false. If it is true then it means that you failed to enter the network information during install.
      • You can edit the file using sudo and vim. Download this worksheet CLI-Network-Fix

      • If you make changes to the file you need to restart your machine

      • Complete a proper command-line shutdown sudo shutdown now

      • Log into vm.cs.dixie.edu and push the green button to restart your machine.

  3. Check you partitions with the following commands.

    • df -h | grep sda should return something like the following (the sizes do not have to be exact but around 6G on / and 3G on /home:
      • /dev/sda2 5.9G 2.4G 3.3G 43% /
      • /dev/sda3 2.9G 11M 2.8G 1% /home
    • swapon -s should return something like the following. The size does not have to be exact but must be around 2G:
      • /dev/sda4 partition 2097148 3108 -2

Part II

After you have successfully ssh’d into your VM:

Install Package

Create User

Just for fun - some more fun commands

Part III

Follow the tutorial on git here.

During the course of the lab you may be prompted for the following:

    git config --global user.email "youremail@here"
    git config --global user.name "Your name

This is expected. You should input your email and name where given.

By the time you are done with this tutorial, you should have a repository on github with a file in it. You should take a screenshot that proves you have created the repository.

Part IV

On your virtual machine, delete the Demo directory that you created. (Don’t worry, you should still have all your content on GitHUB). You will probably have to answer yes a few times to delete the directory. Now follow this tutorial.

Take a screenshot of your github screen again.

To pass off

You must copy my key to your virtual machine. To do this, perform the following steps (Do not copy/paste all 6 lines at once, they must be individually entered):

    sudo bash
    wget http://cit.dixie.edu/it/3100/sources/install_key.bash
    chmod +x ./install_key.bash
    ./install_key.bash
    rm ./install_key.bash
    exit

Run the grade_lab7 command from scratch. You must pass in the ip address of your vm when you run it like:

    grade_lab7 144.38.193.200

Verify that all the tests pass successfully. Upload the screenshot of the autograder as well as 2 screenshots of GitHub (one after Part III and one after Part IV)

Last Updated 05/07/2020