useradd with specific uid and guid Nov 5, 2021 • ulysses Here’s the command to create a Linux user with a specific user id and group id. sudo groupadd -r -g 1234567 username sudo useradd -r -u 1234567 -g 1234567 -m -d /home/username -s /bin/bash nexus -c "my new account"