How do you generate a qr code for a new address and check for incoming payments from the command line? Which one do you recommend for this

Command line to generate QR-Code + address for requesting money
Command line to check if the above has been received

I don't want to install too many versions of Bitcoin wallets on my machine so I thought I'd come here asking for some guidance first
Using Ubuntu 16.04
Using Bitcoin Core, I would combine getnewaddress, qrencode, and listtransactions.
&gt; bitcoin-cli getnewaddress ( &quot;label&quot; &quot;address_type&quot; )

Allows you to generate a new invoice address and label it to identify the current purchasing process. It returns a string with the newly generated address which you can then decorate according to the BIP21 URI scheme to allow operating systems to recognize it as a Bitcoin address, and output that the resulting string using a quick response code tool such as qrencode.
Finally, you would poll your wallet for new transactions using
&gt; bitcoin-cli listtransactions ( &quot;label&quot; count skip include_watchonly )

which will give you recent transactions relevant to the wallet, or alternatively allows you to specifically filter by the label you previously attached in getnewaddress. The rpc descriptions I linked are for Bitcoin Core 0.21.0, but older docs are available through the same site.
Note that versions preceding Bitcoin Core 0.17.0 (released in October 2018) are past their End of Life date in their maintenance cycle. I would emphatically recommend using a newer version of Bitcoin than what may have shipped with Ubuntu 16.04.