type command

You can use “type” or “whereis” command to find out which command shell executes and to print binary (command) file location for specified command. whereis command example Display ls command location along with man page path: whereis ls Output: ls: /bin/ls /usr/share/man/man1p/ls.1p.gz /usr/share/man/man1/ls.1.gz type command example Find out which command the shell executes: type -a […]

{ 4 comments }

This article was organically contributed by monk. HASH tables and PATH is not the first method locating your program / executable files. Your program can be a shell function or builtin command or an alias. Here is the complete sequence adopted by BASH shell to execute your command: Before a command is executed REDIRECTION is […]

{ 12 comments }

This article was organically contributed by monk. When you are logged in to a Linux server and you type a command. It is the responsibility of the shell to interpret your command. Here I will explain how BASH shell finds out which program to run. The method used by SHELL is straightforward but often creates […]

{ 7 comments }