Paths, parents and names with spaces
Name a file from where you are, from the root, and when the name itself contains a space.
Absolute means from the root
A path that starts with / is the same no matter which directory you are in. Your practice home is /home/learner, and the project files live in /home/learner/projects.
cat /home/learner/projects/readme.txtRelative means from here
A path with no leading / starts at the working directory. .. is the parent. From projects, ../welcome.txt is the welcome file in your home directory.
cat ../welcome.txtMove up one level
cd .. changes into the parent directory. From projects, that parent is your home directory. cd ~ and cd /home/learner reach the same place by other names.
cd ..Quote a space
The shell splits arguments on spaces. Quotes keep release notes.txt as one filename. The quotes are not part of the name.
cat "release notes.txt"Make it stick.
Try the matching guided exercise in your browser. The first 10 exercises are free; later exercises require a plan.
Practice this skill →