What is the correct command to create a Unix user?

Write a command to create a user called ‘test’ where the home directory for user is /home/test01.

[root@test ~] cd /home
mkdir test01
useradd test

I this correct?

You can use the -m flag to create the home directory:

useradd -m test

Also, try man useradd to see what other options are available, or check out one of the many guides available online:

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.