Complete the command to list all users on a Linux system.
cat /etc/[1]The /etc/passwd file contains user account information, so listing it shows all users.
Complete the command to add a new user named 'alice'.
sudo [1] aliceThe useradd command creates a new user account.
Fix the error in the command to change user 'bob' password.
sudo [1] bobThe passwd command is used to change a user's password.
Fill both blanks to create a user 'charlie' with a home directory and default shell /bin/bash.
sudo [1] -m -s [2] charlie
useradd creates the user, -m makes a home directory, and -s /bin/bash sets the shell.
Fill all three blanks to list all users with UID greater than 1000 from /etc/passwd.
awk -F: '{{ if ($3 [1] [2]) print $1 }}' /etc/[3]
This command uses awk to print usernames where UID (field 3) is greater than 1000 from /etc/passwd.
