Skip to content

Your Linux lab needs a workspace you can maintain and hand over: notes you understand, a small log investigation, and an archive another machine can verify. Build it, recover from two deliberate mistakes, and collect evidence that the result works. Documentation and earlier lessons are allowed throughout.

Hand in a directory listing, selected command transcripts with your explanations, verified archive contents, and a successful transfer check. Keep the evidence outside the exercise directories before resetting them.

You pass when the required files and permissions are correct, you can explain the commands you chose, and you recover from both a missing path and an intentional permission error. The archive must restore without differences and arrive unchanged on the lab server. Cleanup must be verified on both machines.

The workstation opens the terminal or console where you operate the LOCAL Linux machine, rootvolt. It also provides independent console access to the REMOTE lab server, labserver. SSH carries your remote shell session; SFTP carries the archive between the Linux machines.

Personal Linux workspace lab The workstation opens the local Linux console and the remote server console. SSH and SFTP cross from rootvolt to labserver. Your workstation Keyboard and terminal window LOCAL Linux lab: rootvolt Workspace, notes, archive REMOTE lab server: labserver Receive and verify archive Linux terminal Server console SSH / SFTP
Personal Linux workspace lab The workstation opens the local Linux console and the remote server console. SSH and SFTP cross from rootvolt to labserver. Your workstation Keyboard and terminal window LOCAL Linux lab: rootvolt Workspace, notes, archive REMOTE lab server: labserver Receive and verify archive Linux terminal Server console SSH / SFTP
The workstation provides console access; SSH and SFTP cross from the local Linux machine to the remote lab server.

Finish the archives practice and its reset. Use your Ubuntu lab VM and ~/lab from the practice directory setup. Reserve ~/lab/capstone locally and ~/capstone.tar.gz on the lab server; neither may already exist. Choose different exercise names if those paths contain your own work.

The lab server can be a second machine you control with an SSH server and console access. Use its actual hostname and your account in place of labserver and learner. Complete the SSH preparation before connecting.

Dates, compressed sizes, archive digests, package versions, mirror lines, download sizes, addresses, host fingerprints, and transfer speeds will differ. Compare values from your own run. The recorded login banner names the container’s WSL2 kernel; your banner names your own system and kernel.

Try each goal before opening its evidence check. Each collapsed recording is one possible way; other correct commands pass too. The recordings are real lab-container runs. They cannot demonstrate building a VM or operating full-screen editors. Separate recordings start clean, with the preceding workspace state prepared where needed; you continue with your own files.

Goal: Build a working Ubuntu VM with a regular user account and terminal access. Follow Create and install a VM and Network and snapshots.

Evidence: Keep your VM configuration and a successful console login, plus terminal evidence of your username, hostname, and distribution release. Explain which machine runs the shell.

You pass this stage when you can reopen the VM and identify the Linux account, host, and release. The following recording checks identity only; it is not evidence of a VM installation.

Check your evidence: one possible identity check
Identify the recorded Linux environment
learner@rootvolt:~/lab$ whoamilearnerlearner@rootvolt:~/lab$ hostnamerootvoltlearner@rootvolt:~/lab$ grep '^PRETTY_NAME=' /etc/os-releasePRETTY_NAME="Ubuntu 24.04.5 LTS"learner@rootvolt:~/lab$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. Identify learner, rootvolt, and the Ubuntu release inside the recorded lab container.
Steps (9)
  1. Type whoami
  2. Press Enter — Identify the unprivileged account
  3. Output: learner
  4. Type hostname
  5. Press Enter — Identify the local Linux host
  6. Output: rootvolt
  7. Type grep '^PRETTY_NAME=' /etc/os-release
  8. Press Enter — Read the distribution release without claiming a VM build
  9. Output: PRETTY_NAME="Ubuntu 24.04.5 LTS"

The captured release is Ubuntu 24.04.5 LTS. Your VM’s point release may differ.

2. Create a structured workspace and recover a missing path

Section titled “2. Create a structured workspace and recover a missing path”

Goal: Before creating ~/lab/capstone, try to enter it. Read the failure, confirm where you still are, then create the workspace. Under bundle, separate notes, logs, and results directories.

Evidence: Save the failed navigation, your location immediately afterward, and a directory listing after recovery. Explain which path the shell could not find and why the failed cd changed neither your working directory nor your files.

You pass this stage when the missing-path error is explained and all three directories exist under the intended workspace.

Hint: Absolute and relative paths.

Check your evidence: one possible workspace run
Recover from a missing workspace
learner@rootvolt:~/lab$ cd ~/lab/capstone/bash: cd: /home/learner/lab/capstone/: No such file or directorylearner@rootvolt:~/lab$ pwd/home/learner/lablearner@rootvolt:~/lab$ mkdir -p ~/lab/capstonelearner@rootvolt:~/lab$ cd ~/lab/capstonelearner@rootvolt:~/lab/capstone$ mkdir -p bundle/notes bundle/logs bundle/resultslearner@rootvolt:~/lab/capstone$ find bundle -type dbundle
bundle/results
bundle/notes
bundle/logslearner@rootvolt:~/lab/capstone$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. Fail to enter the absent workspace, confirm the unchanged location, and create the directories.
Steps (15)
  1. Type cd ~/lab/capstone/
  2. Press Enter — Notice the missing path before creating anything
  3. Output: bash: cd: /home/learner/lab/capstone/: No such file or directory
  4. Type pwd
  5. Press Enter — Confirm the failed cd kept the working directory
  6. Output: /home/learner/lab
  7. Type mkdir -p ~/lab/capstone
  8. Press Enter — Create the missing workspace directory
  9. Type cd ~/lab/capstone
  10. Press Enter — Enter the directory after creating it
  11. Type mkdir -p bundle/notes bundle/logs bundle/results
  12. Press Enter — Create separate directories for notes, logs, and results
  13. Type find bundle -type d
  14. Press Enter — Collect the initial directory structure
  15. Output: bundle bundle/results bundle/notes bundle/logs

Goal: In Nano, create bundle/notes/nano.txt with these exact contents and a final newline:

Nano note to write
Personal Linux workspace
Keep notes, logs, and results separate.

In Vim, create bundle/notes/vim.txt with these exact contents and a final newline:

Vim note to write
Command explanations
mkdir -p creates missing parent directories.
grep selects matching lines; > saves them in a file.
chmod u+r restores read permission for the owner.

Evidence: Read both saved files from the shell. Keep checksums or another content check, and add explanations of your own chosen commands to your hand-in. Include an option, a pathname argument, and a redirection. Record that you saved and exited each editor.

You pass this stage when both editors have been used, both saved notes match, and your explanations describe what the commands do to your files.

Hints: Nano and Vim.

Check your evidence: one possible saved-file check

The recording uses printf to prepare the exact note contents because full-screen editors are not captured as text. Write the files with Nano and Vim yourself. The recording proves the resulting file contents, not editor use.

Check the two editor notes
learner@rootvolt:~/lab/capstone$ cd bundle/noteslearner@rootvolt:~/lab/capstone/bundle/notes$ printf '%s\n' 'Personal Linux workspace' > nano.txtlearner@rootvolt:~/lab/capstone/bundle/notes$ printf '%s\n' 'Keep notes, logs, and results separate.' >> nano.txtlearner@rootvolt:~/lab/capstone/bundle/notes$ printf '%s\n' 'Command explanations' > vim.txtlearner@rootvolt:~/lab/capstone/bundle/notes$ printf '%s\n' 'mkdir -p creates missing parent directories.' >> vim.txtlearner@rootvolt:~/lab/capstone/bundle/notes$ printf '%s\n' 'grep selects matching lines; > saves them in a file.' >> vim.txtlearner@rootvolt:~/lab/capstone/bundle/notes$ printf '%s\n' 'chmod u+r restores read permission for the owner.' >> vim.txtlearner@rootvolt:~/lab/capstone/bundle/notes$ cd ../..learner@rootvolt:~/lab/capstone$ cat bundle/notes/nano.txtPersonal Linux workspace
Keep notes, logs, and results separate.learner@rootvolt:~/lab/capstone$ cat bundle/notes/vim.txtCommand explanations
mkdir -p creates missing parent directories.
grep selects matching lines; > saves them in a file.
chmod u+r restores read permission for the owner.learner@rootvolt:~/lab/capstone$ sha256sum bundle/notes/*.txt0d2b66a971651927aadcc636019d2ee5f934c8b8f472bbc62fb40ef12b6a35c2  bundle/notes/nano.txt
df6b46815dd3aa90d3c3569663556622364afec564f623f53561ca977298ff48  bundle/notes/vim.txtlearner@rootvolt:~/lab/capstone$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. Read both prepared notes and record their SHA-256 content checks.
Steps (25)
  1. Type cd bundle/notes
  2. Press Enter — Enter the notes directory before preparing both editor files
  3. Type printf '%s\n' 'Personal Linux workspace' > nano.txt
  4. Press Enter — Write the Nano note heading
  5. Type printf '%s\n' 'Keep notes, logs, and results separate.' >> nano.txt
  6. Press Enter — Append the workspace organization note
  7. Type printf '%s\n' 'Command explanations' > vim.txt
  8. Press Enter — Write the explanation heading
  9. Type printf '%s\n' 'mkdir -p creates missing parent directories.' >> vim.txt
  10. Press Enter — Append the directory-creation explanation
  11. Type printf '%s\n' 'grep selects matching lines; > saves them in a file.' >> vim.txt
  12. Press Enter — Append the filtering and redirection explanation
  13. Type printf '%s\n' 'chmod u+r restores read permission for the owner.' >> vim.txt
  14. Press Enter — Append the permission-repair explanation
  15. Type cd ../..
  16. Press Enter — Return to the workspace before checking both notes
  17. Type cat bundle/notes/nano.txt
  18. Press Enter — Read the saved Nano note
  19. Output: Personal Linux workspace Keep notes, logs, and results separate.
  20. Type cat bundle/notes/vim.txt
  21. Press Enter — Read the saved Vim note
  22. Output: Command explanations mkdir -p creates missing parent directories. grep selects matching lines; > saves them in a file. chmod u+r restores read permission for the owner.
  23. Type sha256sum bundle/notes/*.txt
  24. Press Enter — Collect content checks for both notes
  25. Output: 0d2b66a971651927aadcc636019d2ee5f934c8b8f472bbc62fb40ef12b6a35c2 bundle/notes/nano.txt df6b46815dd3aa90d3c3569663556622364afec564f623f53561ca977298ff48 bundle/notes/vim.txt
Note Captured SHA-256 digest
nano.txt 0d2b66a971651927aadcc636019d2ee5f934c8b8f472bbc62fb40ef12b6a35c2
vim.txt df6b46815dd3aa90d3c3569663556622364afec564f623f53561ca977298ff48

4. Inspect permissions and recover a denied read

Section titled “4. Inspect permissions and recover a denied read”

Goal: Keep the workspace and its directories private to your account: owner read, write, and search permissions only. Notes must have owner read and write permissions only. Deliberately remove owner read permission from nano.txt, attempt to read it as your regular user, inspect its mode, restore the permission, and read it again.

Evidence: Keep the denied read, the mode while broken, the repair, and the successful read. Explain that the pathname exists but the owner lacks read access. Identify the missing r in the owner’s three mode positions.

You pass this stage when the denied read is explained and repaired without using root, directories have mode 700, and notes have mode 600.

Hint: Changing ownership and permissions.

Check your evidence: one possible permission recovery
Recover from an intentional permission error
learner@rootvolt:~/lab/capstone$ chmod 700 . bundle bundle/notes bundle/logs bundle/resultslearner@rootvolt:~/lab/capstone$ chmod 600 bundle/notes/*.txtlearner@rootvolt:~/lab/capstone$ chmod u-r bundle/notes/nano.txtlearner@rootvolt:~/lab/capstone$ cat -- bundle/notes/nano.txtcat: bundle/notes/nano.txt: Permission deniedlearner@rootvolt:~/lab/capstone$ ls -l bundle/notes/nano.txt--w------- 1 learner learner 65 Nov 15 19:34 bundle/notes/nano.txtlearner@rootvolt:~/lab/capstone$ chmod u+r bundle/notes/nano.txtlearner@rootvolt:~/lab/capstone$ cat ./bundle/notes/nano.txtPersonal Linux workspace
Keep notes, logs, and results separate.learner@rootvolt:~/lab/capstone$ ls -l bundle/notestotal 8
-rw------- 1 learner learner  65 Nov 15 19:34 nano.txt
-rw------- 1 learner learner 169 Nov 15 19:34 vim.txtlearner@rootvolt:~/lab/capstone$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. Remove owner read permission, inspect the denied file, and restore access as learner.
Steps (20)
  1. Type chmod 700 . bundle bundle/notes bundle/logs bundle/results
  2. Press Enter — Restrict workspace directories to the owner
  3. Type chmod 600 bundle/notes/*.txt
  4. Press Enter — Keep the two notes private
  5. Type chmod u-r bundle/notes/nano.txt
  6. Press Enter — Intentionally remove owner read permission
  7. Type cat -- bundle/notes/nano.txt
  8. Press Enter — Observe the denied read as the file owner
  9. Output: cat: bundle/notes/nano.txt: Permission denied
  10. Type ls -l bundle/notes/nano.txt
  11. Press Enter — Inspect the missing owner read bit
  12. Output: --w------- 1 learner learner 65 Nov 15 19:34 bundle/notes/nano.txt
  13. Type chmod u+r bundle/notes/nano.txt
  14. Press Enter — Restore only the missing read permission
  15. Type cat ./bundle/notes/nano.txt
  16. Press Enter — Verify that reading works again
  17. Output: Personal Linux workspace Keep notes, logs, and results separate.
  18. Type ls -l bundle/notes
  19. Press Enter — Collect the restored note permissions
  20. Output: total 8 -rw------- 1 learner learner 65 Nov 15 19:34 nano.txt -rw------- 1 learner learner 169 Nov 15 19:34 vim.txt

The error names bundle/notes/nano.txt and says Permission denied: the file exists, unlike the missing path in stage 2. ls -l shows that its owner is learner, the account running cat, so the first permission triplet applies. In --w-------, that triplet is -w-: it lacks r. After the repair, the notes show -rw-------.

5. Filter synthetic logs into a saved result

Section titled “5. Filter synthetic logs into a saved result”

Goal: Create bundle/logs/activity.log with this synthetic input and a final newline. Do not copy a system log.

Synthetic activity log
INFO workspace opened
WARN backup overdue
INFO notes saved
WARN review permissions

Locate the log by filename, find its warning line numbers, and save only the warning text to bundle/results/warnings.txt. Preserve the original. Make both files private, with owner read and write permissions only.

Evidence: Keep the located pathname, matching source line numbers, saved result, and directory permissions.

You pass this stage when the source still has four lines and the result contains exactly its two WARN lines without added line numbers. The files have mode 600; the directories retain mode 700.

Hints: Searching inside files and Redirection.

Check your evidence: one possible filtering run
Save warnings from a synthetic log
learner@rootvolt:~/lab/capstone$ printf '%s\n' 'INFO workspace opened' > bundle/logs/activity.loglearner@rootvolt:~/lab/capstone$ printf '%s\n' 'WARN backup overdue' >> bundle/logs/activity.loglearner@rootvolt:~/lab/capstone$ printf '%s\n' 'INFO notes saved' >> bundle/logs/activity.loglearner@rootvolt:~/lab/capstone$ printf '%s\n' 'WARN review permissions' >> bundle/logs/activity.loglearner@rootvolt:~/lab/capstone$ find bundle -name '*.log'bundle/logs/activity.loglearner@rootvolt:~/lab/capstone$ grep -n '^WARN ' bundle/logs/activity.log2:WARN backup overdue
4:WARN review permissionslearner@rootvolt:~/lab/capstone$ grep '^WARN ' bundle/logs/activity.log > bundle/results/warnings.txtlearner@rootvolt:~/lab/capstone$ chmod 600 bundle/logs/activity.log bundle/results/warnings.txtlearner@rootvolt:~/lab/capstone$ cat bundle/results/warnings.txtWARN backup overdue
WARN review permissionslearner@rootvolt:~/lab/capstone$ ls -ld bundle bundle/*drwx------ 5 learner learner 4096 Nov 15 19:34 bundle
drwx------ 2 learner learner 4096 Nov 15 19:34 bundle/logs
drwx------ 2 learner learner 4096 Nov 15 19:34 bundle/notes
drwx------ 2 learner learner 4096 Nov 15 19:34 bundle/resultslearner@rootvolt:~/lab/capstone$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. Write a synthetic log, find warnings on lines 2 and 4, and save those two lines separately.
Steps (24)
  1. Type printf '%s\n' 'INFO workspace opened' > bundle/logs/activity.log
  2. Press Enter — Start the synthetic log with the opening event
  3. Type printf '%s\n' 'WARN backup overdue' >> bundle/logs/activity.log
  4. Press Enter — Append the backup warning
  5. Type printf '%s\n' 'INFO notes saved' >> bundle/logs/activity.log
  6. Press Enter — Append the saved-notes event
  7. Type printf '%s\n' 'WARN review permissions' >> bundle/logs/activity.log
  8. Press Enter — Append the permission-review warning
  9. Type find bundle -name '*.log'
  10. Press Enter — Locate the synthetic source by name
  11. Output: bundle/logs/activity.log
  12. Type grep -n '^WARN ' bundle/logs/activity.log
  13. Press Enter — Identify the two source line numbers
  14. Output: 2:WARN backup overdue 4:WARN review permissions
  15. Type grep '^WARN ' bundle/logs/activity.log > bundle/results/warnings.txt
  16. Press Enter — Save only warning text
  17. Type chmod 600 bundle/logs/activity.log bundle/results/warnings.txt
  18. Press Enter — Make input and saved result private
  19. Type cat bundle/results/warnings.txt
  20. Press Enter — Check the exact saved warning lines
  21. Output: WARN backup overdue WARN review permissions
  22. Type ls -ld bundle bundle/*
  23. Press Enter — Collect directory modes
  24. Output: drwx------ 5 learner learner 4096 Nov 15 19:34 bundle drwx------ 2 learner learner 4096 Nov 15 19:34 bundle/logs drwx------ 2 learner learner 4096 Nov 15 19:34 bundle/notes drwx------ 2 learner learner 4096 Nov 15 19:34 bundle/results

6. Install a utility and collect the directory listing

Section titled “6. Install a utility and collect the directory listing”

Goal: Inspect the repository’s tree package, refresh package indexes, and install it on your Ubuntu lab machine. Use it to collect the completed bundle’s directory listing. Review the proposed package changes before accepting them.

Evidence: Keep the package metadata, successful installation, and listing. Remove tree after collecting the listing, and verify that it is no longer installed. This exercise assumes it was absent before you began; retain software that was already yours.

You pass this stage when the listing contains notes/nano.txt, notes/vim.txt, logs/activity.log, and results/warnings.txt, and the package installed for the exercise has been removed.

Hint: APT everyday operations.

Check your evidence: one possible utility lifecycle
Utility
learner@rootvolt:~/lab$ sudo -v[sudo] password for learner: learner@rootvolt:~/lab$ sudo apt updateGet:1 http://archive.ubuntu.com/ubuntu noble InRelease [256 kB]
Get:2 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:4 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [55.6 kB]
Get:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:6 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [2,211 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [19.3 MB]
Get:8 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1,471 kB]
Get:9 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1,557 kB]
Get:10 http://archive.ubuntu.com/ubuntu noble/restricted amd64 Packages [117 kB]
Get:11 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages [1,808 kB]
Get:12 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages [331 kB]
Get:13 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1,792 kB]
Get:14 http://archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [2,324 kB]
Get:15 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [61.7 kB]
Get:16 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [2,179 kB]
Get:17 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [36.0 kB]
Get:18 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 Packages [49.0 kB]
Get:19 http://archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 Packages [669 B]
Fetched 33.9 MB in 5s (7,537 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.learner@rootvolt:~/lab$ apt show treePackage: tree
Version: 2.1.1-2ubuntu3.24.04.2
Priority: optional
Section: universe/utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Florian Ernst <florian@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 111 kB
Depends: libc6 (>= 2.38)
Homepage: http://oldmanprogrammer.net/source.php?dir=projects/tree
Task: xubuntu-desktop, lubuntu-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop-minimal, ubuntu-budgie-desktop, ubuntu-budgie-desktop-raspi, ubuntu-unity-desktop, ubuntucinnamon-desktop-minimal, ubuntucinnamon-desktop-raspi
Download-Size: 47.4 kB
APT-Sources: http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages
Description: displays an indented directory tree, in color

N: There is 1 additional record. Please use the '-a' switch to see itlearner@rootvolt:~/lab$ sudo apt install --simulate treeReading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  tree
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Inst tree (2.1.1-2ubuntu3.24.04.2 Ubuntu:24.04/noble-updates [amd64])
Conf tree (2.1.1-2ubuntu3.24.04.2 Ubuntu:24.04/noble-updates [amd64])learner@rootvolt:~/lab$ sudo apt install --yes -o Dpkg::Progress-Fancy=0 treeReading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  tree
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 47.4 kB of archives.
After this operation, 111 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 tree amd64 2.1.1-2ubuntu3.24.04.2 [47.4 kB]
Fetched 47.4 kB in 0s (101 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package tree.
(Reading database ... 11321 files and directories currently installed.)
Preparing to unpack .../tree_2.1.1-2ubuntu3.24.04.2_amd64.deb ...
Unpacking tree (2.1.1-2ubuntu3.24.04.2) ...
Setting up tree (2.1.1-2ubuntu3.24.04.2) ...
Processing triggers for man-db (2.12.0-4build2) ...learner@rootvolt:~/lab$ tree ~/lab/capstone/bundle/home/learner/lab/capstone/bundle
├── logs
│   └── activity.log
├── notes
│   ├── nano.txt
│   └── vim.txt
└── results
    └── warnings.txt

4 directories, 4 fileslearner@rootvolt:~/lab$ sudo apt remove --yes -o Dpkg::Progress-Fancy=0 treeReading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  tree
0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded.
After this operation, 111 kB disk space will be freed.
(Reading database ... 11328 files and directories currently installed.)
Removing tree (2.1.1-2ubuntu3.24.04.2) ...
Processing triggers for man-db (2.12.0-4build2) ...learner@rootvolt:~/lab$ dpkg-query -W -f='${Package}: ${Status}\n' treedpkg-query: no packages found matching treelearner@rootvolt:~/lab$ cd ~/lab/capstonelearner@rootvolt:~/lab/capstone$ rm bundle/notes/nano.txt bundle/notes/vim.txtlearner@rootvolt:~/lab/capstone$ rm bundle/logs/activity.log bundle/results/warnings.txtlearner@rootvolt:~/lab/capstone$ rmdir bundle/notes bundle/logs bundle/results bundlelearner@rootvolt:~/lab/capstone$ cd ~/lablearner@rootvolt:~/lab$ rmdir capstonelearner@rootvolt:~/lab$ test ! -e capstone && printf 'Workspace absent\n'Workspace absentlearner@rootvolt:~/lab$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. Authenticate with a hidden password, install tree, list the prepared bundle, remove tree, and clean up this separate capture.
Steps (41)
  1. Type sudo -v
  2. Press Enter — Authenticate for package administration
  3. Output: [sudo] password for learner:
  4. Type the password (the terminal shows nothing)
  5. Press Enter — Submit the hidden lab password
  6. Type sudo apt update
  7. Press Enter — Refresh repository indexes
  8. Output: Get:1 http://archive.ubuntu.com/ubuntu noble InRelease [256 kB] Get:2 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB] Get:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB] Get:4 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [55.6 kB] Get:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB] Get:6 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [2,211 kB] Get:7 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [19.3 MB] Get:8 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1,471 kB] Get:9 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1,557 kB] Get:10 http://archive.ubuntu.com/ubuntu noble/restricted amd64 Packages [117 kB] Get:11 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages [1,808 kB] Get:12 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages [331 kB] Get:13 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1,792 kB] Get:14 http://archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [2,324 kB] Get:15 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [61.7 kB] Get:16 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [2,179 kB] Get:17 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [36.0 kB] Get:18 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 Packages [49.0 kB] Get:19 http://archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 Packages [669 B] Fetched 33.9 MB in 5s (7,537 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done 5 packages can be upgraded. Run 'apt list --upgradable' to see them.
  9. Type apt show tree
  10. Press Enter — Inspect the utility before installation
  11. Output: Package: tree Version: 2.1.1-2ubuntu3.24.04.2 Priority: optional Section: universe/utils Origin: Ubuntu Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Original-Maintainer: Florian Ernst <florian@debian.org> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 111 kB Depends: libc6 (>= 2.38) Homepage: http://oldmanprogrammer.net/source.php?dir=projects/tree Task: xubuntu-desktop, lubuntu-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop-minimal, ubuntu-budgie-desktop, ubuntu-budgie-desktop-raspi, ubuntu-unity-desktop, ubuntucinnamon-desktop-minimal, ubuntucinnamon-desktop-raspi Download-Size: 47.4 kB APT-Sources: http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages Description: displays an indented directory tree, in color N: There is 1 additional record. Please use the '-a' switch to see it
  12. Type sudo apt install --simulate tree
  13. Press Enter — Preview the package plan without changing installed packages
  14. Output: Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: tree 0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded. Inst tree (2.1.1-2ubuntu3.24.04.2 Ubuntu:24.04/noble-updates [amd64]) Conf tree (2.1.1-2ubuntu3.24.04.2 Ubuntu:24.04/noble-updates [amd64])
  15. Type sudo apt install --yes -o Dpkg::Progress-Fancy=0 tree
  16. Press Enter — Install the reviewed directory listing utility
  17. Output: Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: tree 0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded. Need to get 47.4 kB of archives. After this operation, 111 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 tree amd64 2.1.1-2ubuntu3.24.04.2 [47.4 kB] Fetched 47.4 kB in 0s (101 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package tree. (Reading database ... 11321 files and directories currently installed.) Preparing to unpack .../tree_2.1.1-2ubuntu3.24.04.2_amd64.deb ... Unpacking tree (2.1.1-2ubuntu3.24.04.2) ... Setting up tree (2.1.1-2ubuntu3.24.04.2) ... Processing triggers for man-db (2.12.0-4build2) ...
  18. Type tree ~/lab/capstone/bundle
  19. Press Enter — Collect the complete project directory listing
  20. Output: /home/learner/lab/capstone/bundle ├── logs │   └── activity.log ├── notes │   ├── nano.txt │   └── vim.txt └── results └── warnings.txt 4 directories, 4 files
  21. Type sudo apt remove --yes -o Dpkg::Progress-Fancy=0 tree
  22. Press Enter — Remove the utility installed for this project
  23. Output: Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages will be REMOVED: tree 0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded. After this operation, 111 kB disk space will be freed. (Reading database ... 11328 files and directories currently installed.) Removing tree (2.1.1-2ubuntu3.24.04.2) ... Processing triggers for man-db (2.12.0-4build2) ...
  24. Type dpkg-query -W -f='${Package}: ${Status}\n' tree
  25. Press Enter — Verify tree is no longer installed
  26. Output: dpkg-query: no packages found matching tree
  27. Type cd ~/lab/capstone
  28. Press Enter — Enter the prepared workspace for cleanup
  29. Type rm bundle/notes/nano.txt bundle/notes/vim.txt
  30. Press Enter — Remove the two known editor notes
  31. Type rm bundle/logs/activity.log bundle/results/warnings.txt
  32. Press Enter — Remove the synthetic log and saved warning result
  33. Type rmdir bundle/notes bundle/logs bundle/results bundle
  34. Press Enter — Remove empty prepared directories
  35. Type cd ~/lab
  36. Press Enter — Return to the baseline lab
  37. Type rmdir capstone
  38. Press Enter — Remove the fixture workspace
  39. Type test ! -e capstone && printf 'Workspace absent\n'
  40. Press Enter — Verify the workspace reset
  41. Output: Workspace absent

The -o Dpkg::Progress-Fancy=0 option only keeps the recorded output plain text and can be omitted in a normal terminal; see the APT lesson.

APT installs a package without asking when nothing else is added, so the review uses --simulate: it prints the plan and changes nothing. The run then installs one package and removes one package. The final package query reports no matching package and exits with status 1, confirming absence. Your repository version and download amounts can differ. The workspace cleanup at the end belongs to this separate recording; keep your own workspace for the archive stage.

7. Archive the workspace and test recovery

Section titled “7. Archive the workspace and test recovery”

Goal: Create bundle.tar.gz containing bundle, inspect every member name, and extract into an empty restored directory. Compare the restored bundle with the original. Record the local archive’s complete SHA-256 digest.

Evidence: Keep the member list, independent extraction, recursive comparison, its exit status, and local digest. Inspect restored permissions too.

You pass this stage when the archive contains the four intended files under bundle/, recovery preserves their text, and the comparison returns status 0. The recovered directories and files retain the intended private modes.

Hint: Creating and inspecting archives.

Check your evidence: one possible archive test
Archive evidence
learner@rootvolt:~/lab/capstone$ tar -czf bundle.tar.gz bundlelearner@rootvolt:~/lab/capstone$ tar -tf bundle.tar.gzbundle/
bundle/results/
bundle/results/warnings.txt
bundle/notes/
bundle/notes/vim.txt
bundle/notes/nano.txt
bundle/logs/
bundle/logs/activity.loglearner@rootvolt:~/lab/capstone$ sha256sum bundle.tar.gzcfcaa01933a26a70548ae039f17a96375ace2c9fda6b164795356c078badb676  bundle.tar.gzlearner@rootvolt:~/lab/capstone$ mkdir restoredlearner@rootvolt:~/lab/capstone$ tar -xf bundle.tar.gz -C restoredlearner@rootvolt:~/lab/capstone$ diff -r bundle restored/bundlelearner@rootvolt:~/lab/capstone$ echo $?0learner@rootvolt:~/lab/capstone$ ls -ld restored/bundle restored/bundle/*drwx------ 5 learner learner 4096 Nov 15 19:34 restored/bundle
drwx------ 2 learner learner 4096 Nov 15 19:34 restored/bundle/logs
drwx------ 2 learner learner 4096 Nov 15 19:34 restored/bundle/notes
drwx------ 2 learner learner 4096 Nov 15 19:34 restored/bundle/resultslearner@rootvolt:~/lab/capstone$ ls -l restored/bundle/*restored/bundle/logs:
total 4
-rw------- 1 learner learner 83 Nov 15 19:34 activity.log

restored/bundle/notes:
total 8
-rw------- 1 learner learner  65 Nov 15 19:34 nano.txt
-rw------- 1 learner learner 169 Nov 15 19:34 vim.txt

restored/bundle/results:
total 4
-rw------- 1 learner learner 44 Nov 15 19:34 warnings.txtlearner@rootvolt:~/lab/capstone$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. List the archive, extract into restored, and compare the original and recovered bundle.
Steps (23)
  1. Type tar -czf bundle.tar.gz bundle
  2. Press Enter — Package the source and saved result together
  3. Type tar -tf bundle.tar.gz
  4. Press Enter — Inspect the archive members before transferring
  5. Output: bundle/ bundle/results/ bundle/results/warnings.txt bundle/notes/ bundle/notes/vim.txt bundle/notes/nano.txt bundle/logs/ bundle/logs/activity.log
  6. Type sha256sum bundle.tar.gz
  7. Press Enter — Record the local digest for remote comparison
  8. Output: cfcaa01933a26a70548ae039f17a96375ace2c9fda6b164795356c078badb676 bundle.tar.gz
  9. Type mkdir restored
  10. Press Enter — Create a clean destination to test the practice archive
  11. Type tar -xf bundle.tar.gz -C restored
  12. Press Enter — Restore a copy while preserving the original bundle
  13. Type diff -r bundle restored/bundle
  14. Press Enter — Compare the original and restored directory trees
  15. Type echo $?
  16. Press Enter — Check the successful recursive comparison status
  17. Output: 0
  18. Type ls -ld restored/bundle restored/bundle/*
  19. Press Enter — Inspect the restored bundle and its three directory modes
  20. Output: drwx------ 5 learner learner 4096 Nov 15 19:34 restored/bundle drwx------ 2 learner learner 4096 Nov 15 19:34 restored/bundle/logs drwx------ 2 learner learner 4096 Nov 15 19:34 restored/bundle/notes drwx------ 2 learner learner 4096 Nov 15 19:34 restored/bundle/results
  21. Type ls -l restored/bundle/*
  22. Press Enter — Inspect the recovered files in each bundle directory
  23. Output: restored/bundle/logs: total 4 -rw------- 1 learner learner 83 Nov 15 19:34 activity.log restored/bundle/notes: total 8 -rw------- 1 learner learner 65 Nov 15 19:34 nano.txt -rw------- 1 learner learner 169 Nov 15 19:34 vim.txt restored/bundle/results: total 4 -rw------- 1 learner learner 44 Nov 15 19:34 warnings.txt

The file members are bundle/notes/nano.txt, bundle/notes/vim.txt, bundle/logs/activity.log, and bundle/results/warnings.txt. Directory entries also appear. A silent diff followed immediately by status 0 confirms the recorded content comparison; it does not compare permission bits.

Goal: Read the SSH host fingerprint through the lab server’s console first. Compare the full fingerprint with the client’s first-connection prompt before accepting it. Transfer the archive as remote ~/capstone.tar.gz, then verify that copy from a remote shell.

Evidence: Keep the independent fingerprint, matching client fingerprint, local and remote pathnames, successful upload, full digests on both sides, and remote member list. Enter passwords only at the program’s password prompt; the terminal does not display them.

You pass this stage when the server identity is checked, the remote digest matches your local digest character for character, and remote tar lists the intended members. Transfer completion alone does not pass.

Hints: First SSH connection and SFTP.

Check your evidence: one possible verified transfer
Lab server console: independent fingerprint
learner@labserver:~$ ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub256 SHA256:/ym3ow3fUQzBWauSJ3rV5QTvs2zTSVsQvBhoWQf0viE root@labserver (ED25519)learner@labserver:~$ test ! -e ~/capstone.tar.gz && printf 'Remote destination absent\n'Remote destination absentlearner@labserver:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS (lab server console), GNU Bash 5.2.21. REMOTE server console: obtain the fingerprint independently and check that the upload pathname is absent.
Steps (6)
  1. Type ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub
  2. Press Enter — Obtain the full server fingerprint independently
  3. Output: 256 SHA256:/ym3ow3fUQzBWauSJ3rV5QTvs2zTSVsQvBhoWQf0viE root@labserver (ED25519)
  4. Type test ! -e ~/capstone.tar.gz && printf 'Remote destination absent\n'
  5. Press Enter — Confirm that the reserved upload will not overwrite a remote file
  6. Output: Remote destination absent
Transfer evidence
learner@rootvolt:~/lab/capstone$ sftp learner@labserverThe authenticity of host 'labserver (172.19.0.2)' can't be established.
ED25519 key fingerprint is SHA256:/ym3ow3fUQzBWauSJ3rV5QTvs2zTSVsQvBhoWQf0viE.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yesWarning: Permanently added 'labserver' (ED25519) to the list of known hosts.
learner@labserver's password: Connected to labserver.
sftp> lpwdLocal working directory: /home/learner/lab/capstone
sftp> pwdRemote working directory: /home/learner
sftp> put bundle.tar.gz capstone.tar.gzUploading bundle.tar.gz to /home/learner/capstone.tar.gz
bundle.tar.gz                                 100%  514     1.2MB/s   00:00    
sftp> byelearner@rootvolt:~/lab/capstone$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. LOCAL SFTP client: compare the fingerprint, accept the matching key, authenticate, and upload the archive.
Steps (20)
  1. Type sftp learner@labserver
  2. Press Enter — Compare the complete fingerprint with the trusted console before accepting
  3. Output: The authenticity of host 'labserver (172.19.0.2)' can't be established. ED25519 key fingerprint is SHA256:/ym3ow3fUQzBWauSJ3rV5QTvs2zTSVsQvBhoWQf0viE. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])?
  4. Type yes into the running program
  5. Press Enter — Accept the matching host identity
  6. Output: Warning: Permanently added 'labserver' (ED25519) to the list of known hosts. learner@labserver's password:
  7. Type the password (the terminal shows nothing)
  8. Press Enter — Authenticate to SFTP with the hidden lab password
  9. Output: Connected to labserver. sftp>
  10. Type lpwd into the running program
  11. Press Enter — Identify the local source directory
  12. Output: Local working directory: /home/learner/lab/capstone sftp>
  13. Type pwd into the running program
  14. Press Enter — Identify the remote destination directory
  15. Output: Remote working directory: /home/learner sftp>
  16. Type put bundle.tar.gz capstone.tar.gz into the running program
  17. Press Enter — Upload the local archive into the remote home directory
  18. Output: Uploading bundle.tar.gz to /home/learner/capstone.tar.gz bundle.tar.gz 100% 514 1.2MB/s 00:00 sftp>
  19. Type bye into the running program
  20. Press Enter — Close SFTP and return to the local shell
Verify evidence
learner@rootvolt:~/lab/capstone$ ssh learner@labserverlearner@labserver's password: Welcome to Ubuntu 24.04.5 LTS (GNU/Linux 6.18.33.1-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.learner@labserver:~$ sha256sum ~/capstone.tar.gzcfcaa01933a26a70548ae039f17a96375ace2c9fda6b164795356c078badb676  /home/learner/capstone.tar.gzlearner@labserver:~$ tar -tf ~/capstone.tar.gzbundle/
bundle/results/
bundle/results/warnings.txt
bundle/notes/
bundle/notes/vim.txt
bundle/notes/nano.txt
bundle/logs/
bundle/logs/activity.loglearner@labserver:~$ rm ~/capstone.tar.gzlearner@labserver:~$ test ! -e ~/capstone.tar.gz && printf 'Remote upload absent\n'Remote upload absentlearner@labserver:~$ exitlogout
Connection to labserver closed.learner@rootvolt:~/lab/capstone$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. REMOTE SSH shell: compare the archive digest, list members, remove the upload, and verify its absence before exiting.
Steps (20)
  1. Type ssh learner@labserver
  2. Press Enter — Open a remote shell on the already verified host
  3. Output: learner@labserver's password:
  4. Type the password (the terminal shows nothing)
  5. Press Enter — Authenticate again to reach the remote shell
  6. Output: Welcome to Ubuntu 24.04.5 LTS (GNU/Linux 6.18.33.1-microsoft-standard-WSL2 x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/pro To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details.
  7. Type sha256sum ~/capstone.tar.gz
  8. Press Enter — Compare the complete remote digest with the local digest
  9. Output: cfcaa01933a26a70548ae039f17a96375ace2c9fda6b164795356c078badb676 /home/learner/capstone.tar.gz
  10. Type tar -tf ~/capstone.tar.gz
  11. Press Enter — Verify the remote archive has the intended members
  12. Output: bundle/ bundle/results/ bundle/results/warnings.txt bundle/notes/ bundle/notes/vim.txt bundle/notes/nano.txt bundle/logs/ bundle/logs/activity.log
  13. Type rm ~/capstone.tar.gz
  14. Press Enter — Remove the uploaded archive on the server
  15. Type test ! -e ~/capstone.tar.gz && printf 'Remote upload absent\n'
  16. Press Enter — Confirm the remote upload is absent
  17. Output: Remote upload absent
  18. Type exit
  19. Press Enter — Leave the remote shell before cleaning local files
  20. Output: logout Connection to labserver closed.
Side Archive pathname
LOCAL rootvolt ~/lab/capstone/bundle.tar.gz
REMOTE labserver ~/capstone.tar.gz

The complete matching digest in this run is cfcaa01933a26a70548ae039f17a96375ace2c9fda6b164795356c078badb676. Use your own matching pair: archive metadata makes this value change between runs.

Goal: Save your hand-in separately. Remove only the reserved remote upload, local archive, original workspace, and recovery-test copy. Inspect paths before removing their files, and use empty-directory removal for directories. Remove only the saved host keys for labserver and verify their absence, following the SSH reset explanation.

Evidence: Keep the remote absence check before leaving SSH, local workspace absence check, package removal check, and host-key lookup after removal.

You pass this stage when the exercise paths and installed utility are absent, no saved key for labserver remains, and other lab files and SSH entries remain intact. APT’s refreshed indexes can remain. Keep the SSH directory and the host-key backup described in the linked reset guidance.

Check your evidence: one possible two-machine reset

The preceding remote verification recording removes the upload and checks its absence before returning to the local shell. The utility recording verifies package removal.

The local cleanup names each file it removes, two per command, then removes the emptied directories with rmdir, which refuses a directory that still holds something.

Reset local files and server trust
learner@rootvolt:~/lab/capstone$ cd restored/bundlelearner@rootvolt:~/lab/capstone/restored/bundle$ rm notes/nano.txt notes/vim.txtlearner@rootvolt:~/lab/capstone/restored/bundle$ rm logs/activity.log results/warnings.txtlearner@rootvolt:~/lab/capstone/restored/bundle$ rmdir notes logs resultslearner@rootvolt:~/lab/capstone/restored/bundle$ cd ../..learner@rootvolt:~/lab/capstone$ rmdir restored/bundle restoredlearner@rootvolt:~/lab/capstone$ rm bundle.tar.gzlearner@rootvolt:~/lab/capstone$ rm bundle/notes/nano.txt bundle/notes/vim.txtlearner@rootvolt:~/lab/capstone$ rm bundle/logs/activity.log bundle/results/warnings.txtlearner@rootvolt:~/lab/capstone$ rmdir bundle/notes bundle/logs bundle/results bundlelearner@rootvolt:~/lab/capstone$ cd ~/lablearner@rootvolt:~/lab$ rmdir capstonelearner@rootvolt:~/lab$ test ! -e capstone && printf 'Workspace absent\n'Workspace absentlearner@rootvolt:~/lab$ ssh-keygen -R labserver# Host labserver found: line 1
# Host labserver found: line 2
# Host labserver found: line 3
/home/learner/.ssh/known_hosts updated.
Original contents retained as /home/learner/.ssh/known_hosts.oldlearner@rootvolt:~/lab$ ssh-keygen -F labserver || printf 'No saved key for labserver\n'No saved key for labserverlearner@rootvolt:~/lab$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. LOCAL cleanup: remove the recovery copy, archive and workspace, then remove and check only labserver's saved keys.
Steps (33)
  1. Type cd restored/bundle
  2. Press Enter — Enter the recovery-test bundle before deleting its known files
  3. Type rm notes/nano.txt notes/vim.txt
  4. Press Enter — Remove the two restored editor notes
  5. Type rm logs/activity.log results/warnings.txt
  6. Press Enter — Remove the restored log and warning result
  7. Type rmdir notes logs results
  8. Press Enter — Remove the empty recovered subdirectories
  9. Type cd ../..
  10. Press Enter — Return to the workspace outside the recovery-test copy
  11. Type rmdir restored/bundle restored
  12. Press Enter — Remove the empty recovered bundle and extraction directory
  13. Type rm bundle.tar.gz
  14. Press Enter — Remove the local archive
  15. Type rm bundle/notes/nano.txt bundle/notes/vim.txt
  16. Press Enter — Remove the two known editor notes
  17. Type rm bundle/logs/activity.log bundle/results/warnings.txt
  18. Press Enter — Remove the synthetic log and saved warning result
  19. Type rmdir bundle/notes bundle/logs bundle/results bundle
  20. Press Enter — Remove the empty original directories
  21. Type cd ~/lab
  22. Press Enter — Return to the baseline lab
  23. Type rmdir capstone
  24. Press Enter — Remove the reserved workspace
  25. Type test ! -e capstone && printf 'Workspace absent\n'
  26. Press Enter — Verify the workspace is absent
  27. Output: Workspace absent
  28. Type ssh-keygen -R labserver
  29. Press Enter — Remove only labserver host keys
  30. Output: # Host labserver found: line 1 # Host labserver found: line 2 # Host labserver found: line 3 /home/learner/.ssh/known_hosts updated. Original contents retained as /home/learner/.ssh/known_hosts.old
  31. Type ssh-keygen -F labserver || printf 'No saved key for labserver\n'
  32. Press Enter — Check that labserver has no saved key
  33. Output: No saved key for labserver

The earlier workspace recording also resets its own files:

Reset the workspace capture
learner@rootvolt:~/lab/capstone$ rm bundle/notes/nano.txt bundle/notes/vim.txtlearner@rootvolt:~/lab/capstone$ rm bundle/logs/activity.log bundle/results/warnings.txtlearner@rootvolt:~/lab/capstone$ rmdir bundle/notes bundle/logs bundle/results bundlelearner@rootvolt:~/lab/capstone$ cd ~/lablearner@rootvolt:~/lab$ rmdir capstonelearner@rootvolt:~/lab$ test ! -e capstone && printf 'Workspace absent\n'Workspace absentlearner@rootvolt:~/lab$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, GNU Bash 5.2.21. Remove the known workspace files and empty directories, then check that capstone is absent.
Steps (13)
  1. Type rm bundle/notes/nano.txt bundle/notes/vim.txt
  2. Press Enter — Remove the two known editor notes
  3. Type rm bundle/logs/activity.log bundle/results/warnings.txt
  4. Press Enter — Remove the synthetic log and saved warning result
  5. Type rmdir bundle/notes bundle/logs bundle/results bundle
  6. Press Enter — Remove only empty exercise directories
  7. Type cd ~/lab
  8. Press Enter — Leave the exercise workspace
  9. Type rmdir capstone
  10. Press Enter — Remove the empty reserved directory
  11. Type test ! -e capstone && printf 'Workspace absent\n'
  12. Press Enter — Check that the workspace is absent
  13. Output: Workspace absent
  1. What did the failed directory change leave unchanged?
  2. Why did the owner triplet apply to the failed read of nano.txt, and which permission was missing?
  3. What does a silent recursive comparison establish, and what must you inspect separately?
  4. Why check both the SSH host fingerprint and the archive digest?
  5. Which cleanup checks run remotely, and which run locally?
Answers
  1. The current directory and filesystem contents stayed unchanged; the target path did not exist.
  2. The file owner was learner, the account running cat, so the owner triplet applied. Its -w- triplet in --w------- lacked r; restoring owner read permission allowed the read.
  3. Status 0 with no differences establishes matching compared contents and structure. Check modes separately.
  4. The fingerprint checks the server’s identity; matching local and remote digests check the transferred archive’s bytes.
  5. Remove and check the uploaded archive remotely. Check the local workspace, exercise package, and saved server host key locally.

Keep your evidence as a record of the workspace you built. The Linux course overview shows the course plan beyond Beginner.