Online Linux Terminal Logo
OnlineLinuxTerminal
Permissions & SecurityCLI Reference

$chown

Change file owner and group attributes.

Syntax DefinitionPOSIX standard
chown [OPTIONS] OWNER[:GROUP] FILE...
Linux Community2.4k Online

Chat with real Linux users, learn new commands & get free cheat sheet PDFs.

Try `chown` Live in Interactive Sandbox

Zero-install client simulation with real-time feedback.

Open in Fullscreen Workspace↗
bash — terminal

Overview & How chown Works

`chown` (Change Owner) alters the user ownership and group association of files, directories, and links. System administrators frequently use `chown` when deploying web applications or restoring user permissions after file migrations.

Common Flags & Command Options

Flag / OptionDescription
-RRecursively change ownership of directories and all contents.
-vVerbose output reporting every ownership change executed.
-cReport only when an actual change is made.

Practical Real-World Examples

Example #1Change owner of a file to user
chown user /var/log/syslog && ls -l /var/log/syslog

Assigns user ownership to the system syslog file and checks with ls.

Sample Output:
-rw-r--r-- 1 user root 2048 Aug 28 10:14 /var/log/syslog

Frequently Asked Questions

Can regular non-root users transfer file ownership with chown?

On most Linux systems, only the root superuser can transfer file ownership to another user for security isolation.