Your answer:
ls -lha
Correct answer:
ls -lah
Oh dear. Your answer:
ls -lha
Correct answer:
ls -lah
Oh dear.Also:
Questions repeated multiple time within single session.
Question: Write the command that clears the terminal
command line screen and shows it as new
Your answer:
reset
Correct answer:
clear
"Clear" will not fix terminal in some cases. Maybe do not ask for "and shows it as new" and note you only want to remove current text? Question: Write the command that you use
to move into your home directory '~'
Your answer:
cd
Correct answer:
cd ~Your answer: dev
Correct answer: /dev
Edit: Also
Question: Write the command that shows a text 'hello world' in the console without moving to a new line after executing the command
Your answer: printf '%s' 'hello world'
Correct answer: echo -n 'hello world'
Your answer: less test.txt
Correct answer: less text.txt
Also
Question: Write the command that you use if you finish working with the terminal and you want to log out from the current session.
Your answer:logout
Correct answer:exit
Clearly the correct way to implement this is to run each command in a short-lived container and check the output matches what's expected. For things like the pager questions, it'll need to implement a full vte and vte comparison, so that should be fun.
For bonus points, one of the options to emulate linux in the browser could be used to do that more securely and without the need for a service... though the load time might increase by several minutes or hours.
I'm not sure it is clearly correct. Some commands don't produce output, `mkdir` and `cd` for example (the first two in the animation). Furthermore they'd have to blacklist `echo` and other ways to produce the output against the spirit of the exercise... until an answer is, say, `echo $?` - at which point you'd require a preceding command exiting in a suitable way in order to keep the "just execute it" approach workable.
Just a few seconds on my humble E480 using Firefox: https://bellard.org/jslinux/vm.html?url=https://bellard.org/...
Question: Write the command that clears the terminal-command line screen and shows it as new Your answer:Clear Correct answer:clear