Linux chown command


  Translation results:

chown

Linux chown commandsyntax

Function: Use chown to change the owner of the specified file to the specified user or group. The user can be the user name or user ID; the group can be the group name or group ID; the files are separated by spaces. The list of files whose permissions are to be changed supports wildcard characters. .

Permissions: root

Syntax: chown [-cfhvR] [--help] [--version] user[:group] file ...

Linux chown commandexample

Set the owner of the file file1.txt to the user jessie of the users group:

chown users:jessie file1.txt

Set the owners of all files and subdirectories in the current directory to the users of the users group lamport:

chown -R lamport:users *

Home

Videos

Q&A