Sitemap

Linux user creation advanced

Apr 21, 2023

--

Linux User Creation

To add a user to linux use the below command

→ $ useradd username

ex: useradd rao

To add password to the user

→ $ passwd username

ex: passwd rao

To check the user got created

→ $ cat /etc/passwd or tail -1 /etc/passwd

Get Udayachanta’s stories in your inbox

Join Medium for free to get updates from this writer.

To create a user with a home directory

→ $ useradd lakshmi

To check home directory created

— . $ ll /home | grep lakshmi

To create a user with different home directory

→ $ useradd -m -d /ram ram

To check a user with different home directory created

→ $ ll / | grep ram

--

--

Udayachanta
Udayachanta

Written by Udayachanta

Mechanical ⚙️Engineer by graduation👨🏻‍🎓, Software Engineer👨🏻‍💻 by profession and photographer📸 by birth