Moving and Looking
Three commands do all of the navigating.
pwd prints where you are.
cd changes where you are.
ls lists what is around you.
That is genuinely the whole toolkit. Everything else in this course assumes you can move.
Useful forms of cd.
cd projects goes into a subdirectory.
cd .. goes up one level.
cd ../.. goes up two.
cd / goes to the root.
cd with no argument goes home, which is the fastest way out of anywhere confusing.
✦ ls -l is worth learning to read
The long listing shows permissions, size and name for each entry. The first character tells you the kind: d for a directory, a dash for an ordinary file. The next nine characters are the permission bits, which get a module of their own later. For now, notice that a directory announces itself as a directory, which saves you from trying to cat one.
Mark this lesson complete
Signed in, your progress follows you to every device.