Things You'll Need:
- Linux
- BASH
-
Step 1
Create aliases for commands in order to make the "type" command useful. For example, you may want to shorten a string like ls -F to simply ls. Typing alias ls='ls -F' would make the standard ls command behave as the ls -F command instead. In general, creating aliases reduces the amount of time it takes to enter commands, and incorporates your own personal preferences.
-
Step 2
Use a text editor to create a BASH file containing all of your aliases. Name the file .bash_aliases, and it will run when Linux boots. Creating your list of aliases in this way makes it so you don't have to enter them line by line in the BASH console.
-
Step 3
Type "type [-atp] [name ...]" at the BASH prompt to use the "type" command. This will return the current value for the [name ...] you indicate, as well as adjust the output according to the parameters you include. For example, if you were to type "type ls" then you would receive "ls -F" as a return.
-
Step 4
Include the command line switches "-a," "-t" or "-p" to change the parameters of the type command at the time of use. Using "-a" will display a list of all executables with the file name.
-
Step 5
Note what each command line parameter's function is. Using "-t" will display a single word relating to the actual type of the command you wish to describe (alias, function, builtin, keyword or file). Using "-p" will display the name of the file used with the "type" command.








