-
How to add and delete group in Linuxlinux 2023. 2. 21. 10:34
In Linux, there are several categories of users that determine the permissions and access levels of files and directories. Below is an option table for some common commands related to file ownership and permissions and some simple examples:
CommandDescriptionExample
chown Changes the ownership of a file or directory sudo chown john file.txt (changes the owner of "file.txt" to user "john") chgrp Changes the group ownership of a file or directory sudo chgrp developers file.txt (changes the group owner of "file.txt" to group "developers") chmod Changes the permissions of a file or directory sudo chmod 644 file.txt (sets the permissions of "file.txt" to read-write for owner, read-only for group and others) umask Sets the default file permissions for new files and directories umask 022 (sets the default permissions for new files to read-write for owner, read-only for group and others) sudo Executes a command with root user privileges sudo apt-get update (updates the package manager with root user privileges) In Linux, the root user is the superuser with full privileges and access to all system resources.
'linux' 카테고리의 다른 글
user security files in Linux (0) 2023.02.21 How to change owner and owner group in Linux (0) 2023.02.21 How to add and delete user in Linux (0) 2023.02.21 How to search file in Linux (0) 2023.02.21 File permissions in Linux (0) 2023.02.21