Forrest logo
back to context overview

useradd

List of commands for useradd:

  • useradd:tldr:3ff7a useradd: Create a new user with the specified user id.
    $ sudo useradd --uid ${id} ${username}
    try on your machine
    explain this command
  • useradd:tldr:5c99f useradd: Create a new user with the home directory filled by template directory files.
    $ sudo useradd --skel ${path-to-template_directory} --create-home ${username}
    try on your machine
    explain this command
  • useradd:tldr:5db97 useradd: Create a new user with the specified shell.
    $ sudo useradd --shell ${path-to-shell} ${username}
    try on your machine
    explain this command
  • useradd:tldr:6f755 useradd: Create a new system user without the home directory.
    $ sudo useradd --system ${username}
    try on your machine
    explain this command
  • useradd:tldr:7d55d useradd: Create a new user.
    $ sudo useradd ${username}
    try on your machine
    explain this command
  • useradd:tldr:90d53 useradd: Create a new user with the default home directory.
    $ sudo useradd --create-home ${username}
    try on your machine
    explain this command
  • useradd:tldr:f7ef3 useradd: Create a new user belonging to additional groups (mind the lack of whitespace).
    $ sudo useradd --groups ${group1,group2,---} ${username}
    try on your machine
    explain this command
back to context overview