CompTIA Linux+ Chapter 6 Quiz - 'Linux Server Deployment'

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which of the following characters can be entered at the beginning of a line in a shell script to ensure that line is recognized as a comment rather than try to execute it?

#

Command that can be used for comparing values within an if statement

-lt =

Which of the following files can you add filenames to so that the git add * command will not stage them?

.gitignore

In what directory is Stage2 of the GRUB2 boot loader stored?

/boot

Which directory stores most UNIX SysV rc scripts?

/etc/init.d

Which of the following files is always executed immediately after any user logs in to a Linux system and receives a BASH shell?

/etc/profile

What is the name of the directory that contains symbolic links to UNIX SysV rc scripts for runlevel 2?

/etc/rc2.d

What file in the /proc directory contains information about a computer's CPU?​

/proc/cpuinfo

To ensure Linux has detected the correct amount of RAM in the system after installation, you should view the contents of what file in the proc directory?

/proc/meminfo

You want to view log files to get information about a problem that occurred during a Linux installation. In which directory will you likely find the log files?

/var/log

Which of the following would be the results of running the command seq 7?

1 through 7 being displayed one number per line.

Linux servers are typically installed in a rack using rackmount server hardware. Which of the following describes the minimum height of a rackmount server?

1U

Which of the following represents stderr at the command line when used for redirection?

2

Which of the following will take output from a command and append it to the end of a file?

>>

Which of the following commands can be used to create a BASH variable named CREATOR with the value of Torvalds?

CREATOR="Torvalds"

BTRFS filesystems do not need to be checked for errors as they are resilient to data corruption. True or False?

FALSE

Because stderr and stdout represent the results of a command and stdin represents the input required for a command, only stderr and stdout can be redirected to/from a file. True or False?

FALSE

DM-MPIO can be configured to provide multiple, redundant connections to data stored on a SAN. True or False?

FALSE

ZFS volumes are mounted at boot time from entries within /etc/fstab by default. True or False?

FALSE

What component of a Linux server is used to connect to a Fibre Channel SAN?

FC HBA

Match the file with the order in which the BASH shell environment files are read:

First: /etc/profile Second: /etc/profile.d/* Third: /etc/bashrc Fourth: ~/.bashrc

Which assistive technology will make a desktop environment more accessible to a person with low vision?

High Contrast

What does &> accomplish when entered on the command line after a command?

It redirects both stderr and stdout to the same location.

Which of the following will the split command do on a file when no other options are specified?

It will split a file into new equally sized files that are 1/10th of the original file size.

When viewing the output of the lsmod command, you notice several modules that start with vmw. What does this indicate?

Linux is running as a guest operating system.

What type of redundant storage configuration is most common for hosting the operating system and applications on a server?

RAID 1

Both aliases and functions can be used to store commands that can be executed, but functions can also accept positional parameters. True or False?

TRUE

The sed and awk commands are filter commands commonly used to format data within a pipe. True or False?

TRUE

Each SCSI device attached to a system must be assigned an ID number. What is this ID number called?

Target ID

Consider the following shell script: echo -e "What is your favorite color?--> \c" read REPLYif [ "$REPLY" = "red" -o "$REPLY" = "blue" ] then echo "The answer is red or blue." else echo "The answer is not red nor blue." fi What would be displayed if a user executes this shell script and answers Blue when prompted?

The answer is not red nor blue.

You attempt to perform the git commit -m "Added listdir function" but the command fails. What are possible reasons for the failure? (Choose all that apply.)

The user performing the commit is not running the command from within the Git repo directory. The user performing the commit has not set their Git user information. No files were added to the Git index beforehand.

What would be the effect of using the alias command to make an alias for the date command named cat in honor of your favorite pet?

When you use the cat command at the command prompt with the intention of viewing a text file, the date appears instead.

You have redirected stderr to a file called Errors. You view the contents of this file afterward and notice that there are six error messages. After repeating the procedure, you notice that there are only two error messages in this file. Why?

You did not append the stderr to the Error file, and, as a result, it was overwritten when the command was run a second time.

What is the term for a ZFS managed filesystem created from ZFS pools?

ZFS volume

Which of the following is the common escape sequence to display a horizontal tab using the echo command?

\t

Which of the following lines can be used to perform command substitution within a shell script? (Choose all that apply.)

`command` $(command)

Which of the following could result in a segmentation fault (fatal signal 11) during a Fedora installation?

a. overclocked CPU b. RAM problems c. faulty hardware components ALL OF THE ABOVE

Which of the following commands will send the output of the cat command to the grep command to be filtered?

cat /etc/passwd | grep jsmith

What command will display the current CPU(s) detected by a Linux system?

cat /sys/cpuinfo

Which of the following will display the message welcome home if the cd /home/user1 command is successfully executed?

cd /home/user1 && echo "welcome home"

The command that can be used to change the root filesystem to a different directory, such as when you are in a rescue environment.

chroot

Which of the following commands will display the exit status of the last command used in the BASH shell?

echo $?

You have just created a variable named CREATOR. Which of the following commands will display the contents of the variable to standard output?

echo $CREATOR

The current value for the HOME variable is displayed by which of the following commands? (Choose all that apply.)

echo ~ echo $HOME

Before a user-defined variable can be used by processes that run in subshells, that variable must be __________.

exported

Every if construct begins with if and must be terminated with?

fi

When writing shell scripts and using an if statement to determine whether a set of code should be executed, what is the proper syntax to end the if construct? ___________

fi

Which of the following commands should you use to specify that you want to use Git for version tracking on them?

git add

Which command can be used to download an updated copy of the master branch from the original Git repository?

git pull origin master

What Systemd target corresponds to runlevel 5?

graphical.target

A type of software that allows a piece of hardware to host multiple operating systems

hypervisor

Which of the following describes a computer that is used to access an iSCSI hard disk across the network?

iSCSI initiator

Which of the following constructs can be used in a shell script to determine whether two values are equal and if so run another set of commands?

if

Where is the /proc filesystem stored?

in RAM

What file in the /proc directory contains a list of memory address ranges reserved for device use?

ioports

Which of the following commands can be used on a modern Linux system to view hardware information that was captured at the beginning of the boot process?

journalctl -k

In Fedora 20, what journaling database system has replaced the logging system used to record the messages normally stored within the boot.log, messages, and syslog files?

journald

In order to create and manage KVM or Qemu virtual machines, a Linux system must have this installed

libvert

Which command can be used to modify the default locale on the system?

localectl

Which command can be used to display general hardware info for the entire system?

lshw

Which of the following commands can quickly determine whether your network hardware was detected properly following a Linux installation?

lshw -class network

A government offce want to secure a few of its Linux systems so thy can only use certain USB devices. After plugging in a USB device, which command an be used to detect certain identifying information that can be used to only allow that type of USB device?

lsusb

What command is used to manage a software RAID configuration after installation?

mdadm

The subdirectory newdir does not currently exist in the current directory that you are in. Which of the following commands will create a new directory named newdir and then change into that directory?

mkdir newdir && cd newdir mkdir newdir; cd newdir

Leonard wants to find detailed information about the Bluetooth kernel module. What can he use to display this information?

modinfo bluetooth

What file under the proc directory contains information regarding what modules are currently loaded into the Linux kernel?

modules

Which command will display the output of a file while also displaying a line number at the left side of each line for the /etc/passwd file?

nl /etc/passwd

Which of the following commands will display the output of a file while also displaying a line number at the left side of each line for the /etc/passwd file?

nl /etc/passwd

Which construct can be used in a shell script to read stdin and place it in a variable?

read

Which of the following can be included in a shell script to ask the user to type in a password and then store it in the variable named $password?

read -s -p "Please enter the password: " password

Which of the following commands will count down from 10 to 1?

seq 10 -1 1

What kernel option can be specified within a boot loader to force the system to boot to Single User Mode?

single

Which type of RAID can be entirely configured during the Linux installation process?

software RAID

Which of the following commands will display the contents of the /etc/passwd file in alphanumerical order?

sort /etc/passwd

Which of the following is a valid method of running a script named myscript.sh?

source myscript.sh ./myscript.sh

Which command can be used to start X Windows, the window manager, and the default desktop environment?

startx

When configuring a virtual hard disk file, which term refers to the feature that allows the virtual hard disk file to expand dynamically as space is requested by the guest operating system?

thin provisioning

An alias has previously been created named showauth. Which of the following commands can be used to get rid of that alias?

unalias showauth

How many times will the following loop execute as part of a script: #!/bin/bash COUNTER=0 while [ $COUNTER -lt 7 ] do echo "hello world" done

until ctrl-c is used to terminate it

On a system using the KVM hypervisor, which of the following modules would you expect to see as part of the output of the lsmod command on a guest Linux virtual machine?

virtio

Which of the following commands will count the number of lines in a file named data.csv?

wc -l data.csv

Using the syntax below, what command will create directories named one, two, and three? ​ echo one two three | ___________ mkdir

xargs

What command can be used to create a ZFS volume called test from the space on /dev/sdb and /dev/sdc that functions like RAID level 1?

zpool create test mirror /dev/sdb /dev/sdc

Which command should you run after installing a new kernel module to update the module dependency database?

depmod

Which of the following will look at the /etc/passwd file for any lines containing the word root and display them out to the screen while simultaneously writing the results to a file?

grep root /etc/passwd | tee ~/root.txt

The first daemon loaded on a Linux system is _____.

init

Which command causes the system to enter Single User Mode?

init 1

Which command will display the total amount of memory as well as the amount of free memory for a node?

nodememstats

Which command could you use to see a list of all environment and user-defined shell variables as well as their current values?

set

Which of the following operators reverses the meaning of a test statement?

!

Which of the following variables could access the value "/etc" within the sample shell script, if the sample shell script was executed using the bash sample /var /etc /bin command?

$2

To which directory will the test ZFS volume from the previous question be mounted by the ZFS system?

/test

How do you indicate a comment line in a shell script?

Begin the line with #.

Which of the following RAID levels is not fault tolerant?

RAID 0

If a Linux installation ends abnormally and the screen displayes a fatal signal 11 error, what type of error has occurred?

Segmentation Fault

A for construct is a loop construct that processes a specified list of objects. As a result, it is executed as long as there are remaining objects to process. True or False?

TRUE

Levi wants to run 5 commands sequentially, but does not want to create a shell script. He knows that each command is going to take approximately 20 minutes to run individually. However, he would like to go to lunch 15 minutes from now. He knows that he can type all of the commands on the same line and separate them with a certain character to run them sequentially. Which character can he type after each command to have them run one after the next without requiring further input from him?

a semicolon

Which command can be used to create a new command that will monitor the contents of auth.log as they get added to the file?

alias showauth='tail -f /var/log/auth.log'

Which command can you use during a system rescue to switch from the root of the live OS to the root of the Linux system installed on the hard disk?

chroot


Kaugnay na mga set ng pag-aaral

Chap 32 PrepU, Pharm201 CH33, PrepU ch 31, Prep-U: Chapter 30, PrepU Chapter 29, Pharm Chapter 28

View Set

NURS 6005 (Mental Health) Final Exam Study Set

View Set

Introduction to Personal Computer Hardware

View Set

American Literature Midterm - Jay Beavers Baylor

View Set

Physical Science IA3 Review GCA short version

View Set

Prebles Artforms Chapter 1 and 2 Review

View Set