Online Linux Terminal Logo
OnlineLinuxTerminal
Permissions et sécuritéCLI Manual

$chown

Change file owner and group attributes.

Syntaxe de la commandePOSIX Standard
chown [OPTIONS] OWNER[:GROUP] FILE...
Communauté Linux2.4k En ligne

Échangez avec des utilisateurs Linux, apprenez des commandes et téléchargez des PDF.

Essayer en direct dans le bac à sable interactif

Simulation côté client sans installation avec retour instantané.

Ouvrir dans le terminal plein écran ↗
bash — terminal

Aperçu et fonctionnement

`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.

Options et drapeaux courants

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.

Exemples pratiques du monde réel

#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.