1. 创建 文件 /myfile1.txt2. 为其他用户和同组用户增加读的权限3. 为其他用户和同组用户删除读的权限修改所有者4. 添加用户 user15. 为文件 /myfile1.txt 修改所有者 为 user16. 添加组students7. 为文件 /myfile1.txt 修改组 为 students 修改默认权限8. 创建文件 myfile2.txt 9. 修改默认权限为 所有者可读、写,同组用户只读,其它用户只写!10. 创建文件查看权限变化1. 创建用户John ,密码benet
时间: 2024-02-20 07:57:44 浏览: 225
好的,让我来回答你的问题:
1. 你想问如何在 Linux 系统中创建一个名为 "myfile1.txt" 的文件吗?如果是的话,可以使用命令 "touch myfile1.txt" 创建一个空文件。
2. 要为其他用户和同组用户增加读取权限,可以使用命令 "chmod o+r,g+r myfile1.txt"。
3. 要为其他用户和同组用户删除读取权限,可以使用命令 "chmod o-r,g-r myfile1.txt"。
4. 要添加用户 "user1",可以使用命令 "useradd user1"。
5. 要为文件 "myfile1.txt" 修改所有者为 "user1",可以使用命令 "chown user1 myfile1.txt"。
6. 要添加组 "students",可以使用命令 "groupadd students"。
7. 要为文件 "myfile1.txt" 修改组为 "students",可以使用命令 "chgrp students myfile1.txt",要修改默认权限可以使用命令 "chmod g+s myfile1.txt"。
8. 要创建文件 "myfile2.txt",可以使用命令 "touch myfile2.txt"。
9. 要修改文件 "myfile2.txt" 的默认权限为所属用户可读写,同组用户只读,其他用户只写,可以使用命令 "chmod 640 myfile2.txt"。
10. 要创建文件并查看权限变化,可以使用以下命令:
```
touch myfile3.txt
ls -l myfile3.txt
```
最后,要创建用户 "John",可以使用命令 "useradd John",并使用命令 "passwd John" 为其设置密码。
阅读全文
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![doc](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231044937.png)
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231044937.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)