Let’s quickly install wp cli on Debian based Linux distro called Linuxmint. I assume that you have already installed WordPress with PHP, MySQL and web-server (apache2 or other).
PHP, Apache2, and MySQL Version
This is how you check versoins of apache2, php, and mysql installed on my Linuxmint desktop.
WordPress for wp-cli
I have installed WordPress 5.9.1 on my Linuxmint desktop
Install WP-CLI on Linuxmint
You can follow these steps to install wp-cli on any Debian based distro like Ubuntu, Debian, Linuxmint.
I also assume that you have installed curl or wget.
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp --info
Now you should get in return
Update WP-CLI
sudo wp cli update