In simple terms, a command is an instruction (or a set of instructions) to be carried out by a computer.
Fundamental Unix utilities such as
ln, etc. are (usually) written in C and compiled to be stand-alone executable programs that don’t require an interpreter to be executed; they usually require certain library files to be installed on the system but that’s an answer for another question.
A script is a collection of commands and in fact, scripts themselves are considered to be a command.
A Perl script is a sequence of Perl statements and requires a
perl executable (stand-alone and compiled) program to interpret the Perl statements.
Sometimes large and complex interpretative scripts (in languages such as Perl, Python and Ruby) are also referred to as interpreted programs while the term script is reserved for shorter and simpler scripts.
A shell script is a sequence of other commands (any type of command) and it requires a Unix shell such as Bash to interpret the script. From the Bash man page:
Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file.
Shells usually have built-in commands which are neither stand-alone programs nor scripts. Instead, they are part of the shell itself and run directly by the shell.
cd is an example of such a built-in command.
Some times there are commands which exist as shell built-ins and as
stand-alone commands at the same time, e.g., the
$ type -a echo
echo is a shell builtin
echo is /usr/bin/echo
echo on its own executes the shell built-in while the stand-alone command can be executed by providing its full path.
Run built-in version of echo:
$ echo --version
$ /usr/bin/echo --version
echo (GNU coreutils) 8.23
Packaged by Cygwin (8.23-4)
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Note: The above specifics refer to a Unix environment but the same principles apply to a Windows environment.