How to change home directory of a linux user

You can modify a user’s home directory using usermod command in Linux.

The syntax for the usermod command is

Example

I have a user “sok_user1” with home directory /home/sok_user1

To change the users home directory to /var/www/, we can use the command

Example

Back to Linux User

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *