Skip to content

Instantly share code, notes, and snippets.

@chasinglogic
Created December 3, 2017 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chasinglogic/360ebd38c769e2d026253439647471d5 to your computer and use it in GitHub Desktop.
Save chasinglogic/360ebd38c769e2d026253439647471d5 to your computer and use it in GitHub Desktop.
Stuart's Ops Journey

PREAMBLE

A couple of things, don't be afraid or feel ashamed to google this. Googling is exteremly encouraged. But I recommend not copy and pasting answers but if you do be sure that you COMPLETELY understand and can remember what you copy and paste.

Any script you write should be committed to Github using git. If you need a git tutorial I recommend: https://try.github.io/levels/1/challenges/1 for the random bash scripts I would recommend starting a "scripts" or "utilities" repo. Every Ops person has a repo full of their own bash or python scripts.

Topics to Know

Operating Systems

What are the major Operating Systems? (I'm expecting 4 but depending on the detail there could be more)

Write a short blurb (3 - 5 sentences) about each OS with some info about their origins and any interesting facts you find.

Watch "Revolution OS" a documentary about the FOSS (Free and Open Source) Movement

Define the following terms:

  • Operating System

  • Kernel

  • Software

  • Hardware

Describe the purpose of the following major components of Computers

  • RAM (Random Access Memory)

  • HDD (Hard Drive Device) What is the difference between a HDD and an SSD?

  • CPU (Central Processing Unit)

  • GPU (Graphics Processing Unit)

  • Network Card

Why do we call turning on a computer "booting"

What is POST (it relates to Booting)

What is BIOS?

What is UEFI?

What is a VM?

Create your own VM to run something other than what your computer is running.

What is a Container? Docker is the most popular but I'm looking for a general definition

Spin up a docker container and try installing some package inside it

What is package management in Linux?

Update your packages from the command line

Install a new piece of software from the command line

Create a new unix user from the command line

What does sudo do?

Give the user you created above the ability to run `sudo apt-get update`

Networking

What is the OSI Model? Describe each layer briefly.

Briefly describe and understand the difference between the following network protocols

  • TCP

  • UDP

  • HTTP

  • FTP

What is telnet?

What is an IP and how do they get assigned out?

What is a subnet?

What is a VLAN?

What is a MAC address?

What is the difference between IPv4 and IPv6

What is a Port?

Command Line Interface

Unix Command Line

  • What is a shell?

  • What are the default shells on Mac, BSD, and Linux-based systems?

  • What's the difference between BASH and SH?

  • Understand how to do file management in the shell. Define these commands and their purpose:

    • pwd

    • cd

    • mv

    • ls

    • cp

    • rm

    • find

    • chown

    • chmod

  • Write a bash script which prints the current user and current working directory without using a GUI at all except for your web browser to look up documentation.

    • Expected output: You are logged in as and you are at

    • Bonus Points: Can you find the relevant documentation in the command line?

  • Make the bash script executable (i.e. instead of /bin/bash myscript.sh you should be able to run it with ./myscript.sh)

  • Write a bash script to delete all files in the current directory with a last modified date that's older than 3 hours

    • You can generate a directory with files to test with using this script:

      #!/bin/bash
      
      for i in {4..10}
      do
          echo "DELETE ME" > DELETE_ME.$i.log
          touch -d "$i hours ago" DELETE_ME.$i.log
      done
      
      for i in {1..3}
      do
          echo "KEEP ME" > KEEP_ME.$i.log
      done
      
  • Use a command line tool to find all lines in loremipsum.txt that contain the word lorem

  • Use that same command line tool to only print the word lorem

  • What is a Unix Pipe?

  • Use a Unix Pipe to search all processes for each instance of the bash shell

  • What is SSH?

  • How can you read documentation for command line tools from the command line?

  • Create a bash alias to shorten some command you've used a lot

  • Customize your bash prompt in any way.

Windows Command Line

  • What shells are available on Windows?

Programming

Commit all of these to Github

Write a Python Program that will count the number of times the word lorem appears the attached loremipsum.txt attachment

Write a Python Program to solve FizzBuzz as described below:

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

  • Think of a fun or goofy command and write it into your bot.

Write a new connector for the Chattie library using any API you find interesting. (Facebook Messenger might be a good test)

General Topics

Define "Data Center"

Define "VPS"

Ops Projects

Generate an SSH Key Pair. Describe briefly how Public/Private key encryption works

Hook your SSH key into Github

Spin up your own server at https://digitalocean.com

Set up a web server on this server and have it serve the following HTML

<h1>Mathew Robinson is the greatest man alive!</h1>

Copy a file to the server from your local PC

Can two applications bind to the same port?

  • If so why? If not why not?

After 24 hours ssh into the server and run: sudo journalctl -fu sshd and watch all the brute force attempts to break into your server. Come up with a solution

Deploy ZNC IRC Bouncer: https://wiki.znc.in/ZNC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment