Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to add a new user named 'alice'.
Linux CLI
sudo [1] alice Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'userdel' instead of 'useradd'.
Using 'passwd' which changes passwords, not adds users.
✗ Incorrect
The 'useradd' command is used to add a new user in Linux.
2fill in blank
mediumComplete the command to delete a user named 'bob'.
Linux CLI
sudo [1] bob Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'useradd' instead of 'userdel'.
Using 'groupdel' which deletes groups, not users.
✗ Incorrect
The 'userdel' command deletes a user from the system.
3fill in blank
hardFix the error in the command to add a user with a home directory.
Linux CLI
sudo useradd [1] alice Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-d' which sets a custom home directory path but does not create it.
Using '-r' which creates a system user, not a regular user.
✗ Incorrect
The '-m' option creates a home directory for the new user.
4fill in blank
hardFill both blanks to delete user 'charlie' and remove their home directory.
Linux CLI
sudo [1] [2] charlie
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'useradd' instead of 'userdel'.
Using '-m' which creates a home directory, not removes it.
✗ Incorrect
The 'userdel' command deletes the user, and '-r' removes the home directory.
5fill in blank
hardFill all three blanks to add a user 'dave' with a home directory and set their shell to /bin/bash.
Linux CLI
sudo [1] [2] [3] dave
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-r' which creates a system user, not a regular user.
Putting options in the wrong order or missing the shell option.
✗ Incorrect
Use 'useradd' command with '-m' to create home directory and '-s' to set shell.