Linux common commands-46: chown

The chown command is used to change the user and user group to which a file or folder belongs. Only super administrators have permission to execute it.

Syntax format: chown [parameter]

Common parameters:


 # 将test.py文件的用户组和用户都改为xugaoxiang,冒号前的是用户,冒号后的是用户组,很多时候它们的名称是一样的chown xugaoxiang:xugaoxiang # 递归修改文件夹chown -R root:root test

This article is reprinted from
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment

Your email address will not be published.