Get Comfortable in a Terminal
Start the Local Security Casebook in a dedicated practice folder. Use the supplied PowerShell example, or create the same files with your own shell and editor, then record which commands inspect information and which change it. This folder becomes the home for every later StudyNotes exercise.
What You Will Learn
- Distinguish a terminal, a shell, a command, and an argument.
- Create a bounded practice workspace and record exactly what you inspected.
- Identify which operations read information and which change it.
Understand the Idea
A terminal is the window through which you interact with a shell. The shell interprets a command and its arguments, then starts the operation or program. A command's meaning depends on the shell: PowerShell's Get-Content and a Linux shell's cat can both display a file, but their surrounding syntax is different. This lesson uses PowerShell explicitly. On another system, use your editor to create the same files and consult that shell's documentation rather than pasting unfamiliar commands and hoping they behave identically.
Your current directory supplies the starting point for relative paths. If you ask to read evidence\scope.txt, the shell looks below the current directory, not automatically beside whichever file you last edited. An absolute path identifies a location from a drive or filesystem root. Before changing files, establish where you are and what already exists. This small habit prevents many avoidable mistakes and also makes an investigation reproducible: another person needs to know which file an observation came from.
The casebook begins as an organised set of evidence and notes, not a collection of powerful tools. Keep supplied examples in fixtures, observations in evidence, explanations in notes, and executable practice code in lab. Source records should remain unchanged after you begin analysing them; create derived files separately. Give every observation a filename and context so a later conclusion can point back to its origin. You are practising the same distinction that matters in larger investigations: what you received, what you did, and what you inferred.
Read commands before executing them. Get-Location and Get-ChildItem inspect state; New-Item and Set-Content change it. A command that returns no visible output may still have succeeded, and an error should be read before retrying. Here the names are deliberately limited to a new practice folder. Do not experiment with broad deletion, administrator privileges, or existing personal documents. You can learn navigation, quoting, and inspection without any destructive operation.
WORKED EXAMPLE
Create and Inspect the Casebook
Run these commands in PowerShell from a suitable parent folder. Use a new folder name if local-security-casebook already contains work you want to preserve.
New-Item -ItemType Directory -Path .\local-security-casebook
Set-Location .\local-security-casebook
New-Item -ItemType Directory -Path notes,fixtures,evidence,lab
Set-Content -LiteralPath .\notes\scope.txt -Value 'StudyNotes is fictional. Work only with these local exercises.'
Get-Location
Get-ChildItem
Get-Content -LiteralPath .\notes\scope.txt- The first command creates the project boundary; Set-Location makes it the base for subsequent relative paths.
- Four directories separate notes, supplied data, observations, and executable examples.
- Set-Content creates a short scope statement. The remaining commands read the location, directory listing, and statement.
Expected Result
The folder contains four subdirectories, and the last command displays the fictional-scope sentence. No application server or remote connection has been started.
PROJECT STAGE 01 / 10
Establish the Evidence Workspace
Builds on: This is the first artifact; no previous file is required.
- Create the project folder and four subfolders using the example or your editor.
- Create notes/scope.txt and state that StudyNotes and both learners are fictional.
- Create README.md listing each folder's purpose and the shell you used.
- Create evidence/session-01.txt with your current project path, the inspection commands, and their actual results.
- Classify each command you ran as read-only or state-changing; correct any unexpected result before continuing.
Keep This Deliverable
README.md, notes/scope.txt, and evidence/session-01.txt inside local-security-casebook.
Check Your Build
- All exercise files are inside the named project folder.
- A reader can identify your shell and reproduce the inspection without guessing a working directory.
- Your notes distinguish the source file from the record of inspecting it.
Common Mistakes and Fixes
- A command fails because the terminal is in a different folder.
- Read Get-Location, navigate deliberately, and retry the specific inspection. Do not create several similarly named folders to hide the mistake.
- Linux and PowerShell examples are mixed without explanation.
- Label the shell in your notebook and use that shell's documented command syntax.
Check Your Understanding
Why can two terminals running the same relative-path command read different files?
Reveal the explanation
They can have different current directories. The relative path is resolved from each terminal's location, so record or set that location before interpreting the result.
Ready to Move On?
All files are inside the casebook, your shell is named, and read-only commands are distinguished from changes.
Open the learning resource
