Which of the following getent invocations lists all existing users?
Which of the following getent invocations lists all existing users?
The correct getent invocation to list all existing users is 'getent passwd'. The 'passwd' database in getent contains entries of all the system users, providing necessary details such as username, password, user ID, group ID, user ID info, home directory, and the login shell. None of the other provided options (homes, uids, users, logins) correspond to a valid getent database.
Correct answer is C. All the other answers do not exist in the 'getent' command. Tested on Ubuntu 20.04. Getent allows the user to get entries from important text files called databases. It is a common way to look up user details on Linux. See here for more examples: https://www.geeksforgeeks.org/getent-command-in-linux-with-examples/
https://man.openbsd.org/getent.1
Correct answer is C. All the other answers do not exist in the 'getent' command. Tested on Ubuntu 20.04. Getent allows the user to get entries from important text files called databases. It is a common way to look up user details on Linux. See here for more examples: https://www.geeksforgeeks.org/getent-command-in-linux-with-examples/
C is correct