Change file owner -R means recursive
chown [ -R ] root.work test 将test 文件 改为 拥有者 root , 用户组 work。 chown [ -R ] work test 将test 文件 改为 拥有者 root
Change user group -R means recursive
chgrp nagios test 将test 文件 用户组 改为 nagios。
Change file attributes chmod
用数字修改 chmod 776 test 还有一种使用 符号类型改变文件权限 chmod u=rwx,g+r,o+x test u=rwx,g+r,o+x这一段文字之前不能有空格
Change password
The root user changes his password
passwd and then enter the password twice to change it.
root changes the password of other users
passwd fupeng Then enter the password twice to change fupeng’s password.
The above is the detailed content of What are the Linux user and user group commands?. For more information, please follow other related articles on the PHP Chinese website!