Modify the user's home directory in Linux (solve the problem of abnormal bash environment after modifying the user's home directory)

Purpose: Change the home directory of the cib user from /home/cib to /cib 

1. The current home directory of the cib user is /home/cib 

2. Modify the home directory in the /etc/passwd file to /cib through the root user 

  

3. Switch to cib user and find that the bash environment is abnormal. 

4. Copy the 4 hidden files in the original directory /home/cib to the /cib directory

 5. Log in again as cib user after exiting and find that the bash environment is normal.

 

 

Guess you like

Origin blog.csdn.net/f746262041/article/details/127992255