In Kali Linux, we have to set up a database before we can use the database functionality.
Setting up a database in Metasploit
How to do it...
Let's perform the following steps:
- Start the postgresql server using the following command:
service postgresql start
- Create the database and initialize it:
msfdb init
- Load the msfconsole. Now, we can create and manage workspaces in Metasploit. A workspace is a place where we can save all our Metasploit data in categories. To set up a new workspace, use the following command:
workspace -a <workspacename>
The following screenshot shows the output of the preceding command:
![](https://static.packt-cdn.com/products/9781789952308/graphics/assets/1b76b563-d2c1-470e-a88a-33630dd2662b.png)
- To see all the commands related to the workspace, use the following command:
workspace -h
- ...