1. Which of the following characters in a shell prompt indicates the shell is running with root privileges?
Answer: B
The character that indicates the shell is running with root privileges is #.
In a shell prompt, the presence of the '#' character signifies that the shell is operating with root privileges, allowing the user to execute commands with administrative rights.
A) !
The '!' character is not indicative of root privileges in a shell prompt. It is often used for history expansion or as part of certain commands but does not signify administrative access.
B) #
The '#' character is the standard indicator of a root user in a shell prompt. When a user sees this character, it confirms that they are operating with elevated permissions, which is critical for executing system-level commands.
C) *
The '*' character is typically used as a wildcard in many command-line interfaces and does not relate to user privileges. It does not serve as an indicator of root access or any specific user status.
D) $
The '$' character is commonly used to represent a standard user prompt in Unix-like systems. It indicates that the user does not have root privileges and can only execute commands permitted for non-administrative users.
E) %
The '%' character is not universally recognized as an indicator of user privileges in shell prompts. It is sometimes used in specific contexts or shells but does not indicate administrative rights.
Conclusion
The '#' character is definitively the indicator of root privileges in a shell prompt, making option B the correct choice. All other options fail to represent administrative access, either serving different functions or indicating standard user access instead.