What does Bash do inside a terminal?
A terminal gives you a place to type. Bash reads what you type and decides whether to run a built-in command or start another program. A Bash script is a saved list of instructions for that shell.
Check which shell the project expects before you copy commands. Having a terminal window open does not tell you which shell it is running.
What can you safely check first?
In a Bash session you know is local, type pwd to print the current directory. The command reports a path and leaves files unchanged. If you cannot confirm the session is local, write down the expected path on paper.
A tutorial may expect you to start in the project folder. Compare the path before running any later step. Avoid running an unfamiliar script to learn where you are.
What should you keep if a Bash script moves to another computer?
GNU Bash is free software. Keep your scripts and note the Bash version and any separate programs they use. Different shells can interpret the same text differently, so test the script with the shell it was written for.
Personal startup settings, such as aliases, can change what happens when a shell opens. Keep a separate note of any settings a project really needs and review it before copying it to another machine.
How can you practice reading a path without running a script?
Write two fictional paths and label which one belongs to the sample project. Use no file changes, connected host or saved script.
- Predict the outputWrite the path you expect pwd to report.
- Decide when to stopCircle the other path. Treat that output as a reason to check your folder before proceeding.