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
-
Open the terminal.
-
Run the following command (replace
usernamewith your actual username):grep username /etc/passwd -
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
-
Open the terminal.
-
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!
