'Precise definition of the language the command line accepts

I understand and am reasonably familiar with the command line. But I would like to clarify my understanding.

Suppose I have a bash default shell. Many of the commands my command line recognises are linux commands (ls, cd, etc.)

It also accepts commands that are not linux commands (brew, git, etc.). Such commands require an installation of software before being callable.

So how exactly can we describe the command language that the command line accepts. Is it just valid bash commands plus some commands specific to downloaded software? And how does it know to recognise those commands?

EDIT

The following is also instructive and a bit more specific.

Say I'm using the default MacOS Terminal, and I type 'bash<Enter>'. My prompt changes from the default prompt, to 'bash-3.2$' (I think this means I am now in a bash shell).

Typing commands at the 'bash-3.2$' prompt, all the commands I could type on my default command line seem to be working.

Typing 'exit' I return to the default prompt.

So would there ever be a reason to type 'bash<Enter>' at my default prompt? It seems as though it provides the same functionality? If that is the case, why doesn't typing 'bash<Enter>' just return me back to the default prompt?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source