For the scope of this book, we will be installing the Metasploit Framework on Ubuntu (Debian based) system. Before we begin the installation, we first need to download the latest installer. This can be done using wget command as follows.
https://subscription.packtpub.com/book/networking_and_servers/9781788295970/2/ch02lvl1sec21/installing-metasploit-on-linux

source