0
0
Linux CLIscripting~20 mins

ping for connectivity testing in Linux CLI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Ping Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
What is the output of this ping command?
You run the command ping -c 3 8.8.8.8 on a Linux terminal. What will the output show?
Linux CLI
ping -c 3 8.8.8.8
AIt sends 3 ping requests to 8.8.8.8 and shows 3 replies with round-trip times.
BIt sends continuous ping requests until stopped manually.
CIt shows an error because the -c option is invalid.
DIt sends 3 ping requests but does not show any reply output.
Attempts:
2 left
💡 Hint
The -c option limits the number of ping requests sent.
💻 Command Output
intermediate
1:30remaining
What error does this ping command produce?
What error message appears when running ping -c three 8.8.8.8?
Linux CLI
ping -c three 8.8.8.8
Aping: invalid count of packets: 'three'
Bping: unknown host three
Cping: option requires an argument -- 'c'
DNo error, it sends 3 packets anyway.
Attempts:
2 left
💡 Hint
The -c option expects a number, not a word.
📝 Syntax
advanced
1:30remaining
Which ping command syntax correctly sends 5 packets to example.com?
Choose the correct ping command to send exactly 5 packets to example.com.
Aping example.com -count 5
Bping -c 5 example.com
Cping -count=5 example.com
Dping -n 5 example.com
Attempts:
2 left
💡 Hint
The standard option to specify count is -c followed by a number.
🚀 Application
advanced
2:00remaining
How to automate ping to check connectivity every 10 seconds for 1 minute?
You want to check if google.com is reachable every 10 seconds for 1 minute using ping. Which command achieves this?
Aping -w 60 -i 10 google.com
Bping -c 6 -i 1 google.com
Cping -i 10 -c 6 google.com
Dping -c 60 -i 10 google.com
Attempts:
2 left
💡 Hint
The -i option sets interval between packets, -c sets count.
🧠 Conceptual
expert
1:30remaining
What does the ping command's exit status indicate?
After running a ping command, what does an exit status of 0 mean?
ANo replies were received; the host is unreachable.
BThe ping command was interrupted by the user.
CThe ping command failed due to invalid arguments.
DAt least one reply was received from the target host.
Attempts:
2 left
💡 Hint
Exit status 0 usually means success in Linux commands.