Introduction to Tools and Techniques in Computer Science

Tab completion

Franklin Bristow

Tab completion

  • Complete commands and filenames with tab completion.

Interacting with the command line requires a lot of typing (you can keep clicking on the terminal window, but seriously, nothing’s going to happen).

Here’s a little tip to save you (some) typing: You can use the Tab key on your keyboard to complete a command or filename when you are typing.

Change back to your home directory (~), then start changing into the hello directory, but before you finish typing hello, press the Tab key on your keyboard.

[you@bird somewhere]> cd ~
[you@bird ~]> cd he#TAB

Your shell (the thing you’re typing commands into) will try to automatically complete the name of the file. Neat 📸!