Linux: Files, Folders & Navigation
Almost every security tool runs on Linux, so being comfortable at the shell is non-negotiable. This lesson is pure muscle memory, run each command in the terminal on the right as you read.
Who and where am I?
whoami # your username
id # your user id, group id, and group memberships
hostname # the machine's name
pwd # print working directory (where you are now)
whoami answers "which account am I?". id goes further: it shows your numeric uid, your gid, and every group you belong to (groups decide what you can access).
Looking around
ls # list files in the current folder
ls -la # long format: permissions, owner, size, date (and hidden files)
cat notes.md # print a file's contents
The ~ symbol is shorthand for your home directory (/home/learner). cd ~ always takes you home.
Creating and managing files
touch report.txt # create an empty file
echo "hello" > report.txt # write text into a file
cp report.txt copy.txt # copy
mv copy.txt archive.txt # move or rename
rm archive.txt # remove (careful, there is no recycle bin)
echo simply prints its argument; combined with > it becomes a quick way to put text in a file.
A word of caution
rm deletes immediately and permanently, there is no "trash". In this sandbox nothing real is harmed, but build the habit now of reading an rm line twice before you run it.
Try it
Work top to bottom: whoami, id, pwd, ls, ls -la, cat readme.txt, then touch test.txt and rm test.txt. Every one responds in the terminal beside this lesson.