No products in the cart.
CompTIA Linux+ Exam Questions
Page 5 of 25
81.
Which framework for a secure VPN operates at the network layer and uses the Authentication Header (AH) protocol for authentication?
-
IPSec
-
TLS
-
PPTP
-
DTLS
Correct answer: IPSec
IPSec is a framework for VPNs. It utilizes protocols such as AH, ESP, and ISAKMP.
TLS is a transport layer protocol. PPTP is an obsolete protocol with many security flaws. DTLS is for transport layer communication.
82.
A user is having authentication issues on a system that uses AppArmor. Which command can the administrator use to examine the audit.log file to identify relevant policy violations?
-
ausearch
-
dmesg
-
sealert
-
pgrep
Correct answer: ausearch
The ausearch command searches the audit.log file created by auditd when using AppArmor.
The dmesg tool is for searching kernel-related messages. The sealert is for searching audit logs using SELinux. The pgrep utility is for searching processes.
83.
Which command uncompresses a file that has been compressed using the bzip2 utility?
-
bunzip2
-
gunzip
-
unxz
-
unzip
Correct answer: bunzip2
The bunzip2 command followed by the filename of the compressed file will decompress it.
The gunzip utility will decompress files that were compressed with gzip. The unxz utility will decompress files compressed with the xz utility. The unzip utility will decompress files compressed with the zip utility.
84.
Which argument to the dd command specifies the device that should be copied?
-
if
-
of
-
bs
-
status
Correct answer: if
The dd command is used to duplicate a disk, and the if argument specifies the input device. Mixing up the input device with the output device could accidentally overwrite data.
The of argument is for the output device. The bs argument is maximum block size. The status argument sets the amount of information to send to STDERR.
85.
Which term describes the MAXIMUM amount of data that can be transmitted between two networks over a certain period of time?
-
Bandwidth
-
Throughput
-
Saturation
-
Latency
Correct answer: Bandwidth
Bandwidth is the measurement of the maximum data amount between two networks. It is usually measured in bytes per second.
Throughput is the actual amount of data rather than the maximum. Saturation refers to when a network exceeds capacity. Latency refers to the time between sending a packet and it getting received.
86.
Which type of variable is defined at the main shell level and inherited by a script?
-
Global
-
Local
-
Parent
-
Child
Correct answer: Global
A global variable is at the main shell level. For it to persist, it needs to be assigned an export attribute.
A local variable is defined only within the shell script. Parent and child refer to process types.
87.
When sending standard output to a file, which operator will append data rather than just overwrite it?
-
>>
-
>
-
<
-
2>
Correct answer: >>
The >> operator will append data if a current file already exists. The > operator will overwrite the file.
The < operator is for input. The 2> operator redirects standard error to a file and overwrites it.
88.
Which udevadm command will query the udev database for device information?
-
udevadm info
-
udevadm control
-
udevadm monitor
-
udevadm test
Correct answer: udevadm info
The udevadm command-line tool allows you to send commands to the udev program. The udevadm info command will query the udev database for device information.
The udevadm control command is used to modify the internal state of udev. The udevadm monitor command will listen to kernel events and display them. The udevadm test command simulates a udev event.
89.
Which is a secure protocol for sending TCP packets over a VPN?
-
TLS
-
DTLS
-
PPTP
-
HTTP
Correct answer: TLS
TLS is considered a safe protocol to use for VPNs. TLS 1.2 is the recommended version.
DTLS is used for UDP packets. PPTP is not considered safe due to its many security flaws. HTTP is an unencrypted protocol for sending web documents.
90.
An administrator suspects that a RAID array is in a state of degraded storage. Which command should they run to see the detailed status of the array?
-
mdadm -D
-
mdadm -C
-
mdadm --fail
-
mdadm --add
Correct answer: mdadm -D
The mdadm command with the -D option will show details about the array. If a partition is in a degraded state, it should be recovered.
The -C option is for creating a new metadevice. The --fail option will mark a drive as faulty. The --add option will enable a drive.
91.
Which of the following commands reads out an entire file to the screen?
-
cat
-
head
-
tail
-
grep
Correct answer: cat
The cat command reads a file and shows all of it on the screen. It is usually used for combining files.
The head command displays the first lines of a file. The tail command displays the last lines of a file. The grep utility is for searching through a file and returning the matching parts of it.
92.
An administrator is troubleshooting an issue on a Debian-based system regarding not being able to download repository information. They want to make sure that the outdated information has been removed from the database. What command should they run to do this?
-
apt-get clean
-
yum clean all
-
zypper clean -a
-
dpkg -r
Correct answer: apt-get clean
The apt-get command does package management on Debian-based systems. The clean option removes outdated information.
The yum and zypper commands are used on Red Hat-based systems. The dpkg command with the -r option is for removing a package.
93.
Which configuration file sets options for host systems that use DHCP?
-
dhclient.conf
-
sysctl.conf
-
hosts
-
nsswitch.conf
Correct answer: dhclient.conf
The dhclient.conf file has configuration options for Dynamic Host Configuration Protocol (DHCP) clients. It can also give initial IP addresses if there is no DHCP server.
The sysctl.conf file is for setting network parameters that interact with the kernel. The host's file is for resolving hostnames to IP addresses. The nsswitch.conf file is for determining which services to use for resolving hostnames.
94.
A user created a script but needs to make it executable. Which command will make it executable for the user?
-
chmod u+x myscript.sh
-
chown u+x myscript.sh
-
setfacl u+x myscript.sh
-
env u+x myscript.sh
Correct answer: chmod u+x myscript.sh
The chmod command changes a file's permissions. Adding the executable permissions lets users run a program.
The chown command changes a file's ownership. The setfacl command sets the ACL for files and directories. The env command is used to print environment variables.
95.
An administrator wants to be able to remotely connect to remote Linux desktops. They want the connection to the server to be encrypted by default using OpenSSH tunneling. They also want to ensure the fastest response time available by using compression and caching. Which remote desktop protocol would be BEST for them?
-
NX
-
VNC
-
XRDP
-
Spice
Correct answer: NX
The NX protocol uses encryption, compression, and caching to make fast and secure connections. They also allow multiple users to connect over a single port. NX-based products are also faster than VNC.
VNC does not support encryption by default. XRDP uses SSL encryption. Spice uses TLS for encryption.
96.
Which command can change the priority of an already-running process?
-
renice
-
nice
-
top
-
pgrep
Correct answer: renice
The renice command is used to change a process' priority. It can change priorities based on PID, user, or group.
The nice command is used to set a priority when starting a command. The top command is used to show processes. The pgrep command is used to find PIDs of programs.
97.
An administrator wants to quickly see information about installed SCSI block devices. What command can they run to see this?
-
lsblk -S
-
dmesg -S
-
fsck -S
-
du -S
Correct answer: lsblk -S
The lsblk gives information about block devices, such as hard drives and RAM disks. The -S option will give information about only connected SCSI drives.
The dmesg command is for interacting with the kernel ring buffer. The fsck command is for repairing filesystems. The du command is for seeing disk usage.
98.
Which Linux bootloader, created in 1999, uses a configuration file called menu.lst that is divided into two sections: global definitions and operating system boot definitions?
-
GRUB
-
GRUB2
-
LILO
-
PXELINUX
Correct answer: GRUB
GRUB was created to replace LILO, as LILO was very limited in its functionality.
GRUB2 was developed to replace GRUB and stores its configuration files in grub.cfg. PXELINUX is a special bootloader for booting from a network server.
99.
Which folder is created when Git is initiated in a project?
-
.git
-
origin
-
GitHub
-
git
Correct answer: .git
Initiating a project will create a .git directory. Directories that start with a period (.) will be hidden by default.
Origin is the default remote repository name. GitHub is an online repository service.
100.
Which type of multifactor authentication involves sending a code to a person's email address or via a text message?
-
OTP
-
Biometric
-
Hardware token
-
PKI
Correct answer: OTP
A One-Time Password (OTP) authentication method sends a code in addition to asking for a username and password.
Biometric authentication involves a physical feature like fingerprints or iris design. A hardware token is an encrypted file on a device like a thumb drive. Public Key Infrastructure (PKI) uses private and public keys for authentication.