Ready for Linux

Switch with confidence

Lesson 7 of 8

Lesson 7 · Work faster

Let Tab finish the path

The shell completes different things depending on where you press Tab. At the start of a line it completes command names and can fall back to matching paths. After cd, ls, or cat it completes paths. Type the beginning of a unique name and press Tab—or use the on-screen Tab button on a phone. If several names match, Tab shows the choices. Linux names are case-sensitive, so D can match Documents but d cannot.

Examplecd Doc<Tab>

Type cd Doc and press your keyboard's Tab key or the on-screen Tab button. Because Documents is the only matching name, the terminal finishes the directory path.

Try it

Use Tab completion for each directory name as you enter projects/website, then confirm the location with pwd.

Lost? Run pwd to orient yourself. A bare cd returns home, and Restart lesson restores the starting location (~).

Your toolkit7 unlocked
pwdlscd..~catTabNew
practice terminal
Ready for Linux practice environment
Type help for commands. Tab completes commands and paths. For navigation, type cd plus the start of a directory name.

Complete the task, then check your work.