RHCSA 2. Using essential tools Exam
2025 Questions and Answers
B. Explanation: Answer B shows the correct syntax. The 2 redirects error
messages, and &1 makes sure that the same is done for STDOUT. - --CORRECT
ANSWER--Which of the following enables you to redirect standard output as well
as
errors to a file?
a. 1&2> file
b. 2>&1 file
c. >1&2 file
d. 1>2& file
....COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 1
,A and B. Explanation: /etc/profile is the file that is processed for all users who are
starting a login shell - --CORRECT ANSWER--You are looking for a variable that
is set in a bash login shell for all users.
Which of the following files is the most likely location where this variable is
set? (Choose two.)
a. /etc/profile
b. /etc/bashrc
c. ~/.bash_profile
d. ~/.bashrc
C. Explanation: On Linux, the current directory is not set in the PATH
variable. - --CORRECT ANSWER--A user has created a script with the name
myscript. He tries to run it using the
command myscript , but it is not started. The user has verified that the script
permissions are set as executable. Which of the following is the most likely
....COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 2
, explanation?
a. An internal command is preventing the startup of the script.
b. Users are not allowed to run scripts.
c. The directory that contains the script is not in the PATH.
d. The script does not have appropriate permissions.
D. Explanation: A pipe is used to process the output of the first command and use
it as input of the second command. - --CORRECT ANSWER--You need the
output of the command ls to be used as input for the less command.
Which of the following examples will do that for you?
a. ls > less
b. ls >> less
....COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 3
2025 Questions and Answers
B. Explanation: Answer B shows the correct syntax. The 2 redirects error
messages, and &1 makes sure that the same is done for STDOUT. - --CORRECT
ANSWER--Which of the following enables you to redirect standard output as well
as
errors to a file?
a. 1&2> file
b. 2>&1 file
c. >1&2 file
d. 1>2& file
....COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 1
,A and B. Explanation: /etc/profile is the file that is processed for all users who are
starting a login shell - --CORRECT ANSWER--You are looking for a variable that
is set in a bash login shell for all users.
Which of the following files is the most likely location where this variable is
set? (Choose two.)
a. /etc/profile
b. /etc/bashrc
c. ~/.bash_profile
d. ~/.bashrc
C. Explanation: On Linux, the current directory is not set in the PATH
variable. - --CORRECT ANSWER--A user has created a script with the name
myscript. He tries to run it using the
command myscript , but it is not started. The user has verified that the script
permissions are set as executable. Which of the following is the most likely
....COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 2
, explanation?
a. An internal command is preventing the startup of the script.
b. Users are not allowed to run scripts.
c. The directory that contains the script is not in the PATH.
d. The script does not have appropriate permissions.
D. Explanation: A pipe is used to process the output of the first command and use
it as input of the second command. - --CORRECT ANSWER--You need the
output of the command ls to be used as input for the less command.
Which of the following examples will do that for you?
a. ls > less
b. ls >> less
....COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 3