chown
FilesFundamentals In simulator In real LinuxChange file owner and group
Name: chown = change owner
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
chown changes a file's owner, and with user:group its group too. For security, ordinary users can't give files away, so it usually needs sudo. -R works recursively.
Syntax
chown [OPTION]... OWNER[:GROUP] FILE...Common options
| user:group | Set owner and group together |
| -R / --recursive | Operate recursively |
| -h / --no-dereference | Change the symbolic link itself, not what it points to |
| -v / --verbose | Print a line for every file processed |
| -c / --changes | Print only the files that actually changed |
| --from OWNER:GROUP | Change only files now owned by OWNER:GROUP |
| --reference FILE | Use FILE’s owner and group |