Linux Path Completion

Every operating system has some features which make them special. The Linux operating system primarily works on the command line interface, and we do have many features for this CLI. But, one of the most used features is called "auto path completion."

This feature is initiated with the help of the "tab" key, and it is used to speed up the typing of CLI. To use this feature, you have to type a few letters of the path or command you want to use and then press the "tab" key. Either your path or command will be auto-completed, or you will get some suggestions of various commands that start with the same letters.

Linux Path Completion

In the above screenshot, we typed "cd" and pressed the "tab" key. The "tab" key returns various commands that start with the "cd." The below screenshots are the example for suggestions and auto-completion of the path. The first screenshot shows that it will print them on the screen when there is more than one available path. In the second screenshot, when there was only one path available, it auto-completed. We typed "cd Pi" and then pressed the "tab" key, and it automatically gets completed.

Linux Path Completion Linux Path Completion

In case of any wrong input, you will not get the suggestion or auto-completion on pressing the "tab" key.