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
- SSH into the Jumpbox. Confirm who you are and where you are with
whoami,id, andpwd. - Identify the machine: capture the kernel version (
uname -r), the distro and version (cat /etc/os-release), and the hostname (cat /etc/hostname). - Make a working directory
~/m2-assignment1andcdinto it. Do all your file work here. - 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. Uselsto peek inside before you describe them. - Investigate
/proc: read/proc/uptimeand/proc/cpuinfo. Note how many CPU cores the host has (hint:grep -c processor /proc/cpuinfo). - Use the toolkit: find every file under
/etcwhose name ends in.conf(find), then count how many there are by piping intowc -l. - Search inside files: use
grepto find which lines of/etc/ssh/sshd_configmentionPort(use-nfor line numbers). You will likely needsudo. - 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. - Create a file
report.mdin your working directory containing all your findings (use any editor, ornano 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.mdexists 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 viafind ... | wc -l. - The report shows the
Portline(s) fromsshd_configwith 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 --helporman command— every tool documents itself. - Use Tab completion for long paths like
/etc/ssh/sshd_configto 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.
No comments to display
No comments to display