What is Superuser?

On Linux and similar systems, the administrator account that can operate everything on the system, essentially without the restrictions of file permissions. Its name is root and its user ID (UID) is 0. A mistaken operation can break the whole system, and the damage is greater if it is taken over, so it is common to work as an ordinary user and run only the necessary commands with root privileges through sudo. The shell prompt is often shown as # instead of $ when working as root.

Japanese name: スーパーユーザ

Superuser appears in 2 practice questions across 1 topic, including Linux and Command-Line Basics.

Field: Linux and Command-Line Basics

Try it: questions about Superuser

The directory d has permissions rwx--x--x (711), and the file f.txt in it has rw-r--r-- (644). A user who is neither the owner nor the superuser runs "ls d" and "cat d/f.txt". Which of the following is the result?

  1. Als d shows the listing, but cat d/f.txt is not permitted because the directory permissions are insufficient
  2. BNeither ls d nor cat d/f.txt is permitted
  3. Cls d is not permitted, but cat d/f.txt shows the contents
Show answer and explanation

Answer: C. ls d is not permitted, but cat d/f.txt shows the contents

For a directory, r is permission to read the list of names in it, and x is permission to enter it and reach a file by name. Others have only x, so ls d gives "Permission denied", but d/f.txt, whose name is known, can be reached. f.txt itself grants r to others, so cat can show its contents. Conversely, in a directory with r but no x, the names can be listed but the files in it cannot be opened.

Superuser in the explanations

Questions that mention Superuser (2)

  1. The directory d has permissions rwx--x--x (711), and the file f.txt in it has rw-r--r-- (644). A user who is neither the owner nor the superuser runs "ls d" and "cat d/f.txt". Which of the following is the result?
  2. Which of the following correctly describes the sudo command on Linux?

Books on Linux and Command-Line Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

File permissions Principle of least privilege cron Environment variable Git grep Hard link I/O redirection inode Pipe (|)

Back to the glossary