useradd (add accounts)

Creates new user account. Also used to change account information.

Format:    useradd user
Examples:  useradd janet2
OptWhat It DoesExamples
-g groupSet group owner to groupuseradd -g janet2 janet2
-G groupsAdd user to additional groupsuseradd -G sales janet2
-DDisplay defaultsuseradd -D janet
-MDo not create a home directoryuseradd -M specacct

Get Spring Into Linux® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.