DCOM 142 FINAL EXAM (Actual 2025) QUESTIONS &
ANSWERS (VERIFIED)
The apt command comes with several subcommands for
managing packages. Which one of these are subcommands for
the apt command? (Select all that apply) -
<<<Answers>>>remove {package name}
upgrade {package name}
purge {package name}
CentOS using the dpkg package manager. -
<<<Answers>>>false
Debian uses packages with the .rpm extension. -
<<<Answers>>>false
Which is not a common storage location for software
packages inside of a repository? - <<<Answers>>>removable
hard drive
The commands can be used to access websites from the CLI.
(Select two) - <<<Answers>>>wget
curl
What is use to implement logic into a Bash script? -
<<<Answers>>>control statement
The line of code, taxtotal=10*$subtotal, is written in a script
called taxes.sh. What conditional statement is written
afterward so that if the tax total is greater than 100, the user
, DCOM 142 FINAL EXAM (Actual 2025) QUESTIONS &
ANSWERS (VERIFIED)
will qualify for a bonus? - <<<Answers>>>"if [ $taxtotal -gt
100 ] then echo ""Your $taxtotal will qualify you for a
bonus!"" fi"
Select all the parts of an If statement. - <<<Answers>>>if
then
else
Control statement that enables you to repeat instructions while
conditions are not met. - <<<Answers>>>until loop
Control statement that executes code a specified number of
times. - <<<Answers>>>for loop
Conditional statement to simplify complex conditionals when
you have multiple different choices. - <<<Answers>>>case
statement
Your current bash script uses an if statement. If the condition
is satisfied, an action will be performed. You wish to
incorporate a second action if the condition is not satisfied.
Which statement will you add to your code? -
<<<Answers>>>else
You created a basic bash script called dailyscript.sh and saved
it to the /usr/local/bin/ directory. How would you execute the
ANSWERS (VERIFIED)
The apt command comes with several subcommands for
managing packages. Which one of these are subcommands for
the apt command? (Select all that apply) -
<<<Answers>>>remove {package name}
upgrade {package name}
purge {package name}
CentOS using the dpkg package manager. -
<<<Answers>>>false
Debian uses packages with the .rpm extension. -
<<<Answers>>>false
Which is not a common storage location for software
packages inside of a repository? - <<<Answers>>>removable
hard drive
The commands can be used to access websites from the CLI.
(Select two) - <<<Answers>>>wget
curl
What is use to implement logic into a Bash script? -
<<<Answers>>>control statement
The line of code, taxtotal=10*$subtotal, is written in a script
called taxes.sh. What conditional statement is written
afterward so that if the tax total is greater than 100, the user
, DCOM 142 FINAL EXAM (Actual 2025) QUESTIONS &
ANSWERS (VERIFIED)
will qualify for a bonus? - <<<Answers>>>"if [ $taxtotal -gt
100 ] then echo ""Your $taxtotal will qualify you for a
bonus!"" fi"
Select all the parts of an If statement. - <<<Answers>>>if
then
else
Control statement that enables you to repeat instructions while
conditions are not met. - <<<Answers>>>until loop
Control statement that executes code a specified number of
times. - <<<Answers>>>for loop
Conditional statement to simplify complex conditionals when
you have multiple different choices. - <<<Answers>>>case
statement
Your current bash script uses an if statement. If the condition
is satisfied, an action will be performed. You wish to
incorporate a second action if the condition is not satisfied.
Which statement will you add to your code? -
<<<Answers>>>else
You created a basic bash script called dailyscript.sh and saved
it to the /usr/local/bin/ directory. How would you execute the