Q:

Please help me understand useradd example's syntax

I've been doing some research on how to add a user to the system so as to have a new ftp user and one of the examples I ran across was this:
useradd -m -G users,ftp,wheel joe -s /bin/bash
passwd joe
chown -R joe /var/www/
I'm new to Linux and I don't understand what is being done here after each of the initial commands (useradd, chown). Can someone please enlighten me or provide a resource where I can learn - I'm having trouble finding anything useful when I search "linux minus sign commands".
Sidenote: In my search for answers, I typed tried to find a manual on these minus commands by trying man -d. Did I break something?

A:

For starters, from your command line type man COMMAND so man useradd etc.
That will display the manual for each command.
There are ways more simple than your example above such as:
useradd -m tommy creates the user tommy and a group tommy as well.
Then:
usermod -a G users,wheel,ftp tommy adds the user tommy to the groups "users, wheel, and ftp"
passwd tommy allows you to change the password for the user account tommy
chown -R tommy /var/www recursively changes ownership of the /var/www directory to make tommy the owner.  Though becareful because normally the apache user should have ownership of the /var/www directory.

