Aryan PrajapatKnowledge Contributor
How do you change the ownership of a file or directory in Linux using the chown command?
How do you change the ownership of a file or directory in Linux using the chown command?
In Linux, you can change the ownership of a file or directory using the chown command. The basic syntax is chown new_owner: new_group filename.
For example: If we want to change the ownership of a file to user “Jayesh” and group “users”.
chown jayesh:users file_name