Bash for Cybersecurity
workspace/ ├── inputs/ preserved synthetic originals ├── reports/ reviewed and generated copies └── scratch/ disposable experiments
Run each lesson's supplied setup in Bash. Use the real VM for course work. Use your persistent course workspace for the graded lab and homework.
cd reports pwd cd ../inputs pwd cd ..
A relative path starts at the working directory. Quote a directory name containing spaces: cd 'host reports'.
cd 'host reports'
mkdir -p reports/drafts cp -p inputs/host.conf reports/drafts/host.conf mv reports/drafts/host.conf reports/host_review.conf cat inputs/host.conf
A destination that already exists may be replaced. Inspect it first. A copied file is not automatically a complete forensic record.
touch scratch/discard.txt ls -l ./scratch/discard.txt rm ./scratch/discard.txt
rm does not use the desktop Trash. rmdir refuses a nonempty directory. Avoid wildcard or recursive deletion in this introductory workflow.
rm
rmdir
ls -li exposes inode numbers; readlink prints a stored target. A relative symbolic target starts at the link's containing directory.
ls -li
readlink
ls -a inputs cp -p inputs/.audit.conf reports/audit_working.conf diff inputs/.audit.conf reports/audit_working.conf
Edit only the working copy using the Tooling editor. diff returns zero for a match and one for an expected difference. A hidden name does not protect secrets; do not source unfamiliar files.
diff
find inputs -type f -name '*.txt' -print find inputs -type f -name '.*' -print find reports -type l -print
Quote the pattern and keep an explicit search root. An empty result or a permission diagnostic limits your conclusion. Keep discovery separate from deletion or command execution.
Linuxize: cp, mv, rm, links, and find.
Original synthetic fixtures and practice tasks; see lesson source notes.