Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to run apt update with elevated privileges.
Linux CLI
sudo [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Putting
update before apt.Using a hyphen in
apt-update.Omitting the package manager command.
✗ Incorrect
The correct command is
sudo apt update to run the update with elevated privileges.2fill in blank
mediumComplete the command to edit the /etc/hosts file with elevated privileges using nano editor.
Linux CLI
sudo [1] /etc/hosts Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
edit which is not a valid command.Using
open which is not a terminal editor.Using
vi if unfamiliar with it.✗ Incorrect
Use
sudo nano /etc/hosts to edit the hosts file with administrator rights using the nano editor.3fill in blank
hardFix the error in the command to list files in /root directory with elevated privileges.
Linux CLI
sudo ls [1] /root Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using only
-l or -a alone.Using
-al which also works but is not the expected answer here.Omitting options.
✗ Incorrect
The correct option is
-la to list all files with details. It combines -l and -a options.4fill in blank
hardFill both blanks to create a command that installs curl package using apt with elevated privileges and automatically confirms prompts.
Linux CLI
sudo apt [1] curl [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
remove instead of install.Omitting the
-y flag and getting stuck on prompts.Using
-f which forces fix but is not for confirmation.✗ Incorrect
Use
install to add the package and -y to auto-confirm prompts.5fill in blank
hardFill all three blanks to create a command that shows the last 10 lines of /var/log/syslog file with elevated privileges and continuously updates the output.
Linux CLI
sudo [1] [2] /var/log/syslog [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
head instead of tail.Omitting
-f and missing live updates.Using wrong order of options.
✗ Incorrect
Use
tail to view the end of the file, -n 10 to show last 10 lines, and -f to follow updates.