What is the purpose of the -d option?

QuestionsQuestions8 SkillsProUser Account ManagementSep, 21 2025
089

The -d option in the usermod command is used to specify a new home directory for a user account. When you use -d, you are indicating the path to the directory that should be set as the user's home directory.

For example, in the command sudo usermod -d /home/wayne joker, the -d /home/wayne part tells the system to change the home directory of the user joker to /home/wayne.

This is useful for organizing user files or when a user needs to have their home directory moved to a different location. If you have more questions, feel free to ask!

0 Comments

no data
Be the first to share your comment!