What are the Linux user and user group commands?

WBOY
Release: 2023-05-16 14:58:14
forward
1245 people have browsed it

Change file owner -R means recursive

chown [ -R ] root.work test
将test 文件 改为 拥有者 root , 用户组 work。

chown [ -R ] work test
将test 文件 改为 拥有者 root
Copy after login

Change user group -R means recursive

chgrp nagios test 
将test 文件 用户组 改为 nagios。
Copy after login

Change file attributes chmod

用数字修改 
chmod 776 test

还有一种使用 符号类型改变文件权限

chmod u=rwx,g+r,o+x test 
u=rwx,g+r,o+x这一段文字之前不能有空格
Copy after login

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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!