What is the difference between a Command Line Interface (CLI) and a Command Line Interpreter (CLI)? Are they synonyms? I know that a Command Line Interface allows us to interact through text-based commands entered via a terminal, but what is a Command Line Interpreter?
In practice, synonyms. The Command Line Interface is, in fact, an interpreter,
So, Command Line Interface (CLI) is the general idea of using text commands to interact with a computer and Command Line Interpreter is a specific program(Bash,etc) that understands and carries out those text commands. Am I Right?
What you are referencing as bash is actually called a shell. There are many shells like bash,zsh,dash,fish. You can put any of that shells in your CLI, terminal or whatever you want to call it, it’s the same thing.
When you are writting a shell script you usually see in the begining !#/bin/bash . This line is because you are saying that the shell to be use in the script is bash. Not all the shells supports the same functionalities. Bash for example have Bashism, which are no part of the Posix Complaint standard, which guarantees that you script would be able to run in any Unix family of systems (Linux,mac,bsd,etc now days). So have this always in mind because maybe you need the portability, or the commodity of using bash capabilities, like easy reading and some data structures if I’m not wrong they are not in default posix complaint scripts.
If you don’t mind the shell you are going to use, then use !#/bin/sh , this will use whatever the default shell the system have. And also will improve the speed of execution, bash is the slowest shell you could have in Linux, but usually is fine if you don’t need the execution to be fast.
Also there is a video free in the internet that you can check which is call AT&T Archive: The UNIX Operating System, where Ken Thompson and Brian Kernighan explain more in detail the difference between the shell, the CLI, and the core utils of Unix. I love that video so much, and I think is a excellent media to learn Unix/Linux in the beginning.
Hope this helps you, let me know if you find the video great or not if you watched