DEV Community


Posted on

Creating Linux user without home directory

To create a linux user without home directory:

sudo useradd --no-create-home john
sudo useradd -M john

sudo: Grants administrative privileges.
useradd: Adds a new user
-M or --no-create-home: Skips creating a home directory for the new user.
john: Creates a new user named john.
Enter fullscreen mode Exit fullscreen mode

Reference URL:

Top comments (0)