How to verify home directory change?

QuestionsQuestions8 SkillsProBasic Files OperationsSep, 28 2025
089

To verify the change of a user's home directory in Linux, you can use the grep command to check the /etc/passwd file. Here’s how you can do it:

sudo grep -w 'username' /etc/passwd

Replace username with the name of the user whose home directory you want to verify. For example, to verify the home directory of a user named "joker", you would run:

sudo grep -w 'joker' /etc/passwd

The output will show the user's information, including the home directory. You should see the updated home directory in the output.

0 Comments

no data
Be the first to share your comment!