
CompTIALinux+
Domain 4Objective 2
Shell Scripting XK0-006 Practice Questions (Page 3)
Part of the Automation, Orchestration, and Scripting domain, which accounts for 17% of the XK0-006 exam. CompTIA does not publish an official question count, but from its 90-minute exam (~35–60 total, ~6–10 in this domain), expect 1–2 from this objective — we provide 18 practice questions to prepare you well beyond it. (estimate)
18questions here
4free pages
10concepts
17%of the exam
Questions 11–15
- 11
What is the output of the command `echo $((10 / 3))` in Bash?
Select an answer first - 12
A script defines a function that prints a greeting. The function should accept a name as an argument and print "Hello, <name>!". Which function definition correctly implements this?
Select an answer first - 13
What is the output of the following command? `echo "${var:-default}"` when the variable 'var' is unset?
Select an answer first - 14
A shell script contains the line: `my_var=42`. Which statement about this line is correct?
Select an answer first - 15
Which command is used to exit a script immediately with a specific exit status?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by CompTIA. “XK0-006” is a trademark of its owner, used for identification only.