How to verify the change?

QuestionsQuestions8 SkillsProBasic Files OperationsDec, 08 2025
061

To verify the change of your home directory, you can check the /etc/passwd file or use the echo command. Here are two methods:

Method 1: Check /etc/passwd

  1. Open the terminal.

  2. Run the following command (replace username with your actual username):

    grep username /etc/passwd
  3. Look for the line that starts with your username. The last field in that line will show your current home directory.

Method 2: Use echo

  1. Open the terminal.

  2. Run the following command:

    echo $HOME

This will print the current home directory for your session. If it matches the new directory you set, the change was successful.

If you have any further questions, feel free to ask!

0 Comments

no data
Be the first to share your comment!