Complete the code to display the current logged-in username.
[1]The whoami command shows the current logged-in username.
Complete the code to display the user ID and group ID of the current user.
[1]The id command shows user ID (UID), group ID (GID), and groups of the current user.
Fix the error in the command to show only the user ID number.
id [1]The -u option with id shows only the user ID number.
Fill both blanks to display the primary group name of the current user.
id [1] [2]
-G which shows all group IDs, not primary group.Combining -n and -g shows only the primary group name.
Fill all three blanks to create a dictionary in Python showing username and user ID using shell commands.
user_info = { [1]: "$(whoami)", [2]: "$(id [3])" }"gid" instead of "uid" for user ID.This creates a Python dictionary with keys username and uid. The -u option gets the user ID number.
