First of all, Android since Marshmallow doesn't come with adb binary (client) anymore, but only with adbd (server), for communication with an adb client on Desktop.
In a nutshell, this is how the communication takes place:
- your Android device has adbd, a daemon, which is started during boot process, and listens on USB by-default for communication from desktop clients;
- your adb tool in your desktop acts as a client and sends request to adbd on your Android, and you get to run adb commands successfully subjected to fulfilment of certain conditions.
If there are compatibility concerns, they would arise if adbd is depreciated or adb client on your desktop is. To see the versions, run:
adb version // to check adb client version in your desktop adb shell adbd --version // to check adbd's version in your Android. Please note that some users reported error with this if executed without root access.
You shouldn't be worried about adbd's version but only with adb client version in your Desktop since official adb client is backward compatible.
Now to the localized issues you ended up with.
You incorrectly executed the commands. Nowhere the linked answer instructed to execute
adb shell version. The correct procedure is:
adb version // adb version (client) on your Desktop adb shell // launches shell on your Android device through adb client on Desktop adb version // the version of adb (client) binary that used to come with Android prior to Marshmallow.
The last two commands have no relevancy to your question since they intend to ascertain the version of the adb client in your Android. As I explained in the beginning, it is adbd (server) alone which communicates from Android device's end, not the adb binary in the Android. That binary in Android can be used, if available, to talk to other Android devices (USB-OTG, WiFi, etc.) or to the same device if adbd (server) is listening on network too.
Also, when you ran
adb shell version, it meant: launch a shell on Android and execute the command
version. There is nothing named
version which is to be executed, hence, you got the error.