Skip to main content

Assignment 1: Explore and explain a Linux host

Goal: Prove you can navigate a real Linux machine, read its layout, and explain what you find — using only the commands from Chapters 1–4.

Where: The Jumpbox (10.100.100.254, user ubuntu, passwordless sudo). SSH in from your workstation, then work in your home directory /home/ubuntu.

Tasks

  1. SSH into the Jumpbox. Confirm who you are and where you are with whoami, id, and pwd.
  2. Identify the machine: capture the kernel version (uname -r), the distro and version (cat /etc/os-release), and the hostname (cat /etc/hostname).
  3. Make a working directory ~/m2-assignment1 and cd into it. Do all your file work here.
  4. Explore the filesystem hierarchy. For each of these directories, write one short sentence (in your own words) describing what it holds: /etc, /var/log, /home, /usr/bin, /tmp, /proc, /dev. Use ls to peek inside before you describe them.
  5. Investigate /proc: read /proc/uptime and /proc/cpuinfo. Note how many CPU cores the host has (hint: grep -c processor /proc/cpuinfo).
  6. Use the toolkit: find every file under /etc whose name ends in .conf (find), then count how many there are by piping into wc -l.
  7. Search inside files: use grep to find which lines of /etc/ssh/sshd_config mention Port (use -n for line numbers). You will likely need sudo.
  8. Permissions: run ls -l /etc/shadow. Record its owner, group, and permission string, then explain in one sentence why a normal user gets "Permission denied" reading it.
  9. Create a file report.md in your working directory containing all your findings (use any editor, or nano report.md).

Deliverable

A single file /home/ubuntu/m2-assignment1/report.md on the Jumpbox containing: the host identity (tasks 1–2), your one-sentence description of each directory (task 4), the CPU core count (task 5), the .conf file count (task 6), the Port grep output (task 7), and the /etc/shadow permission explanation (task 8).

Acceptance criteria — you're done when:

  • You can SSH into the Jumpbox and report.md exists at /home/ubuntu/m2-assignment1/report.md.
  • The report states the kernel version, distro+version, and hostname.
  • The report describes all seven directories (/etc, /var/log, /home, /usr/bin, /tmp, /proc, /dev) in your own words.
  • The report gives the correct CPU core count for the Jumpbox.
  • The report includes a .conf-file count produced via find ... | wc -l.
  • The report shows the Port line(s) from sshd_config with line numbers.
  • The report lists /etc/shadow's owner, group, and mode, and correctly explains the "Permission denied" error in terms of ownership/permissions.

Hints

  • Stuck on a flag? command --help or man command — every tool documents itself.
  • Use Tab completion for long paths like /etc/ssh/sshd_config to avoid typos.
  • To save a command's output straight into your report: find /etc -name "*.conf" | wc -l >> report.md.
  • "Permission denied" is not a bug — re-read Chapter 4, section 8, and ask the three diagnostic questions.
  • Blocked for >~30 min after re-reading the lessons? Bring what you've tried to your mentor.