• back — exit the current module
  • db_nmap $FLAGS $IP — run Nmap and dump the results into the Metasploit DB; all Nmap $FLAGS are supported and Metasploit will elevate privileges if necessary
  • help — get Metasploit help
  • history — display command history
  • hosts — display known hosts in DB
  • hosts -d — delete saved hosts from DB
  • info — show module information (including exploit target options)
  • jobs — check the status of background jobs
  • options (advanced) — show module/exploit options (or “advanced” options)
  • run/exploit — run the selected exploit
  • run -j — run the selected exploit as a background job
  • search — search modules; query to a particular type of module using the type: parameter (e.g., search type:exploit wordpress)
  • services — display services discovered in known hosts in DB
  • sessions — list open meterpreter sessions on a box
  • sessions -i $SESSION_NUMER — connect to meterpreter session $SESSION_NUMBER
  • show auxiliary — show auxiliary modules, filtered by relevancy if called from within a module
  • show exploits — show exploit modules
  • show options — show module options
  • show payloads — show payload modules, filtered by relevancy if called from within a module
  • spool — save all console output to a log file (useful for record-keeping)
  • use — select a Metasploit module/exploit
  • vulns — display vulnerabilities discovered in known hosts in DB
  • workspace — use workspaces; keeps database results isolated per engagement

Note that you can also call regular shell commands (ip, ls, etc.) from msfconsole. You can also background processes using Ctrl + Z (Metasploit will trap this, so you don’t have to worry about backgrounding the entire msfconsole).