Safe habits and privacy

The quiet risk on a phone is not a dramatic attack. It is a secret typed on the command line, a file left in shared storage, or a permission you granted months ago and forgot. This set covers the trail your own work leaves.

4 questions 1 task Read the lesson

Questions

Each one is marked as you go, and the explanation arrives straight after, which is the part worth reading.

4 questions, marked as you go.

1 A secret typed as part of a command now sits in your history. Why is that a problem?
2 What does history -d 5 do?
3 In ls -la ~/storage/shared, the line starts with l and shows an arrow to /storage/emulated/0. What does that tell you?
4 What does a VPN actually do on a public Wi-Fi network?

Tasks

These need your own device. Run the command in Termux, then paste what it printed. The marking looks at what the output means, so spacing, version numbers and ordering do not matter. If you have not installed anything yet, the lesson covers the setup.

See what a history file keeps

This writes three lines into a file in your home directory, in the shape a shell history file takes, then counts them and prints them. Look at the middle line and think about where it came from.

Run this in Termux On your own device. Nothing on this page executes it. The command runs in your terminal, and this box only reads what you paste back.

printf "ls -la\nssh deploy@example.com\ncd ~/work\n" > ~/history-demo.txt; wc -l ~/history-demo.txt; cat ~/history-demo.txt
Marking your own work Both halves of this are checked in your browser, with no server involved, so nothing stops you from pasting output you did not run. The tasks are written so that the easiest way to pass one is to actually do it and read the result, which is the whole intention.

All sets Read the lesson