Ad
Sponsored by Sir Tauqeer
CLICK HERE TO JOIN SIR TAUQUEER WHATSAPP GROUP
FOR PREPARATION CLASSES AND JOBS UPDATES
Join Now

Which Linux command changes file ownership?

A. chmod
B. chown
C. mkdir
D. rm
Correct Answer: B. chown

The correct answer is B: chown. The chown command in Linux and other Unix-like operating systems is specifically used to change the owner and/or the group owner of a file or directory. The name is an abbreviation for "change owner." This command is crucial for managing file system permissions and access control, ensuring that the correct users and groups have appropriate control over files and directories. For instance, an administrator might use chown user:group filename to assign ownership of a file to a specific user and group.

  • Option A: chmod is incorrect. The chmod command is used to change file permissions (read, write, execute) for the owner, group, and others, not the ownership itself. It modifies how users can interact with a file, but not who owns it.
  • Option C: mkdir is incorrect. The mkdir command stands for "make directory" and is used to create new directories or folders in the file system. It has no function related to changing file ownership.
  • Option D: rm is incorrect. The rm command stands for "remove" and is used to delete files or directories from the file system. It is a command for deletion, not for modifying ownership.

Leave a Comment

Join Our WhatsApp Channel ×
Scroll to Top