Types of commands in UNIX

Internal Commands:
These are shell built-ins, not stored as separate files.
The shell does not generate a process for these commands and executes them directly.
Examples: cd, echo

External Commands:
These are stored as files having an independent existence.
The shell creates a process for these commands
Examples: cat, ls

Shell Scripts:
The shell executes these scripts by spawning another shell.
The child shell becomes the parent of the commands that feature in the script.
The child shell executes the commands in the script
Examples: sh scriptname