What are these commands and what's the difference between them?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
To answer your first question directly, these are command-line tools that allow you to have a high degree of control over a properly-configured Bluetooth radio. With these commands you can scan, pair, disconnect, and interact with external Bluetooth devices. As for the differences, the answer could be a blog post in and of itself, but let's keep it simple.
btmgmt is a command-line version of the BlueZ Bluetooth utility. BlueZ is part of the official Linux Bluetooth stack and provides support for the core layers and protocols of the specification. There is also a snap version of BlueZ, but it does not appear to be very popular at the moment.
bluetoothctl is also a command-line tool to control Bluetooth radios, but originated as part of the Debian project; which Ubuntu is based on. Like
btmgmt, this tool works with the core layers and protocols of the Bluetooth specification.
Is one better than the other? They each certainly have their strengths and weaknesses, but it really comes down to personal preference and familiarity.