You have to select the correct exploit for the target system:
View the whole list with:Usage: ./msfpayload <payload> [var=val] <S[ummary]|C|P[erl]|[Rub]y|R[aw]|J[avascript]|e[X]ecutable|[V]BA>
example:Code:./msfpayload | less
Syn: Metasploit Payloads - msfpayloadCode:./msfpayload linux/x86/adduser X > adduser && chmod +x adduser
The link just deals with .exe's but i guess it works with all OS's. If you find some good sites please post the links back here.