linux add user with home directory code example
Example 1: how to make new user linux termil
sudo useradd -m username
#set user password
sudo passwd username
#add user to sudoers [DANGEROUS]
usermod -aG sudo username
Example 2: linux create user
sudo useradd username
Example 3: assign home directory to user linux
usermod -d /path/to/dir username
Example 4: linux create user with homedir
useradd -m $username
Example 5: how to create a username along with home directory in linux
useradd -m USERNAME