The services command allows us to display the services running on the hosts. To view the help for the services command, we can use the -h option:
msf > services -hUsage: services [-h] [-u] [-a] [-r <proto>] [-p <port1,port2>] [-s <name1,name2>] [-o <filename>] [addr1 addr2 ...] -a,--add Add the services instead of searching -d,--delete Delete the services instead of searching -c <col1,col2> Only show the given columns -h,--help Show this help information -s <name1,name2> Search for a list of service names -p <port1,port2> Search for a list of ports -r <protocol> Only show [tcp|udp] services -u,--up Only show services which are up -o <file> Send output to a file in csv format -O <column> Order rows by specified ...