Make the Work Yours — Install, Script, and Keep a History
16 Sept 2026·7 min read
In Part 1 I said a command can be saved and handed to someone else, and that this is the real difference from clicking. Today that promise arrives. Three things: getting tools without hunting download pages, saving your own commands, and being able to undo a whole folder.
Install by name
Your system has a program whose job is fetching other programs. You give it a name, it finds the right version, installs it, and knows how to update or remove it later. No search results, no download button, no wondering whether the site was the real one.
winget install --id Git.Git
winget ships with Windows 11 — mine reports v1.29.290. The --id part asks for that exact package rather than anything with a similar name. Use winget search <word> to find an id first.
Same idea, three systems. Pick your tab — the copy button gives you that line only.
What sudo actually meansIt runs one command with administrator powers, for that command only. Which is why installing needs it and listing files does not. Treat it as a small door you open on purpose, not a habit — if a command you found online starts with sudo, that is exactly the moment to read it before running it.
A script is just your commands in a file
There is no new language to learn here. You already know what goes in it — the lines you have been typing. Open a file with nano from Part 4 and put them in, one per line:
nano backup.sh
Ctrl+O and Enter to save, Ctrl+X to leave — the same two keys as before.
Four lines. The first one names the shell that should run the rest.
That first line, with the hash and the exclamation mark, is not a comment even though it looks like one. It tells the system which program should read the file. And mkdir -p is worth noticing: the -p flag means "do not complain if it already exists", which you can now confirm yourself with mkdir --help.
bash backup.sh
Runs it. This always works, on every system, and needs no setup.
And then the confusing part
You will also see scripts run the shorter way, with a dot and a slash in front of the name. That way needs one extra thing first, and whether you notice depends on which system you are on — which is exactly why this trips people up.
./backup.sh
The dot-slash means "the file right here". On macOS and Linux this fails the first time.
What most tutorials get wrong hereThey say the first run always fails with Permission denied. It depends on the system, and I tested both. On Ubuntu 24.04 under WSL a new .sh file gave Permission denied and its permissions read -rw-r--r--. In Git Bash on Windows the identical file ran immediately and already showed -rwxr-xr-x, because Windows does not track that flag the same way. So if it works for you first try, nothing is wrong with your machine — and if you are on macOS or Linux, expect the error.
chmod +x backup.sh
Marks the file as runnable. After this, ./backup.sh works — and ls -l shows an x in the permissions.
Nothing was broken and nothing needed fixing. A new file is not marked as a program yet, and that is a safety feature: it means a file that arrives on your machine cannot run itself. Use bash backup.sh while you are learning and you can skip the whole subject.
Give the folder an undo
Part 4 was blunt: rm has no undo. This is the answer to that, one level up. git takes a snapshot of a whole folder whenever you ask, and lets you go back to any snapshot later.
git init
Start tracking this folder. Run it once, inside the folder you care about.
git add .
Choose what goes into the next snapshot. The dot means everything here.
git commit -m "first working backup script"
Take the snapshot. The message is for you in three months — write why, not what.
This is not about teamworkgit has a reputation as a thing you need for working with other people. Solo, on your own folder, it is the undo the terminal does not otherwise have. If you only ever learn init, add and commit, you have already got the part that saves you.
Do this in 60 secondsMake a folder, put one line in a file with nano, then run git init, git add ., and git commit -m "start". You now have a folder you can rewind. Do this to any folder you would be upset to lose.
Today’s AI angleFrom Part 10, something else will be editing your files. A commit before you hand over a task is the difference between "undo that" being one command and being an afternoon. This is the single habit worth taking from today into the AI half of the course.
That is the command line: you can move, look, search, save, repeat and rewind. Next I am going to be honest with you about what all of it still cannot do — and why no amount of extra commands fixes it.
Make the Work Yours — Install, Script, and Keep a History · Ali Huzaifa