Insights For Success

Strategy, Innovation, Leadership and Security

command

Tab complete on Linux

GeneralEdward Kiledjian

NOTE: Sorry if this is a more technical article and not for general consumption.

Tab complete is the magic wand of any Linux magician and I am surprised every time I see users ignoring it.

Shorthand for system commands

Let’s say I want to type ifconfig, if I enter ifc and then press the TAB button, Linux will autocomplete the rest of the command for me

This trick can work for any app or command. If I want to start firefox, I just have to enter fire (since there is no Linux command that starts with fire) the system will autocomplete to Firefox.

Find command syntax

It can be useful to complete system commands by tapping TAB twice. As an example, if I write SUDO APT- and press tab twice it will list all the possible commands starting with APT.

Autocomplete file name

Let’s say you have a long file name like thisIsALongFileNameThatwouldBeDifficultToType565464654.txt and obviously want to save time, you just have to enter rnough text to make the file unique identifiable (e.g. thisI) and then pressing tab will autocomplete the rest for you. In this casem if I want to display the contents of the text file, I could enter

cat this [then press tab]

the system will autocomplete it for me.