Linux+ XK0-004 - Practice Questions from Book

¡Supera tus tareas y exámenes ahora con Quizwiz!

Which character or character sequences begins a comment in a bash script?

#

You need to disable a service found in /etc/inetd.conf. Which is used as a comment character in that file?

#

Which is the correct method for invoking the bash shell for a script, typically found as the first line of the script?

#!/bin/bash

When setting the shebang line of a shell script, which command will help to determine the location of the interpreter automatically?

#!/usr/bin/env bash

Which character sequence displays the number of CLI arguments that were passed to a bash script?

$#

Which character sequence is used to execute a command within a subshell in a bash script?

$( )

You need to echo the name of the script back to the user for usage or help out. Which positional parameter can be used for this purpose?

$0

Which variable within a bash script is used to access the first command-line parameter?

$1

Assuming that the $ModLoad imudp configuration option has been set in the /etc/rsyslog.conf configuration file for rsyslogd, which of the following additional options is necessary to configure the port on which the server will listen?

$UDPServerRun 514

Which character sequence expands or interpolates a variable called VAR within a bash script

${VAR}

Within a bash script, you need to run two commands, but only run the second command if the first succeeds. Which metacharacters can be used to accomplish this task?

&&

Which is an operator for redirecting STDOUT and STDERR?

&>

Which character sequence is used to indicate the default case within a case statement in a bash script?

*)

You need to exclude a build file, called build.o, from being tracked by git. Which character sequence can be used in the .gitignore file to exclude or ignore that file in all directories?

**/build.o

Which option to the su command is used to obtain the normal login environment?

-

Which option to git merge can be used to attempt to roll back a merge that has conflicts?

--abort

Which option to grub-install will place the GRUB images into an alternate directory?

--boot-directory

You are using a local RAID array and investigating a performance issue. When using mdam in monitor mode, which option sets the polling interval?

--delay

Which option to the rsync command, when used in archive mode, will remove files that no longer exist on the host?

--delete

When creating a tar archive, you need to exclude certain files from the archive. Which option facilitates this scenario?

--exclude

Which option to chkconfig enables you to set the runlevels for a given service?

--level

When working with a SysV system, which chkconfig options will display all services and their runlevels?

--list

Which option to the git config command shows all of the configuration parameters that have been set?

--list

You need to determine if ASCII and Unicode are supported on the system. Which option to the iconv command shows the available character sets on a given system?

--list

Which option within a LOG target for iptables sets a string that will be prepended to log entries?

--log-prefix

Which option to the rsync command changes the resolution for determining file modifications?

--modify-window

Which option to mdam watches a RAID array for anomalies?

--monitor

You are using git pull to obtain changes to a share repository. Which option should you add to git pull in order to prevent autocommit so that you can look at the results of the merge file?

--no-commit

Which bash parameter or option will cause the shell to be executed without reading the initialization files?

--norc

When cloning a repository with git clone, you need to change the name of the remote so that it is not called origin. Which option can be added to git clone to accomplish this task?

--origin

Which option to tar removes files after adding them to the archive?

--remove-files

Which option to the firewall-cmd command sets the current runtime configuration to be available on next reboot of the computer?

--runtime-to-permanent

Which swapon options displays information on the size of swap space along with its used space?

--show

Which option to modprobe will show the dependencies for a module?

--show-depends

Which option to mdam is used to create a new array?

--start

Which signal to the kill command can be used to signal that BIND should reload, including its configuration?

-1

You have attempted to stop a process using its service command and also using the kill command. What signal can be sent to the process using the kill command in order to force the process to end?

-9

Which option is used to send a signal to a process when using pkill?

-<SIGNAL>

Which command-line option modifies the behavior of depmod such that only newer modules are added when comparing modules.dep?

-A

Which partial iptables rule blocks all traffic from source IP 192.168.51.50?

-A INPUT -p ALL -s 192.168.51.50 -j DROP

Which partial iptable rule allows incoming ICMP traffic?

-A INPUT -p ICMP -j ACCEPT

Which partial iptables rule will allow all hosts to connect to TCP port 2222?

-A INPUT -p TCP -s 0/0 --destination-port 2222 -j ACCEPT

Which options to fsck can be used to check all filesystems listed in /etc/fstab while excluding the root partition?

-AM

When running the df command, you need to change the scale such that the report shows terabytes instead of bytes. Which option will accomplish this task?

-BT

Which option to tcpdump displays a list of available interfaces on which tcpdump can operate?

-D

While troubleshooting a kernel issue and using the console, you are having difficulty working with the console due to continual messages being displayed on the console itself. Which option to dmesg can be used to disable logging to the console?

-D

When using tune2fs to set an extended option such as stripe_width, which command line option is needed to signify that an extended option follows?

-E

Which option to useradd will add groups for a user?

-G

Which option to whois suppresses the legal disclaimer information from certain registries?

-H

Which kill signal can be sent in order to start a process?

-HUP

Which option for the ping command enables you to choose the interface from which the ICMP packets will be generated?

-I

Which option to chage sets the maximum days that a password is valid?

-M

Which option to setsebool writes the current values to disk so that they will be applied at next reboot?

-P

When checking filesystems with the fsck command, which option skips checking of the root filesystem?

-R

Which option to SSH creates a port forwarding to which remote clients can also connect?

-R

Which option to chgrp will change group ownership of all files within a given directory?

-R

Which option to nmap will cause it to always perform name resolution?

-R

Which option to the chmod command performs a recursive change?

-R

Which option to the cp command will copy directories in a recursive manner?

-R

You are using chmod in order to change several web-related files so that the web server/public can read them. Which option should you add to the chmod command in order for the permissions to inherit to other files?

-R

You need to change ownership of files within a directory to have that ownership inherit all subdirectories and files. Which option to the chown command accomplishes this task?

-R

Which option to umask will display the permissions to be used in a POSIX format?

-S

Which option to the traceroute command will use TCP SYN packets for the path trace?

-T

Which option to the ping command shows latency rather than round-trip time?

-U

Which rpm option can be used to verify that no files have been altered since installation?

-V

Assuming that a file has been previously added and committed to git, which option to the git command can be used to automatically add and commit the file?

-a

Which option to chown recursively change the ownership?

-a

Which option to getsebool returns the entire list of SELinux booleans?

-a

Which option to sysctl displays all of the available parameters?

-a

Which option to sysctl displays all values and their current settings?

-a

Which option to the mount command will mount all filesystems that are currently available in /etc/fstab?

-a

Which option to the rsync command provides archive mode?

-a

You are viewing the contents of a directory with the ls command but do not see files that begin with a single dot (.) Which option to ls shows those files?

-a

Which option to the dumpe2fs command can be used to display blocks that are reserved because of being marked as bad?

-b

Which option to the dumpe2fs displays the bad blocks for a given partition?

-b

You are performing an xfsrestore. The xfsdump was executed with a block size of 4M. Which option do you need to invoke on xfsrestore in order for it to successfully use this dump?

-b 4M

Which option to bzip2 sends the output to STDOUT?

-c

Which option to dmesg clears the contents of the kernel ring buffer after they have been read once?

-c

Which option to mke2fs is used to check for bad blocks during filesystem creation?

-c

Which option to quotacheck is used to create the files for the first time?

-c

Which option to the ioping command sets the number of requests to send?

-c

Which option to the su command will execute a single command with a non-interactive session?

-c

Which option to the tar command creates a tar file?

-c

Which option to the usermod command is used to change a given user's real name?

-c

Which option to the paste command is used to set the delimiter?

-d

Which test will determine if a file exists in the context of a shell script?

-e

Which option to rsync specifies that the remote shell or transport for the synchronization process should use SSH?

-e ssh

Which swapon option silently skils swap partitions that do not exist?

-e-f

Which operator should be used when comparing integers to determine if one is equal to another in a bash script?

-eq

The system contains an NFS mounted filesystem that has become unreachable. Which option should be passed to umount in order to force the unmounting of the filesystem?

-f

Which option to rmod forces the module to be unloaded?

-f

Which option to the fsck command causes it to run the check even if the filesystem is apparently marked as clean?

-f

Which option to the journalctl command will continuously update the display as new log entries are created?

-f

Which option to xfs_check is used to verify a filesystem that is stored in a file?

-f

You are working with a file server, and clients are reporting that the filesystems shared over NFS have become unreachable. Which option should be passed to umount in order to force the unmounting of the filesystem on the clients?

-f

You need to look at information on logins beyond what was captured by the current log file for the last command. Which option to the last command can be used to load information from an alternate file?

-f

Which option to the blkid command purges the cache to to remove devices that do not exist?

-g

Which option to xfs_metadump displays a progress indicator?

-g

Which option to SSH specifies the private key to use for authentication?

-i

Which option to both mv and cp will cause the command to prompt before overwriting files that already exist?

-i

Which option tp iftop sets the interface on which iftop will listen?

-i

You would like to change the byte-to-inode ratio on a new filesystem in order to prevent inode exhaustion. Which option to mke2fs accomplishes this task?

-i

Which option to netstat displays interface information in a table-like format that might be suitable for use with scripting?

-iC

Which option to the find command will search for files by their inode number?

-inum

Which options for the rpm command will display verbose output for an installation along with progress of the installation?

-ivh

When using the net command in an Active Directory environment, which option enables authentication using Kerberos?

-k

Which option for the wc command prints the number of lines given as input?

-l

Which option to the ls command displays the ownership, including user and group owners of a given file or directory?

-l

Which option to the ls command displays ownership and permission information?

-l-

Which options to ls will produce output, including hidden (dot) files, in a list that is ordered such that the newest files are at the end of the output?

-latr

Which test within a shell script while loop will examine one value to see if it is less than another?

-lt

Assuming that policy routing has been enabled in the kernel, which option to the ping command can be used to mark the outgoing request appropriately in order to indicate that the packet should be processed according to a particular policy?

-m

When running useradd, which option needs to be specified in orer for the user's home directory to be created?

-m

You are committing code to a git repository and need to include a message on the command line. Which option enables this behavior?

-m

You need to create a script for use with the parted command. When using the parted command to obtain a list of partitions, which additional option formats the output such that it can be more easily parsed by a script?

-m

Which partial iptables rule sets up a configuration that limits log entries to three per minute?

-m limit --limit 3/minute --limit-burst 3 -j ;PG

What option is used to change the number of lines of output for the head and tail commands?

-n

When using sudo in a scripted environment, which option can be used to specifiy a non-interactive mode?

-n

Which option to iftop prevents hostname lookups from occuring?

-n

Which option to netstat is used to disable DNS or hostname lookups?

-n

Which option to the echo command suppresses the ending newline character that is normally included?

-n

Which option to the restorecon utility can be used to view the current contexts without making changes?

-n

You are using the route command to view routes. However, name resolution is taking a long time and causing delay in the response from the route command. Which options to route can be added to cause it to not perform name resolution?

-n

Which option to lspci is used to display both numeric codes and device names?

-nn

When looking to parse the output of the ip command, which option can be set to remove newlines such that the output could be piped to the grep command?

-o

Which option for the grub2-mkconfig command sends you output to a file instead of STDOUT?

-o

Which option to the curl command sets the local filename to which the output will be saved?

-o

Which option to the wget command logs output?

-o

When using iostat to assess performance, which option displays information on a partition basis for block devices?

-p

When using iostat to assess performance, which option displays information on a per-partition basis for block devices?

-p

Which option to declare displays output in a way that could then be used as input to another command?

-p

Which option to the ss command shows the process IDs associated with the socket?

-p

You are using nmap to scan a host for open ports. However, the server is blocking ICMP echo requests. Which option to nmap can you set in order to continue the scan?

-p0

Which option to the gunzip command will suppress all warning messages and might be useful in a situation where output is not appropriate?

-q

In the context of an if conditional within a bash script, which test will determine whether a file exists and can be read by the user executing the test?

-r

What option to unmount will cause the command to attempt to remount the filesystem in read-only mode if the unmounting process fails?

-r

When troubleshooting a possible issue with bad blocks on a disk, which options to fsck will report statistics such as CPU time used on completion of the fsck operation?

-r

Which option to modprobe will remove a module and attempt to remove any unused modules on which it depends?

-r

Which option to the declare command will create a variable that is read-only?

-r

Which option to the netstat command displays the current routing table?

-r

Which option to the zip command causes the command to traverse directories?

-r

Which option to useradd creates a system user rather than a normal user?

-r

Which options are encompassed when the -a option to resync is invoked?

-rlptgoD

Which option to ioping sets the size of the request?

-s

Which option to ln creates a symlink to another file?

-s

Which option to tcpdump sets the snapshot length of packets to capture?

-s

Which option to the arp command creates a new entry for a given IP address to MAC address pair?

-s

Which option to the du command provides summary output?

-s

Which option to nmap sets the scan to use TCP SYN packets for files with the setgid bit enabled?

-sS

Which scan mode for nmap provides an Xmas scan?

-sX

When using the du command to diagnose which directories are large, you would like to summarize the output in a more human-friendly format. Which option(s) should be used?

-sh

Part of the EXT tools, which option to the mke2fs command sets the type of filesystem to be created?

-t

Which option to ssh-keygen sets the type of key that will be created?

-t

You are working with iptables-save to examine the contents of tables in a scripted environment. Which option to tables-save can be used to specify the table name rather than outputting information for all tables?

-t

Which option for the host command will query for authoritative nameservers for a given domain?

-t ns

Which option for the host command will query for the authoritative name servers for a given domain?

-t ns

Which option should be used to send a DNS query for an SPF record with dig?

-t txt

Which option is used with the env command in order to remove a variable from the environment?

-u

Which option to sestatus shows the context of a file?

-v

Which function of the hwclock command will set the hardware clock to the current system time?

-w

Which option to rmmod will cause the module to wait until it's no longer in use to unload the module?

-w

When running an fsck on an ext3 filesystem, the process is taking longer than expected and requiring input from the administrator to fix issues. What option could be added to fsck next time so that the command will automatically attempt to fix errors without intervention?

-y

When running fsck on an ext3 filesystem, the process is taking longer than expected and requiring input from the administrator to fix issues. What option could be added to fsck next time so that the command will automatically attempt to fix errors without intervention?

-y

Which option to the tar command can be used to uncompress a file that has been compressed using gzip?

-z

Which option to xfsdump sets the maximum size for files to be included in the dump?

-z

When scripting for build automation, you need to run a configure script prior to running the make command. Which will execute the configure script, assuming that it's in the same directory as the script invoking it?

./configure

You need to create a function that will be available each time you log into the system. Within which file should this function be placed?

.bash_profile

What is the order in which user configuration files are located on login to a bash shell?

.bash_profile, .bash_login, .profile

Within which directory does git store a local copy of the repository metadata?

.git

Which file is used within a git repository in order to indicate files and file patterns that should not be versioned?

.gitignore

To which shell can a user account be set if they are not allowed to log in interactively to the computer?

/bin/false

Within which partition will the EFI system partition typically be mounted?

/boot/efi

The file /etc/grub2.cfg is typically a symbolic link to which file?

/boot/grub2/grub.cfg

When working with World Wide Identifiers (WWIDs), within which directory on a Red Hat server will you find symlinks to the current /dev/sd device names?

/dev/disk/by-id

While you can use blkid to obtain the UUIDs for filesystems, which location on the filesystem also shows this information?

/dev/disk/by-uuid

Information about logical volumes can be found in which directory?

/dev/mapper

Information about logical volumes can be found in which of the following directories?

/dev/mapper

You need to redirect output for a long-running process but do not need to see or capture the output. To which location can you redirect output so that it does not consume disk spacE?

/dev/null

You have purchased a new SSD hardware that uses the NVMe protocol, but you cannot find the disks in the normal /dev/sd* location where you traditionally found such storage. In which location should you look for these drives?

/dev/nvme*

What is the device-naming convention used to indicate a pseudo-terminal in Linux?

/dev/pty

A Serial ATA (SATA) disk will use which of the following identifiers?

/dev/sdX

You are troubleshooting a storage problem, and a Serial ATA (SATA) disk or mount point may be missing. Which identifiers is used by SATA disks?

/dev/sdX

A hard drive is reported as hd(0,0) by the GRUB Legacy configuration file. To which of the following disks and partitions does this correspond?

/dev/sda1

Which device is used as the terminal for the current process?

/dev/tty

Within which directory would you typically find the Xorg configuration file xorg.conf?

/etc/X11

When working with AppArmor, within which directory are profiles located?

/etc/apparmor.d/

You need to make a change to the global behavior of AppArmor. Rather than editing the profiles directly, which directory contains common settings that can be changed instead?

/etc/apparmor.d/tunables

Within which file are details of the current package repositories stored on a Debian system?

/etc/apt/sources.list

You need to update the configuration files for package repositories

/etc/apt/sources.list

As a systems administrator, you need to change options for automount. Which file is the default configuration file for the autofs automounter?

/etc/auto.master

Which file is used to provide a list of users that can add and delete cron jobs?

/etc/cron.allow

Within which directory will you find scripts that are scheduled to run through cron every 24 hours?

/etc/cron.daily

Which is used a system-wide cron file?

/etc/crontab

Which file contains a list of users who are not allowed to create cron scheduled tasks?

/etc/crown.deny

Which file is used to store a list of encrypted devices that are to be mounted at boot?

/etc/crypttab

Within which directory hierarchy will you find configuration files related to printing with the CUPS printing system on a printer server?

/etc/cups

Which file should you edit when using GRUB2 in order to set things like the timeout?

/etc/default/grub

Within which file is keyboard mapping set on a Debian or Ubuntu system?

/etc/default/keyboard

Which file is used to maintain the configuration for DHCP?

/etc/dhcpd.conf

Which directory contains configuration files for the fail2ban system?

/etc/fail2ban

Which file contains information about the filesystems to mount their, partitions, and the options that should be used to mount them?

/etc/fstab

Which file contains encrypted password information for groups?

/etc/gshadow

On a system using SysVinit, in which directory are startup and shutdown scripts for services stored?

/etc/init-d

Which file contains the runlevels for the system along with a reference to the corresponding rc file?

/etc/inittab

You need to disable the ability to reboot the Linux computer using the Ctrl+Alt+Del key combination. Within which file will you find the configuration for this key combination?

/etc/inittab

Which file should be used to display a message to users prior to logging locally?

/etc/issue

Which file can be used to provide a message to users logging in remotely with a protocol such as telnet?

/etc/issue.net

Which is not typically used to store libraries?

/etc/lib

Which is not typically used to store shared libraries?

/etc/lib

Within which directory will you find configuration files for various logs that are to be rotated with logrotate?

/etc/logrotate.d

Assume you need to add a kernel module with a custom command, such as to specify options at load time. Within which file could you add this configuration?

/etc/modprobe.conf

With which of the following directories will you find blacklist information for modules loaded with modprobe?

/etc/modprobe.d

Which file contains a message that is displayed after successful logins?

/etc/motd

Which file contains information on currently mounted filesystems, including their mount options?

/etc/mtab

On a debian system, within which directory hierarchy will you find configuration information and directories to hold scripts to be run when an interface is brought up or taken down?

/etc/network

Within which directory are individual configuration files stored for the Pluggable Authentication Module mechanism?

/etc/pam.d

When configuring BIND for a chroot jail scenario, within which of the following files should the home directory be set for the chroot user to use with bind?

/etc/passwd

Which file contains user information such as username and real name and is readable by all users of the system?

/etc/passwd

You are looking for files related to the SSL configuration on the server. After looking in /etc/ssl, within which other directory might the files reside?

/etc/pki

Within which directory should scripts and other files to run at login be stored?

/etc/profile.d

Within which hierarchy are files from /etc/init.d linked so that the files are executed during the various runlevels of a SysV system?

/etc/rc.d

As a system administrator, you have a custom service that needs to execute on boot. However, the service does not have the traditional service-management script. Which file could you place the command so that it is executed on boot?

/etc/rc.local

Startup commands that are executed on boot for udev can be found in which directory on a Debian system?

/etc/rcS.d

When using rsyslog for logging, within which file can you look to determine what items are logged on the system?

/etc/rsyslog.conf

When examining open ports on the server, you see that the TCP port 3000 is listed with no corresponding protocol name, such as smtp, imaps, and so on. In which file would you find a list of port-to-protocol translations that could be customized to add this new port?

/etc/services

When performing local authentication, which file provides encrypted password information?

/etc/shadow

Which file contains a list of usernames, UIDs, and encrypted passwords?

/etc/shadow

Within which directory should you place files to have them automatically copied to a user's home directory when the user is created?

/etc/skel

Which file can be used to store a server-wide cache of hosts whose keys are known for SSH?

/etc/ssh_known_hosts

Within which folder are systemd unit configuration files stored?

/etc/sysconfd

In a scripting scenario, you need to enable legacy locations for things like networking. Which file can be used for storing network configuration?

/etc/sysconfig/network

Which directory contains configuration files related to networking?

/etc/sysconfig/network-scripts/

Which file is used to indicate the local time zone on a Linux server?

/etc/timezone

Configuration of udev devices is done by working with files in which directory?

/etc/udev

Which directory contains configuration for UFW?

/etc/ufw

Within which directory will you find the repositories used by Yum?

/etc/yum.conf.d

Within which directory will you find the repositories used by yum?

/etc/yum.repos.d

According to the FHS, what is the proper mount point for removable media?

/media

Which best describes the /proc filesystem?

/proc contains information on currently running processes, including the kernel

Within which directory is information about USB devices stored?

/proc/bus/usb

Which of the following files provides information on memory utilization including free memory, buffers, cache usages, and several additional items?

/proc/meminfo

Which file shows the currently mounted filesystems?

/proc/mounts

Which file contains the current list of partitions along with their major and minor numbers and number of blocks?

/proc/partitions

According to the FHS, what is the correct location for site-specific data for a server?

/srv

According to the Filesystem Hierarchy Standard (FHS), what is the correct location for site-specific data for a server?

/srv

Within which file can you determine the current I/O scheduler algorithm?

/sys/block/<device>/queue/scheduler

Assuming a block storage device is used for virtualization of sda, which file can view the number of read I/O requests for the device?

/sys/block/sda/stat

Which directory contains information on FibreChannel HBA ports?

/sys/class/fc_host

Which directory hierarchy contains information such as the WWN for Fibre Chanel?

/sys/class/fc_host

To which file can you echo "---" in order to cause a scan of a SCSI host adapter for new disks?

/sys/class/scsi/hostscan

Within which directory are the predefined zones for firewalld?

/usr/lib/firewalld/zones

Which is the location in which kernel modules are stored?

/usr/lib/modules/{kernel-version}

Within which directory will you find files related to the time zone for various regions?

/usr/share/zoneinfo

When partitioning a disk for a mail server running Postfix, which partition/mounted directory should be the largest in order to allow for mail storage?

/var

After recovering from kernel panic, you would like to look at what might have happened. Which file contains the kernel ring buffer messages?

/var/log/bootlog.txt

Which log is used to store information related to authentication and authorization?

/var/log/secure

Within which directory will you find the mail queue on a Qmail server?

/var/qmail/queue

Within which directory would you find a list of files corresponding to the users who have current cron jobs on the syste,?

/var/spool/cron/crontabs

If you'd like a value set with the systctl command to take effect on boot, within which file should you place the variable and its value?

/var/systctl.conf

Which directory is used with the automatic bug-reporting tool in CentOS 7?

/var/tmp/abrt

What is the UID of the root account?

0

Which exit code indicates success for a bash script?

0

The umask reports as 022. What is the permission that will be in effect for a newly nonexecutable created file?

022

Which partition type is used to indicate a software RAID array, such as an array built with mdadm?

0xFD

Which exit code is used to indicate a general error within a bash script?

1

Which kill signal sends a hangup to a given process?

1

Which values to LIBVIRT_DEBUG is used to enable debug logging for libvirt?

1

Which will run a command called /usr/local/bin/changehome.sh as the www-data user when placed in /etc/crontab?

1 1 * * * www-data /usr/local/bin/changehome.sh

Which range of UIDS is typically used by service accounts?

1 to 999

What is the default number of lines printed by the head and tail commands?

10 for both head and tail

Ports below what number are considered to be the well-known ports?

1024

When configuring a local NTP server role, to what server address can you set the server's NTP client?

127.0.0.1

Which is not used as a private address for internal, non-Internet, use?

143.236.32.2231

Which is not used a private address for local, non-Internet, use?

143.236.32.231

Which will execute a job through cron at 12:15am and 12:15pm everyday?

15 0.12 * * *

Which represents a correct configuration for /etc/hosts?

192.168.1.4 cwa.braingia.org cwa

Which represents a correct configuration line for /etc/hosts?

192.168.1.4 cwa.braingia.org cwa

When working in the bash shel, you need to redirect both STDOUT and STDEER. Which command will redirect both STDOUT and STDERR?

2>&1

You need to redirect both STDERR and STDOUT to a file. Which character sequence accomplishes this task?

2>&1|

Which character sequence should be used if you need to redirect STDERR to a file and append to the file?

2>>

You need to redirect STDERR from a command into a file to capture the errors. Which character sequence can be sed for this purpose?

2>gi

On which port does Squid listen by default?

3128

You are configuring a database service and need to open the default port for MySQL. Which port is the default for MySQL?

3306

On what port does the slapd LDAP daemon listen for connections?

389

What is the maximum number of primary partitions available on an MBR partitioning system?

4

What is the default request size for ioping?

4 KB

Which HTTP status code is returned when TraceEnable has been set to Off within Apache?

405

Which port is the default base port for use with VNC?

5900

You are troubleshooting printer access on a Linux system. On which port does the CUPS printing daemon listen by default/

631

On which port does LDAP over SSL listen for connections?

636

How many SCSI devices are supported per bus?

7 to 15

What is the octal notation to specify that a directory should have read-write-execute permissions for the own and read-execute permissions for the group and other?

755

What permissions are required for a bash script to be executable by everyone?

755

Which partition type should be created for a Linux system, non-swap partitition?

83

Which signal number corresponds to SIGKILL?

9

Which address represents the localhost in IPv6, such as you might find in /etc/hosts?

::1

You are using the Vi editor to change a file, and you need to exist. You receive a notice indicating "No write since last change." Assuming you want to save your work, which command will save your work and exit Vi?

:wq

You would like to run several commands in succession but not have the output set into the next command. Which metacharacters will accomplish this task?

;

Which character is used to indicate the end of an individual clause within a case statement in a bash script?

;;

Which operator is used to redirect STDIN, such as when redirecting input from a file?

<

You need to replace redirect STDIN until a certain character combination is encountered. Which operator can be used for this purpose?

<<

Which character combination sets the body of the message to STDIN when using the mail command?

<<<

Which directive within Apache configuration file facilitates serving websites for more than one domain using a single IP address?

<VirtualHost>

Which of the following represents the correct format for the /etc/fstab file?

<device> <directory> <type <options> <dump> <fsck>

Within which stanza would you add a video device configuring Spice remote access?

<video>

You are writing a while loop in a bash script and need to compare two string values. Which operator is used for this purpose?

=w

You need to send output from a command to a log file. Overwriting the contents of the log file is acceptable. Which character is used to redirect output in such a way to fulfill this scenario?

>

You need to redirect output to a file, but rather than overwriting the exisiting file, the output should be appended instead. Which character combination is used to indicate that STDOUT should appended?

>>

You need to redirect the output from a command and append that output to a file Which character sequences accomplishes this task?

>>

You're working with a file using the less command and need to search for instances of string earlier in the file. Which key will search backward in the file?

?

Which best describes the status of SELinux when the command getenforce returns Permissive?

A Permissive return means SELinux is enabled, but rules are not enforced, although DAC rules are still in effect.

When working with TCP wrappers, which line within the /etc/hosts.deny file will prevent any host within the 192.168.1.0/24 network from accessing services that operate from xinetd?

ALL: 192.168.1.0/255.255.255.0

Which creates an array in a bash script?

ARRAY=(val1 val2)

Which message type(s) should be queried when looking for SELinux access denials or violations?

AVC, USER_AVC

You need to prevent local clients from going to a certain host, www.example.com, and instead redirect them to localhost. Which is a method to override DNS lookups for the specified host?

Add an entry for example.com in /etc/hosts to point to 127.0.0.1

Which characters are valid in hostnames in /etc/hosts?

Alphanumerics, minus, and dot

Which best describes the role of an agent in software orchestration?

An agent is software that listens for and executes commands from the server.

Which best describes the difference between a while and until loop in a bash script?

An until loop executes until a condition is true; a while loop executes until a condition is false.

Which package provides orchestration for Linux in an agentless manner?

Ansible

RADIUS provides AAA services for remote login. To what does AAA refer?

Authentication, Authorization, Accounting

You need to make a change to the configuration of the SSH daemon across your infrastructure. Being able to do so from a central server is an example of which type of automation?

Automated configuration management

Which type of virtualization hypervisor is considered a Type 1 hypervisor?

Bare-metal

Of the following choices, which size would be most appropriate for the /boot partition of a Linux system?

Between 100 MB and 500 MB

Which type of storage would be the most appropriate format to storage a large object as a single file in a cloud environment?

Blob

Which port(s) and protocols(s) should be opened in a firewall in order for the primary and secondary name servers to communicate for a given domain?

Both tcp/52 and udp/53

Compiling software when a developer commits code to a certain branch in a repository is an example of which type of automation?

Build

Which monitoring tool can use SNMP and scripts to collect data for performance-related graphic such as throughput and bandwidth?

Cacti

Which is a good first troubleshooting step when a hard disk is not detected by the Linux kernel?

Check the system BIOS

When working with a Microsoft Windows-based filesystem, you see that it is mounted as a CIFS mount. What does CIFS stand for?

Common Internet File System

You will be deploying a large server solution with Linux as the base operating system. The server resources will be split into multiple, smaller virtual servers running Linux and Windows. Which best describes the name for this type of server role and technology?

Containers

You are running a shell script from within your SSH session. Which key combination can be used to terminate the script?

Ctrl+C

You are troubleshooting a daemon process and have started the daemon manually from the command line so that it does not fork into the background. Which key combination can be used to terminate the daemon?

Ctrl+C

You have executed a daemon process manually from the CLI and now need to suspend the process. Which key combination can be used for this purpose?

Ctrl-Z

Which command will obtain the date in seconds since the epoch and place it into a variable called DATE within a shell script?

DATE="$(date +%s)"

Assuming X forwarding has been enabled on the SSH server, which environment variable is used to set the location for newly spawned windows from within an SSH session?

DISPLAY

Which best describes the difference between the DROP and REJECT targets in iptables?

DROP silently discards packets, while REJECT sends back an ICMP acknowledgment.

Which protocol provides datagram security?

DTLS

You are troubleshooting a directory permission issue. The directory and all subdirectories are owned by root. Within the top-level directory there is another directory that has 755 permissions on it. However, a non-root user cannot obtain a directory listing of that subdirectory. Which might be the issue?

Directory permissions inherit, so the top-level directory must be to set to disallow execute for the "other" permission.

When using the NX or NoMachine display for access, which configuration option sets the display port?

DisplayBase

When working with a network configuration, which refers to a computer with two network interfaces?

Dual-homed

When configuring an authentication server, which best describes the relationship between UIDs and GIDs on a Linux system?

Each user has a UID and GID that are the same and are created when the user is created.

When configuring environment parameters for use with systemd, what is the name of the key used to create the variables?

Environment

Which option within a systemd service file indicates the program to execute?

ExecStart

You are tasked with configuring a cluster server role using Red Hat Enterprise Linux. Which filesystem will most likely be used?

GFS

Which environment variable can be used to change the default path for a new git repository created with git init?

GIT_DIR

When using a Raspberry Pi with Raspbmc Linux, you need to configure the system to turn on an LED. Which is the interface typically use for this purpose?

GPIO

Which environment variable is used when changing directory with the tilde character, such as cd ~?

HOME

When viewing the results of a traceroute, you see !H. To what does !H refer?

Host unreachable

A drive connected to USB will be considered to be which type of device?

Hotplug

On which port does ICMP operate?

ICMP does not use ports

When troubleshooting a connectivity issue, you have found that you can reach a server via the Web but cannot ping it. Which best describes a possible cause for this scenario?

ICMP traffic has been blocked

Which class is the default class type queried by the host command?

IN

Which bootloader can be used to boot from ISO with ISO9660 with CD-ROMs?

ISOLINUX

Which best describes the use of the groupdel command?

If a user's primary group is to be deleted, that user be deleted first or have their primary group changed.

Which type of backup captures changes from the previous backup and only backs up those files that have changed?

Incremental

Being able to deploy additional servers in response to high demand or load is an example of which type of autmation?

Infrastructure

Determining the version of software installed on each client node is an example of collecting information for which collection in an automated infrastructure?

Inventory

Which term is used in orchestration and automation scenarios to refer to the collection of devices being managed?

Inventory

Which option describes the following gathered with the ls -la command? lrwxrwxrwx. 1 root root 35 Jul 8 2014 .fetchmailrc -> .configs/fetchmail/.fetchmailrc

It is a file called .fetchmailrc that is linked using a symbolic link

When using ls -la to obtain a directory listing, you see an oject with permissions of lrwxrwxrwx. What type of object is this?

It is a symlink

Which describes an OVA file?

It is a virtualization appliance file

You are debugging a bash script and notice a line that contains: echo $NUM #sending $NUM to output. What will be the result of this line when executed?

It will output the contents of the NUM variable

You have been asked to create a template for virtualization. The template will be in JSON format. Which is the correct name for JSON?

JavaScript Object Notation

Which option within an SSH server configuration enables authentication using Kerberos?

KerberosAuthentication

Which describes the relationship between anaconda and kickstart?

Kickstart is used to script an installation, which anaconda is used to install the system

You are building a configuration that requires bonded-link aggregation on the Linux server. Which protocol should the switch support in order to take advantage of aggregation?

LACP

Which value for the LANG environment variable will configure the system to bypass locale translations where possible?

LANG=C

Which value for the LANG variable will configure the system to bypass locale translations where possible?

LANG=C

If you need to temporarily reconfigure all locale variables and settings for a given session, which environment variable can be used?

LC_ALL

Which locale-related environment is used for currency-related localizations?

LC_MONETARY

Which locale-related variable is used for currency-related localization?

LC_MONETARY

Which environment variable controls the format of date and times, such as a 12-hour or 24-hour formatted block?

LC_TIME

Which environment variable controls the format of dates and times, such as a 12-hour or 24-hour formatted block?

LC_TIME

Which protocol provides a means for authentication to occur external to the Linux system?

LDAP

When working with disk partitions through a tool like fdisk, you see the type 0x82. Which type of partition is this?

Linux swap

When running mdam in monitor mode, which option within /etc/mdam.conf sets the destination for email if an issue is discovered?

MAILADDR

When compiling software such as with the gcc compiler, which is the recommended name for a file containing commands and relationships used with the make command?

Makefile

Which can be identified as an initial sector on a disk that stores information about the disk partitioning and operating system location?

Master Boot Record (MBR)

When configuring a monitor for use with X11, within which section should details of the monitor be changed?

Monitor

While configuring a network adapter with udev so that it has a specific and consistent name, you edit the udev rules file. Which option within the rules file ensures that the device will always have a name of eth0?

NAME="eth0"

Which describes the differences between NAT and bridging in a virtualization environment?

NAT uses the host adapter IP address for all network activity, while bridging enables the virtual machine to get its own IP.

Which option in /etc/sudoers will cause the specified command to not prompt for a password?

NOPASSWD

Which of the following is a valid variable declaration in a bash script, setting the variable NUM equal to 1?

NUM=1

You are troubleshooting a DNS problem using the dig command and receive a "status: NXDOMAIN" message. Which best describes what NXDOMAIN means?

NXDOMAIN means the domain or host was not found.

You have been asked to recommend a simple CLI-based text editor for a beginning user. Which should you recommend?

Nano

On which port does the ping command operate for ICMP echo requests?

No port is used for ICMP

Which, if any file extension is required in order for a bash script to execute?

No special extension is necessary.

Which program is used in a Gnome environment as a screen reader?

Orca

Which wildcard can be used in /etc/hosts.allow to specify a match for a host whose name does not match its IP address?

PARANOID

Which command adds ~/code/bin to the path?

PATH=~/code/bin:$PATH

Which key-derivation function is used by LUKS?

PBKDF2

Which format should the certificate and key be in a for a Postfix TLS configuration?

PEM

Which iptables chain is used to create a port redirect?

PREROUTING

Which best describes the PS1 environment variable?

PS1 is used to define the default shell prompt for bash

When using LDAP for authentication, what will be logged with the loglevel set to 0x10 in a slapd.conf configuration file?

Packets sent and received

Which best describes attributes of an inventory within an automated infrastructure?

Parameters such as the client IP address and software versions

What characters are used to mark a sequence of commands as a function within a shell script?

Parentheses to declare the function (optional), and curly braces to obtain the commands

Within an OpenSSH configuration, which option disables the use of empty passwords?

PermitEmptyPasswords

Which option within an OpenSSH server configuration is used to determine whether the root user can log in directly with an SSH client?

PermitRootLogin

Which option within the sshd_config file controls whether the root user can log in directly with SSH?

PermitRootLogin

You are using a container image for a cloud deployment and are building a stateful application that must store data between deployments. Which type of storage should be used?

Persistent volume

What is the logical order for creation of an LVM logical volume?

Physical volume creation, volume group creation, logical volume creation

What s the logical order for creation of an LVM logical volume?

Physical volume creation, volume group creation, logical volume creation

Which port should be allowed through a firewall for NTP communications?

Port 123

When using bash, how would you execute the last command starting with a certain string, even if that command was not the last one that you typed?

Precede the command with ! and then the string to search for.

A set of commands to execute on a client node is an example of which type of infrastructure automation?

Procedure

When working with PAM, a module that is marked as required has failed. Which best describes what happens to the other modules in that realm?

Process continues through other modules but ultimately fails

When using fdisk to partition a disk, you have two partitions created for the system but still have leftover space, also called unallocated space, on the drive. What is another name used to refer to unallocated space?

Raw device

Which process state indicates that the process is already running?

Re

When troubleshooting a file that is not found, you notice that the file location is linked as ../file.txt Which type of path has been used for this file?

Relative

During the initialization process for a Linux system using SysVinit, which runlevel corresponds to single user mode?

Runlevel 1

You have connected a USB disk to the system and need to find out its connection point within the system. Which is the best method for accomplishing this task?

Running dmesg and looking for the disk

Within the SELinux configuation, which option controls wheterh the policy will be targeted or strict?

SELINUXTYPE

One of your customers needs to transfer a large file and is asking for FTP to be enabled on the server. Thinking of security, what options can you offer that are more secure?

SFTP

Which is not a valid option for booting when using kickstart?

SFTP

When configuring PKI on a Red Hat system, which options are available as hashing algorithms when RSA is used as a key type?

SHA25withRSA

Which protocol is typically used for agentless infrastructure?

SSH

When configuring Apache for a web server role, which directives tells the server the location of the SSL private key?

SSLCertificateKeyFile

Which option enables SSL configuration for a given website or server?

SSLEngine

When working with an rpm package file and using rpm2cpio, by default the output is sent to which location?

STDOUT

Which section in /etc/X11/xorg.conf is used to describe configurations for a given graphics card monitor pair?

Screen

Two individuals within your organization share the same username and password for an administrative account. Which security best practice does this violate?

Shared IDs

During boot of a system with GRUB2, which key can be pressed to display the GRUB menu?

Shift

Which shell built-in can be used to move positional parameters down, where $2 becomes $1, and $3 becomes $2. and so on?

Shift

Within Gnome, you need to add the accessibility option known as sticky keys. Which key should be pressed five times in a row to enable sticky keys?

Shift

When creating a daemon process that will be used on the local server, which communication method should be used?

Socket

Using a system such as Google authenticator to provide two-factor authentication is an example of which type of token?

Software

Which characters are used to denote the beginning and end of the test portion of a while loop in a shell script?

Square brackets [ ]

What is one reason a device driver does not appear in the output of lsmod, even though the device is loaded and working properly?

Support for the device has been compiled directly into the kernel

Which is true of Linux swap space?

Swap is used as additional memory when there is insufficient RAM.

Which option in journald.conf controls the maximum file size for individual journal logs?

SystemMaxFileSize

You need to provide authentication for various network components like routers and switches within the enterprise network. Which authentication service can be added to the Linux server to facilitate this scenario?

TACACS+

Which protocol uses a three-way handshake?

TCP

When copying files using scp, which port needs to be open in the firewall?

TCP/22

When troubleshooting an issue where SSH connections are timing out, you think the firewall is blocking SSH connections. Which port is used for Secure Shell communication?

TCP/22

On which port does telnet operate?

TCP/23

You are deploying an Exim server ad need to work with the firewall to ensure that the proper incoming ports are open. Which protocol and port should you allow inbound for normal SMTP traffic?

TCP/25

Which environment variable can be set if you wish to automatically log users out of their shell after a certain period of inactivity?

TMOUT

Which line added to .profile in a user's home directory will set their time zone to Central time?

TZ='America/Chicago'; export TZ

What is the default delimiter used by the cut command?

Tab

Which best describes the /dev/ filesystem?

The /dev/ filesystem is used for storing device information for connecting devices?

A legacy PATA disk is used to boot the system. You recently added an internal DVD drive to the computer, and now the system will no longer boot. What is the most likely cause?

The BIOS has identified the DVD drive as the first disk, and therefore the system can no longer find the Linux partition(s).

When reviewing the available routes using the route command, one route contains flags UG while the others contain U. What does the letter G signify in the route table?

The G signifies that this is a gateway

When viewing the available routes using the route command, one route contains the flags UG and the others contain U. What does the letter G signify in the route table?

The G signifies that this is a gateway

What will be the result if the touch command is executed on a file that already exists?

The access timestamp of the file will change to the current time when the touch command was executed?

You are debugging a bash script written by a different system administrator. Within the script, you see a command surrounded by backquotes, or `. What will result with surrounding the command with backquotes?

The command will execute as if the $( ) command substitution was used

Within the following entry in /etc/shadow, to what does the number 15853 refer? mail:*15853:0:99999:7::::

The date of the last password change (since 1/1/1970)

Which best describes the result of the command cat /etc/passwd | cut -d: -f1 > users.txt

The first field will be extracted from the passwd file and placed into a file called users.txt

Which sequence is used to mark the beginning and end of the commands to execute within a for loop in a shell script?

The keywords do and done

Which best describes the concept of infrastructure as code?

The management of servers and other systems using scripting, source code management, and automation

When choosing a login type, which best describes the difference between the options titled Cinnamon and Cinnamon (Software Rendering)?

The option described as Software Rendering disables 3D acceleration

You have created a public key and private key for use with SSH. The contents of which key should be copied to a remote host in order to enable authentication?

The public key

You are troubleshooting an issue with HAProxy as a load balancer. Users are reporting that they have received a "400" response from the HAProxy server. What does a "400" response mean?

The request was invalid was invalid or too large.

A command has the following listing obtained with ls -la: -rwsr-xr-x 1 suehring suehring 21 Nov 2 13:53 script.sh

The suid bit has been set for this program.

Which describes a primary difference between traceroute and tracepath?

The tracepath command provides the MTU for each hop, whereas traceroute does not.

Which is an advantage of using an SSL-based VPN client?

The transport may be able to get around firewalls that otherwise block VPN traffic.

When running the lsblk command, there is no separate partition listed for /boot. From which partition is the system likely booted?

There is a /boot directory under the / partition

Which VPN mode is typically used for client-to-server VPN traffic?

Transport

On which port and protocol does OpenVPN listen?

UDP/1194

Which password can be used to secure a system such that it will not boot, even if the attacker has physical access to place a USB boot disk in the computer?

UEFI/BIOS password

Which encoding provides a multibyte representation of characters?

UTF-8

The Unity desktop is typically found on which distribution of Linux?

Ubuntu

When examining output from the state column of the ps command, there is a process with a state of D. What state is that process currently in?

Uninterruptible sleep

You believe that that the system has been broken into and files may have been changed. After taking the system offline and unmounting one of the affected partitions, what could you do next?

Use dd to make an image of the partition to preserve it

After inserting a new hard drive into the system, what is the correct order to make the drive ready for use within Linux?

Use fdisk to create partitions, then format the partitions using a command such as mkfs, and then mount the partitions

Which layer is used to enable client applications to work with disk devices in a standard way, regardless of disk architecture?

Virtual filesystem

What is the name of the environment variable that is set if your display is using Wayland?

WAYLAND_DISPLAY

When using a multipath device, found in /dev/disk/by-multipath, what is the name given to the identifier for that device that is globally unique?

WWID

Within the greeter section of a display manager such as GDM in Gnome, which option sets the welcome message for users logging in locally?

Welcome

Which describes a method for changing the sort rder when using the top command such that the highest memory utilizers will be show at the top of the list?

Within top, press Shift+F, scroll to %MEM, press S to select, and then press Q to quit.

Which option enabled in /etc/shd/sshd.conf (or /etc/ssh/sshd_config) on the destination server in order for X11 forwarding to work?

X11 Forwarding yes

Which option in the SSH configuration file needs to be enabled so that X sessions can be sent over SSH connection?

X11Forwarding yes

The default format for an OVF template uses which document standard?

XML

Files found within the /etc/netplan directory should be formatted using which syntax?

YAML

When using cloud-init for deployment of an EC2 instance, which format should be used for the configuration files?

YAML

When working with infrastructure as code, you received a file with .yml extension. What is the likely format for the contents of this file?

YAML

When expiring a user account with usermod -e, which represents the correct date format?

YYYY-MM-DD

You are collaborating on a coding project using git as the source code management tool. Teammates are saying that they cannot see your code, although you have been committing code regularly. Which is most likely the problem?

You have not executed git push to send code to the server.

Another administrator made a change to one of the local scripts stored in /usr/local/bin and used for administrative purposes. The change was also immediately reflected in the copy of the script in your home directory. However, when you examine the file with ls, it appears to be a normal file. What is the cause of such a scenario?

Your file is a hard link to the original.

Which file-globbing sequence will match all files that begin with an uppercase A or an uppercase F?

[AF]*

You need to print output from a bash script such that single quotes appear in the outputted string. Which character should be used as an escape sequence in order to get the single quotes into the output?

\

Which escape sequence is used to denote the alert or bell?

\a

Which character sequence is used to add a horizontal tab using echo with a bash script?

\t

Which command places all AppArmor profiles into complain mode?

aa-complain /etc/apparmor.d/*

Which command is used to turn off AppArmor profiles?

aa-disable

Which AppArmor command uses netstat to determine the network-related processes that do not have AppArmor profiles?

aa-unconfined

Which type of module interface for PAM is used to set a policy such as the time of day that a user can log in?

account

When creating a Squid proxy configuration, you need to create an access control list for the local network. Which configuration option creates an access control list for Squid?

acl

Which mode of network bonding used for an active/passive configuration?

active-backup

When configuring local user access, LightDM typically allows guest login by default. Which configuration option within SeatDefaults changes this to disallow guests?

allow-guest=false

Which command is used to view the mixer volumes when configuring audio with ALSA?

alsamixer

Which command will search for a package named zsh on a Debian system?

apt-cache search zsh

Which command updates the package cache for a Debian system?

apt-get update

You are attempting to install a new package on a Debian system from a repository. The package does not seem to exist. Which command updates the package cache for a Debian system?

apt-get update

Which command and option are used to update a Debian system to the latest software?

apt-get upgrade

You have replaced a device on the network but used the IP from another active device. Which command can be run to remove the MAC address entry from your computer so that it performs the address resolution again?

arp -d

Which command schedules a series of commands to execute one hour from now?

at now + 1 hour

Which command and option are used to update a Debian system to the latest software?

atp-get upgrade

Which command deletes an at job with an ID of 3?

atrm 3

Which daemon can be used to monitor the system for changes to system files?

auditd

Which utility can be used to find SELinux context violations?

ausearchd

Which mode is used for load balancing in a bonding scenario in Linux?

balance-rr

When creating a local package repository, which option within the .repo file in/etc/yum.repos.d/ is used to set the URL for the repository?

baseurl

Which command, when executed from within the UEFI shell, controls the boot configuration?

bcfg

Which command is used to identify the UUID for partitions?

blkid

Which command is used to create an ethernet bridge?

brctl

Which option within gdisk will change the partition name?

c

In the MATE desktop environment, which is the name of the file manager?

caja

Which command will provide the usernames in a sorted list gathered from the /etc/passwd file?

cat /etc/passwd | awk -F : '{print $1}' | sort

Which command will send the contents /etc/passwd to both STDOUT and a file called passwordfile?

cat /etc/passwd | tee passwordfile

Which command enables you to view the current IRQ assignments?

cat /proc/interrupts

You are looking to optimize the I/O scheduler for your Linux server. Which I/O scheduling algorithm is the default?

cfq

Assume that passwords must be changed every 60 days. Which command will change the user's last password change without the user actually changing the account password?

chage -d

Which command displays account information such as expiration date, last password change, and other related details?

chage -l

Which command can be used to set file attributes such as making a file immutable?

chattr

You need to change the SELinux security context of a file. Which command should be used for this purpose?

chcon

Which command will correctly change the group ownership of the file called a.out to users?

chgrp users a.out

You need to enable the web server (running as the www-data user and group) to write into a directory called /home/webfiles. Which command will accomplish this task in the most secure manner?

chgrp www-data /home/webfiles ; chmod 775 /home/webfiles

When sourcing a file in bash, which chmod command would be necessary to provide the minimum privileges in order for the file to be sourced correctly, assuming that your current user owns the file?

chmod 400

Which command changes a file called script.sh such that it can be executed by the owner of the file and no one else?

chmod 700 script.sh

Which command enables the sticky bit for a user on a file called homescript.sh?

chmod u+s homescript.sh

You have found that the owner of the Apache process is www-data. What command will change the ownership of a file, given as <filename>, such that www-data can write to the file?

chown www-data <filename>

Which git command is used to retrieve a repository from a remote server?

clone

Which subcommand to the virsh command is used to connect to the hypervisor?

connect

You need to extract files from a backup created with an older version of HPUX. The tar command does not seem to work for these files. Which may be able to extract from this backup?

cpio

Which command will list the cron entries for a given user as denoted by <username>?

crontab -l -u <username>

Which command is used to configure dm-crypt volumes?

cryptsetup

Which option to the area date command can be used to set the date and time?

date -s

Which command will create an image of the /dev/sda1 disk partition and place that image into a file called output.img?

dd if=/dev/sda1 of=output.img

You need to create a restrictive access control list (ACL) on a server. Which policy should be the default for the INPUT chain within the firewall?

deny

Which yum option displays the dependencies for the package specified?

deplist

Which command creates a list of modules and their dependencies?

depmod

Which command can be used to display the current disk utilization?

df

You are troubleshooting an issue with disk usage and suspect that the partition is out of inodes. Which command shows the usage of inodes across all filesystems?

df -i

You need to compare two files to determine if there are differences between them. Which command can be used for this purpose?

diff

Which dig command sends the query for example.com directly to the server at 192.168.2.5 rather than to a locally configured resolver?

dig example.com @192.168.2.5

Which command queries for the mail servers for the domain 'example.com'?

dig example.com mx

Which command queries for the mail servers for the domain example.com?

dig example.com mx

Which command displays the Start of Authority information for the domain example.com?

dig example.com soa

Which command requests a zone transfer of example.org from the server at 192.168.1.4?

dig example.org @192.168.1.4 axfr

Which command can be used to view the kernel ring buffer in order to troubleshoot the boot process?

dmesg

You have added a new RAID adapter to the system. Which command can be used to ensure that the adapter was detected by the kernel?

dmesg

You need to determine which video card is installed in a Linux system. Which command will help with this?

dmesg | grep -i vga

Which command can be used to obtain extended hardware information, including information about the motherboard?

dmidecode

Which pair indicates the beginning and end of an until loop in a bash script?

do; done

Which command within virsh obtains information about a domain?

dominfo

Which installs a previously downloaded Debian package?

dpkg -i <package name>

Which option installs a previously downloaded Debian package?

dpkg -i <package name>

Which command search for and provides information on a given package on a Debian system, including whether the package is currently installed?

dpkg -s

Which command searches for and provides information on a given package on a Debian system, including whether the package is currently installed?

dpkg -s

Which command should be used to make changes to the choices made when a Debian package was installed?

dpkg-reconfigure

When working with a CentOS 6 system, which command is used to create the initial RAM disk?

dracut

The system is running out of disk space within the home directory partition and quotas have not been enabled. Which command can you use to determine the directories that might contain large files?

du

The system is running out of disk space within the home directory partition, and quotas that have not been enabled. Which command can you use to determine the directories that might contain large files?

du

You need to change the label that has been applied to a filesystem. The filesystem is formatted as EXT4. Which EXT4 tool can be used to change the label?

e2label

You are writing a shell script using bash and need to print the contents of a variable. Which command can be used to do so?

echo

Which command enables forwarding such as would be used for NAT?

echo "1" > /proc/sys/net/ipv4/ip_forward

Which command displays the current path in bash?

echo $PATH

Which command can be used to prevent the root user from logging in at the console?

echo > /etc/securetty

Which command produces the output sit sat set?

echo s {i,a,e}t

Which command changes the boot order for the next boot?

efibootmgr -o

Which egrep command will examine /etc/passwd to find users that are either /bin/bash or /usr/bin/zsh for their shell environment?

egrp '/*/..?sh$.' /etc/passwd

Which keyboard is used to begin an alternate condition within a bash script?

elif

Which command can be used to execute a command with a customized environment?

env

You are troubleshooting an issue reported by a user and suspect it may be related to their environment variables. What command should the user run in order to view the current settings for their environment when using bash?

env

Which command removes an environment variable that has been set?

env -u

Which character sequence is used to terminate a case statement in a bash script?

esac

You are working with a network interface called ens3 and would like to determine which driver is being used for this device. Which command is valid for this purpose?

ethtool -i ens3

Which option in /etc/yum.conf is used to ensure that the kernel is not updated when the system is updated?

exclude=kernel*

Which command will execute a script and then exit the shell?

exec

Which command adds /usr/local/lib to the LD_LIBRARY_PATH when using the bash shell?

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

You need to declare a variable as part of the environment prior to running a bash script. Which command accomplishes this?

exportec

Which real filesystem can be resized using resize2fs?

ext3

Which describes a primary difference between ext2 and ext3 filesystems?

ext3 includes journaling for the filesystem

You have found that a SAT disk within a RAID array has gone bad. Which option to mdam removes the disk from the RAID array, placing it into a degraded state?

fail

What command is used to bring a command to foreground processing after it has been backgrounded with an &?

fg

Which character sequence indicates the end of an if conditional in a bash script?

fi

You have received a file that does not have a file extension. Which command can you run to help determine what type of file it might be?

file

Which command will find directories with names beginning with 2019 located beneath the current directory?

find ./ -type -name "2019*"

Which find command will locate files within the current directory that have been modified within the last 24 hours?

find ./ -type f -mtime 1

Which command searches a server for files with the setgid bit enabled?

find / -perm 2000

Which command searches the entire filesystem for files with the setuid bit set?

find / -perm 4000

Assume that you have deleted a user's account with UID 1501, including the -r option. Which command should you also run to look for other files that might been owned by the user?

find / -uid 1501

Which command searches each user's .bash_history file to determine if the user has invoked the sudo command?

find /home -name ".bash_history" | xargs grep sudo

You need to iterate through a directory listing and perform an operation on certain files within it. To accomplish this task, you will be using a bash script and a looping construct. Which looping construct is most appropriate for this purpose?

for

Assuming that a space-separated list of values has been defined as LIST="one two three four", which for loop constructs will iterate through the elements in the list?

for VAR in $LIST

Which can be used in Linux to provide biometric authentication?

fprint

Users are reporting that various programs are crashing on the server. Examining logs, you see that certain processes are reporting out-of-memory conditions. Which command can you use to see the overall memory usage, including available swap space?

free

Which options in /etc/fstab sets the order in which the device is checked at boot time?

fsck

Which command is used to remove unused filesystem blocks from thinly provisioned storage?

fstrim

When using sed for a substitution operation, which option must be included so that the substitution applies to the entire line rather than just the first instance?

g

Which command can be used to obtain more information about a GUID partition table?

gdisk

You need to determine whether LDAP integration is working correctly. In order to do so, you would like to obtain a list of users, as read by /etc/nsswitch.conf. Which command can be used for this purpose?

getent

Which command will enumerate the hosts database?

getent hosts

Which command is used to display information about the access control list for a given file?

getfacl

Which command changes the location to which HEAD is pointing with git?

git checkout

Which command creates a new branch called project1 and points the HEAD toward that branch?

git checkout -b project1

You need to make a change to your git environment because your email address has changed. Which command ensures that your new email address will be used for all subsequent commits?

git config user.email

You would like to examine the entries for a single file through the git commit_history. Which command should be used for this purpose, assuming a filename of nhl_score.php?

git log --follow nhl_scores.php

Assuming a remote name of origin, which git command can be used to obtain additional information about the remote?

git remote show origin

Which git command shows the current state of the working copy of a repository?

git status

Digital signatures can be provided in Linux through which command?

gpg

Which command generates a GnuPG key pair?

gpg --gen-key

You are configuring a DHCP server. Which command will examine the system log for information regarding DHCP activity?

grep -i dhcp /var/log/syslog

Which command can be used to search the contents of all files below your current location for files that contain the characters DB?

grep -r "DB" *

Which command retrieves the current group membership list for a user?term-764

group

Which configuration line in /etc/nsswitch.conf causes a lookup for group information to first use local files and then use LDAP?

group: files ldap

Which command adds a group?

groupadd

Which command changes a group called DomainAdmins to DomainUsers?

groupmod -n DomainAdmins DomainUsers

Which command installs GRUB into the master boot record (MBR) of the first SATA drive?

grub-install /dev/sda

Which command installs GRUB into the MBR of the second SATA disk?

grub-install /dev/sdb

Which command should be run after making a change to the /etc/default/grub file?

grub-mkconfig

Which command will send the output of the grub2-mkconfig?

grub2-mkconfig --output=/boot/grub2/grub.cfg

When using a shim for booting a UEFI-based system, which file is loaded after shim.efi?

grub64.efi

You have downloaded a source file with the extension .gz. Which command will uncompress the file?

gunzip

Which command will display the last 50 lines of you command history when using bash, ncluding commands from the current session?

history 50

Which algorithm must be used for rndc authentication when generating a key with dnssec-keygen?

hmac-md5

Which URL can be used to view a list of completed print jobs in CUPS?

http://localhost:631/jobs?which_jobs=completed

Which directive in a Squid configuration configures whether a given ACL can use the proxy?

http_access

Which site can you use to monitor for new security bulletins that have been reported using the CVE process?

https://cve.mitre.org

Which command is used to query and work with the hardware clock on the system?

hwclock

Which of the following commands sets the hardware clock to UTC based on the current system time?

hwclock --systohc --utc

You are configuring an RDMA interface. Which command displays information about InfiniBand devices?

ibstat

Which command displays the UID, primary group, and supplemental groups for a given user?

id

You are using an RSA-based key pair for SSH. By default, what is the name of the private key file in ~/.ssh?

id_rsa

Which statement can be used in a bash script to determine if variable $num1 is greater than $num2, assuming both variables contain integers?

if [ "$num1 - gt "$num2" ]

Which conditional in a bash script will test if the variable DAY is equal to SUNDAY?

if [[ $DAY == "SUNDAY" ]]

You are having difficulty with an interface on the server, and it is currently down. Assume that there is not a hardware failure on the device itself, which command and option can you use to display information about the interface?

ifconfig -a

Which command configures the eth0 device with an IP address of 192.168.1.1 in a /24 network?

ifconfig eth0 192.168.1.1 netmask 255.255.255.0

Which command displays network usage in a top-like interface?

iftop

When using the ip command, which protocol family is used as the default if not otherwise specified?

inet

You are creating a logging server. Which syslog level is used to provide informational messages?

info

You need to obtain information about a package installed on an OpenSUSE system that uses the zypper command. Which option to the zypper command displays information about the package?

info

Which command can be used to reboot a system?

init 6

Which command inserts a module into the running kernel but does not resolve dependencies?

insmod

Which option given to a yum command will install a given package?

install

Which option given to a yum command will install a package?

install

Which target for make, typically included in the makefile for most projects, will place compiled files into their final destination and perform other operations such as making the appropriate files executable?

install

Which command can be used to help diagnose latency issues with a disk?

ioping

Which command can be used to listen for netlink messages on a network?

ip monitor

Which command will change the default gateway to 192.168.1.1 using eth0?

ip route change default via 192.168.1.1 dev eth0

Which command should be executed after running ip route change?

ip route flush cache

Which command is used to measure network throughput?

iperf

Which software can be used in connection with iptables in order to more effectively block traffic from entire network ranges?

ipset

You would like to efficiently manage firewall rules so that you can define a group of IP addresses to which a single rule can be applied. Which command enables you to create a group of IP addresses?

ipset

What is the name of the firewall control software associated with Netfilter?

iptables

Which command sets the default policy for the INPUT chain to discard packets that don't have a specific rule allowing them?

iptables -P INPUT DROP

Which command lists the current iptables rules, while not attempting to resolve host or port names?

iptables -nL

Which command saves the current set of iptables rules into a file?

iptables-save

You suspect saturation is affecting network performance with your Linux server. Which command can be used to help determine the amount of traffic being passed through a given interface?

iptraf

You would like to monitor interrupt usage in real time on a Linux server in order to troubleshoot communication ports usage. Which command can be used for this purpose?

itop

When configuring WiFi, which command displays information such as link status about the wireless device wlan0?

iw dev wlan0 link

Which command is used for setting parameters such as the essid, channel and other related options for a wireless device?

iwconfig

You have backgrounded several tasks using &. Which command can be used to view the current list of tasks that have been backgrounded?

jobs

Which command is used to examine the systemd journal or log file?

journalctl

When troubleshooting disk usage, which command is used to determine the amount of disk space used by systemd journal logfiles?

journalctl --disk-usage

Which system logging facility is used for messages from the kernel?

kern

Which command is used to install a kernel into the /boot directory, using the files from /usr/lib/kernel?

kernel-install

Which command can be used to kill any process by using its name?

killall

When using Kerberos authentication, which command sows the ticket cache?

klist

When using KDE, which program provides magnification functionality?

kmag

Which command shows a list of failed login attempts?

lastb

Which command is used to determine the libraries on which a given command depends?

ldconfig

Which command is used to update the links and cache for shared libraries on the system?

ldconfig

Which command is used to determine the libraries on which a given command depends?

ldd

Which command will set the systemwide time zone to 'America/Los Angeles'?

ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

Which command can be used to indicate a local variable within a bash script?

local

A developer has created an application and wants to take advantage of syslog for logging to a custom log file. Which facility should be used for an application such as this?

local#

Which command is used to change the keyboard layout settings?

localectl

Which git command displays a short history of commits along with the commit ID?

log

Within a jail configuration for fail2ban, which configuration option sets the name and location of the log file to monitor for failures?

logpath

Which command places a file into the print queue?

lpr

Which PXE Linux binary file is required for booting from HTTP or FTP?

lpxellinux.0

The system you're working with recently had a hard drive failure, resulting in degraded storage. A new hard drive has been installed and had Linux restored from backup t the drive. However, the system will not boot and instead shows a grub > prompt. Within the grub > prompt, which command will show the current partitions as seen by GRUB?

ls

Which command and option are used to view the SELinux security context of a given file

ls -Z

Which command can be used to print the inode index number of files?

ls -i

You need to obtain a directory listing of all files and directories except those that begin with the letter p. Which command accomplishes this task?

ls -l [^p]*

Which option is used to display information about current file attributes?

lsattr

Which command prints device and partition information in a tree-like structure, including partition size and current mount status?

lsblk

Which command can be used to view information such as interrupts?

lsdev

Which command can be used to list all of the detected hardware within a system?

lshw

Which command can be used to obtain a list of currently loaded kernel modules?

lsmod

Which command is used to display the currently loaded modules on a running system?

lsmod

Which command displays the currently open ports and the process that is using the port?

lsof -i

Which command is used to obtain a list of USB devices?

lsusb

You are examining a problem report where a USB disk is no longer available. Which command is used to obtain a list of USB devices?

lsusb

Which command will retrieve information about the USB connections on a computer in a tree-like format?

lsusb -t

You have insert a USB Bluetooth device into the computer. Which command is used to determine if the device was detected?

lsusb | grep -i bluetooth

Which command is used to create a logical volume with LVM?

lvcreate

Which command is used to search for physical volumes for use with LVM?

lvmdiskscan

Which configuration option in /etc/logrotate.conf will cause the log to be emailed to [email protected] when the log rotation process runs for the selected log?

mail [email protected]

Which command can be used to gather and display statistics about mail processed on a server running sendmail?

mailstats

Which option in /etc/sudoers sets the destination address for administrative and security emails related to sudo?

mailto

You are upgrading the kernel that has been previously compiled on the same server. Which command incorporates the contents of the existing kernel configuration into the new kernel?

make oldconfig

You need to ensure that a service does not start on a systemd system. Which systemctl command should be used for this purpose?

mask

What is the name of the default branch in a git repository?

master

Which option within /etc/security/limits.conf is used to control the number of times a given account can log in simulatenously?

maxlogins

After fetching changes for a previously cloned git repository, which git command is used to incorporate those changes into the local copy?

merge

The current hierarchy on the server contains a directory called /usr/local. You need to create an additional directory below that called /usr/local/test/october. Which command will accomplish this task?

mkdir -p /usr/local/test/october

You need to create a new empty git repository called repo. Which sequence accomplishes this task?

mkdir repo;cd repo; git init --bare

Which command will create a btrfs filesystem on the first SATA drive?

mkfs.btr2fs /dev/sda

You are working with a legacy CentOS 5 system and need to re-create the initial RAM disk. Which command is used for this purpose?

mkinitrd

Which command is used to format a swap partition?

mkswap

Which command is used to determine the modules on which another module depends?

modinfo

Which command installs a kernel module, including dependencies?

modprobe

Which command is used to load a module and its dependencies automatically?

modprobe

Which command is a simple pager that is found on most Linux systems?

more

Which command will mount a USB device at /dev/sdb1 into the /media/usb directory, assuming a VFAT filesystem for the USB drive?

mount -t vfat /dev/sdb1 /mnt/usb

Which command mounts /dev/sda1 in the /boot partition?

mount /dev/sda1 /boot

Assuming that a USB disk contains a single partition and is made available on /dev/sdb, which command mounts the disk in /media/usb?

mount /dev/sdb1 /media/usb

Which command provides a live traceroute of the route between two hosts, updating the information for each hop in near real-time?

mtr

Which command displays path information for LUNs?

multipath -l

Which command will move all files with a .txt association to the /tmp directory?

mv *.txt /tmp

You are working with a MySQL database and need to read in several SQL commands from a file and send them into the MYSQL CLI for execution. You will be using STDIN redirection for this. Which command is correct, assuming a filename of customers.sql?

mysql < customers.sql

You need to deploy a monitoring solution that enables alerts with advanced scripted responses based on configurable performance conditions. Which software package performs these tasks?

nagios

Which configuration file is used as the default configuration for a BIND server?

named.conf

Which configuration line will set the DNS server to 192.168.1.4 using /etc/resolv.conf?

nameserver 192.168.1.4

Which option for netcat will create a server listening on port 8080?

nc -l -p 8080

Which command shows network services or sockets that are currently listening along with sockets that are not listening?

netstat -a

Which command shows the current default route without performing DNS lookups on the IP address(es) involved?

netstat -rn

When configuring a server for a mail server role, which command must you run after making a change to email aliases, assuming the server is running Postfix?

newaliases

Which command can be run to determine the default priority for processes spawned by the current user?

nice

Which command scans the IP address 192.168.1.154 for open ports?

nmap 192.168.1.154

Which of the Samba daemons is responsible for responding to NetBIOS name service requests?

nmbd

Which command provides a CLI interface into network manager?

nmcli

Which option within a logrotate configuration file disables compression of the log file?

nocompressB

You are running a process in the background and need the process to continue after you log out. Which command should be used to ensure that the process continues even after logout?

nohup

When running the NTP daemon, which command can you execute to work with the NTP server in an interactive mode?

ntpq

When editing with Vi, which command changes into insert mode and opens a new line below the current cursor location?

o

When creating a a certificate authority server role, which command generates a private key for use with SSL and places it into the file /etc/ssl/example.com.private?

openssl genra -out /etc/ssl/example.com.private

Which configuration lines in /etc/resolv.conf enables debugging?

options debug

Which PAM module provides a mechanism for checking and enforcing the strength of password in order to enforce a password policy?

pam_cracklib.so

Which PAM module is responsible for enforcing limits such as the maximum number of logins and CPU time used?

pam_limits.so

Which PAM module can be used for authorization and authentication?

pam_listfiles.so

Which PAM module prevents logins from accounts other than root when the file /etc/nologin exists?

pam_nologin.so

Which PAM module can be used to lock accounts after failed login attempts?

pam_tally2

Which PAM module is responsible for normal or standard password authentication?

pam_unix.so

Which command can be used to change the partitioning scheme for a disk, such as to change the size of existing partitions without deleting them?

parted

Which command can be used to trigger the kernel to update the partition table?

partprobe

Which command produces a report listing the last password change data for all users on the system?

passwd -a -S

You nee to set a bootloader password for GRUB. Todo so, which of the following configuration options should be set in /boot/grub/grub.conf?

password

When viewing information in /dev/disk/dev/by-path using the command ls -l, which filename represents a LUN from Fibre Channel?

pci-0000:1a:00.0-fc-0x500601653ee0025f:0x0000000000000000

You need to write a script that gathers all the process IDs for all instances of Apache running on the system. Which command will accomplish this task?

pgrep apache

You would like to find all of the process IDs associated with the sshd process on a Ubuntu system. Which command accomplishes this task?

pidoff sshd

Which command will emulate the ping command in Microsoft Windows, where the ping is sent for four packets and then the command exits?

ping -c 4

When configuring a server for an SNMP server role, which ports need to be allowed through the firewall for SNMP traffic?

ports 161 and 162

Which command causes the mail queue to be processed on a Postfix server?

postqueue -f

Which command can be used to print the contents of the current shell environment?

printenv

Which command can be used to print a specially formatted string?

printf

You need to view the SELinux contexts for various processes on the system. Which command will accomplish this task?

ps -Z

You are working on a Debian system and need to set ownership on a file such that the user used to execute Apache can write to the file. What command can you use to determine which user Apache is running as?

ps auwx | grep apache

You suspect that a third-party logging agent is using a significant amount of system resources. Which command could help troubleshoot this issue?

ps aux | grep <agent>

Which command can be used to find zombie processes?

ps | grep Z

Which file is used as the default storage for public keyrings for gpg?

pubring.gpg

Which command, when used with git, retrieves the latest objects from a repository and attempts to incorporate those changes into the local working copy of the repository?

pull

Which option within an OpenVPN configuration lets a client know that it can reach the network 192.168.5.0/24

push "route 192.168.5.0 255.255.255.0"

Which command initialized a physical disk partition for use with LVM?

pvcreate

Which command initializes a physical disk partition for use with LVM?

pvcreate

Which command displays information about a given physical volume in an LVM setup?

pvdisplay

Which of the following commands displays information about a given physical volume in an LVM setup?

pvdisplay

Which commands is used to display a list of physical volumes involved in LVM?

pvscan

When using PXE boot, which file must exist within /tftpboot on the TFTP server for the system that will use PXELINUX for its bootloader?

pxelinux.0

Which command is used to execute a check of user quotas on the filesystem?

quotacheck -u

Which command within a shell script awaits user input and then places that input into a variable?

read

Which shell built-in command is used to display a list of read-only variables?

readonly

Which target for the service command will cause a daemon to re-read its configuration files without restarting the daemon itself?

reload

You need to increase the performance of process ID 4382 by changing its priority. Which command will accomplish this task?

renice -5 -p 4382

Which command and option will output a summary of quota usage across all filesystems that are currently read-write with quotas enabled?

repquota -a

Which subcommand of openssl is used to create a Certificate Signing Request (CSR)?

req

You are attempting to use rmdir to remove a directory, but there are still multiple files and other directories contained within it. Assuming that you're sure you want to remove the directory and all of its contents, what are the command and arguments to remove the directory and all of its contents?

rm -rf

Which command is used to control a BIND name server?

rndc

Which command prevents traffic from reaching the host 192.168.1.3?

route add -host 192.168.1.3 reject

Which command adds a route to the server for the network 192.168.51.0/24 through its gateway 192.168.51.1?

route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.51.1

Which command adds a route to the server for the network 192.168.51.0/24 through its gateway of 192.168.51.1?

route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.51.1

Which command adds a default gateway of 192.168.1.1 for interface eth0?

route add default gw 192.168.1.1 eth0

Which command adds a default gateway of 192.168.1.1 for interface eth0?

route and default gw 192.168.1.1 eth0

Which command option for rpm can be used to show the version of the kernel?

rpm -q kernel

Which command displays the current runlevel for a system?

runlevel

You see the word defaults within /etc/fstab. Which options are encompassed within the defaults?

rw, suid, dev, exec, auto, nouser, async

Which command can be used to display historical performance data across several different parameters?

sar

You need to copy a file to a remote system, but that remote system does not have FTP or any other file-sharing services running. You have the ability to SSH into the server. Which command can be used for this purpose?

scp

You need to start a long-running process that requires a terminal and foreground processing. However, you cannot leave your terminal window open due to security restrictions. Which command will enable you start the process and return at a later time to continue the session?

screen

Assume that you want to enable local client services to go to hosts on the network without needing to fully qualify the name by adding the domain for either example.com or example.org. Which option in /etc/resolv.conf will provide this functionality?

search

Assume that you want to enable the local client services to go to hosts on the network without needing to fully qualify the name by adding the domain for either example.com or example.org. Which option in /etc/resolv.conf will provide this functionality?

search

Which option for yum performs a search of the package cache?

search

You need to find available packages on a Fedora system managed by the dnf package system. Which option to the dnf command looks for a given package?

search

After specifying the key server, which option to gpg is used to specify the key to send to the key server?

send-key

Which command will print a list of six numbers beginning at 0?

seq 0 1 5

When using nslookup interactively, which command changes the destination to which queries will be sent?

server

Which command can be used within the nslookup CLI to change the server to which the query will be sent?

server

You need to restart an Apache server running on an older, non-systemd distribution of Linux. Which command can be used to restart the Apache server, assuming that it has a name of apache2?

service apache2 restart

Which command can be used to prevent redirects from accidentally overwriting existing files?

set -C

Which of the following lines added to .profile in a user's home directory will set their time zone to Central time?

set TZ=/Central

Which command with hostnamectl can be used to set the type of machine on which it is running?

set-chassis

Assuming that the output from the sestatus command indicates that SELinux is in Permissive mode, which command is used to change the mode to Enforcing?

setenforce 1

Which utility can be used to create a checksum of a file in order to ensure its integrity?

sha1sum

When using the free command to determine memory usage, which column shows the memory used by the kernel for things like kernel buffers?

shared

When using UEFI, which file can be used as a bootloader?

shim.efi

Which option given at boot time within the GRUB configuration will boot the system into single-user mode?

single

You have lost the password for a server and need to boot into single user mode. Which option given at boot time within the GRUB configuration will start the system in single user mode to enable password recovery and/or reset?

single

The out-of-memory killer has been killing some processes on the system. Which columns within ps output are helpful for determining current memory usage for a given process?

size and rss

Assume that you have a file called zips.txt that contains several postal zip codes, and you need to determine how many unique zip codes that are in the file. Which command can be used for that purpose?

sort zips.txt | uniq -c

Which command can be used to add functions and variables to the current shell?

source

Which command is used to read and execute commands from a file in the bash shell?

source

Which command shows network sockets and their allocated memory?

ss -m

Your organization uses ssh-agent for authentication assistance with SSH. Which command can be used to add a private key to ssh-agent?

ssh-add

Which command sends a copy of the public key identity to another server for use with SSH?

ssh-copy-id

Which command is used to create a public/private key pair for use with SSH?

ssh-keygen

Which describes the primary difference between the configuration files ssh.conf and sshd.conf (typically found in /etc/sshd or /etc/ssh)?

sshd.conf is the configuration file for the system SSH daemon, and ssh.conf provides system-wide client SSH configuration.

Which option of the systemctl command will change a service so that it runs on the next boot of the system?

startonboot

When working in a virtual server environment, which column within iostat output shows the amount (percentage) of time spent in an involuntary wait scenario due to the hypervisor?

steal

Which service command is used to shut down a service?

stop

You need to execute a command as a specific user. Which command enables this to occur?

sudo -u

Which command removes an expiration from an account?

sudo chage -E -1 username

You need to allow a user to edit a file that is owned by root. Which command should be used for this purpose, assuming the use of sudo to execute the command?

sudoedit

Which configuration sets a hard limit of 25 processes for a user called suehring in /etc/security/limits.conf?

suehring hard nproc 25

Which commands deactivates swap space?

swapoff

You have added a swap disk to a Linux server and have execute mkswap. However, on examination of the output from the free command, the swap space is not being user. Which command do you need to execute?

swapon

Which command is used to configure kernel parameters for a new GPU driver added to the system?

systctl

Which command should you execute after making changes to the systemd service configurations in order for those changes to make effect?

systemctl daemon-reload

Which command can be used to stop a given service, such as httpd.service, from starting on boot with a systemd-based system?

systemctl disable httpservice

What is the command to display the default target on a computer running systemd?

systemctl get-default

Which command on a systemd-controlled system would place the system into single-user mode?

systemctl isolate rescue.target

Which command is used with systemd in order to list the available service units?

systemctl list-units

Which command can be used to restart CUPS on a server running systemd?

systemctl restart cups.service

When executed on a systemd-enabled server, the service status command is equivalent to which command?

systemctl status

Which command and option can be used to determine whether a given service is currently loaded?

systemctl status

You are attempting to stop a daemon on a system that previously used SysVinit but now uses systemd. Which is the correct command and order used to stop a service on this system?

systemctl stop <service>

Which command can be used to troubleshoot boot times of various services?

systemd-analyze blame

What is the name of the systemd service that provides logging facilities?

systemd-journald

Which command will watch the Apache log at /var/log/httpd/access.log and continually scroll as new log entries are created?

tail -f /var/log/httpd/access.log

You need to download source code for a package to install. The package has a .tgz file extension. Which command decompresses and unarchives the package?

tar -zcvpf

What is the default port for the CUPS administrative web interface?

tcp/631

You are receiving reports of timeouts from users attempting to SSH between servers. Which command should be used to help troubleshoot these reports?

tcptraceroute

Which command would you use if you make changes to the /etc/inittab file and want those changes to be reloaded without a reboot?

telinit

Which command can be used to determine how much time a Linux command takes?

time

Which command can be used to view the available time zones on a system?

timedatectl

You need to temporarily prevent users from logging in to the system using SSH or other means. Which describes one method for accomplishing this task?

touch /etc/nologin

Which command can be used to convert lowercase letters to uppercase letters across an entire file?

tr

Which command is used with udevadm to replay events?

trigger

When using the test built-in with one arguments, what will be the return if its argument is not null?

true

Which command can be used to capture network traffic in pcap format for later analysis by a tool like Wireshark?

tshark

Which command and option are used to set the maximum number of times a filesystem can be mounted between running fsck?

tune2fs -c

You are using a SAN that keeps causing errors on your Linux system due to an improper kernel module created by the SAN vendor. When the SAN sends updates, it causes the filesystem to be mounted as read-only. Which command and options can you use to change the behavior of the filesystem to account for the SAN bug?

tune2fs -e continue

You are using a storage area network (SAN) that keeps causing errors on your Linux system due to an improper kernel module created by the SAN vendor. When the SAN sends updates, it causes the filesystem to be mounted as read-only. Which command and option can you use to change the behavior of the filesystem to account for the SAN bug?

tune2fs -e continue

Which command and option are used to display the number of times a filesystem has been mounted?

tune2fs -h

Which shell built-in command can be used to determine the location from which a given command will be run?

type

When working with the udevadm command, you need to reload rules in order to add a new client device. Which option can be used to effect this change?

udevadm control -R

Which command is used to view kernel-related udev events in real-time?

udevadm monitor

When working with ufw, you need to allow SSH traffic. Which command facilitates this scenario?

ufw allow tcp/22

When creating a file, a user is receiving an error. The file is very large. What command can the user execute in order to determine the file size limitation?

ulimit

Which command will display the CPU time, memory, and other limits for the currently logged-in user?

ulimit -a

Which command removes a currently defined aliased command?

unalias

You need to remove a series of files programmatically through a script. Which command can be used to remove these files?

unlink

Which command will output a new GRUB2 configuration file and send the output to the correct location for booting?

update-grub > /boot/grub/grub.cfg

The locate command is reporting out-of-date information. Which command should be run in order to have the locate command update its database?

updatedb

Which command can be used to determine the current load average along with information on the amount of time since the last boot of the system?

uptime

You need to delete a user from the system, including their home directory. Which command accomplishes this task?

userdel -r

Which command locks out password-based login for a user but does not prevent other forms of login?

usermod -L

A user needs to work with printers and printer-related items. Which command adds the user (called username in the options) to the appropriate group for this purpose?

usermod -aG lpadmin username

Which command is used to change a user's home directory to /srv/data/username and move the contents at the same time?

usermod -d /srv/data/username -m

Which option is set on a filesystem in order to enable user-level quotas?

usrquota

Which commands looks for LVM physical volumes and volume groups involved in an LVM configuration?

vgscan

Which of the vmm(virt-manager) tools is used to install a virtual machine?

virt-install

Which command should be used to edit the /etc/sudoers file?

visudo

Which describes a difference between vmlinuz and vmlinux?

vmlinuz is compressed, whereas vmlinux is not

Which command displays blocks in and blocks out as related to I/O?

vmstat

Which command can be used to display a list of currently logged-in users along with the current load average and time since last reboot?

w

You need to examine who is currently logged in to the system. Which command will display this information?

w

Which group can be used to restrict access to execute the su command?

wheel

Which command can be used if you need to locate various elements of a given command, such as its binaries and man pages?

whereis

Which command can be used to determine the location of a given executable that would be run if typed from your current environment and location?

which

You need to create a bash script that will loop continually and perform some commands within the loop. Which line will accomplish this task?

while true; do

Which command displays a listing of who is logged in to the server along with the date and time they logged in?

who

Which command enables you to determine the username associated with your current user ID?

whoami

You need to determine the owner of an IP address. You have attempted to use nslookup to determine the hostname, but there was no PTR record for the IP. Which command can be used to determine who owns the IP address?

whois

What are the minimum permissions needed for a user to write into a directory for which they are not the owner and are not in a group that owns the directory?

write/execute

The xfs_info command is functionally equivalent to which command and option?

xfs_growfs -n

Which command allows a host named cwa to connect to the X server?

xhost +cwa

Which package provides an open source implementation of the Remote Desktop Protocol?

xrdp

You receive a file with a .lzma extension. Which command can you use to decompress this file?

xz

You need to use the output from a command as input for another command. Which character facilitates this scenario?

| (pipe)

Within a bash script, you need to run two commands, but only run the second command if the first fails. Which metacharacters can be used to accomplish this task?

| | (double pipes)

Within which file should you place public keys for servers from which you will accept key-based SSH authentication?

~./ssh/authorized_keys

You need to provide a special username and other parameters related to a specific host to which you connect usin SSH. To which file should you add this information?

~/.ssh/config


Conjuntos de estudio relacionados

12.35.F - Quiz: 12.35.M - 12.35.R (Includes Optional Quiz Review Materials)

View Set

Associate Contractors License Exam

View Set

Chapter 3: Creating Anglo-America, 1660-1750

View Set

Ch. 4 Quiz 4 (PSYC, 2013, NWACC)

View Set

Biology Study Guide 2 (3/3), Bio quiz 5,6,7,8

View Set

Self-Test, Ch. 6 - Missed Questions

View Set

Chapter 2 Quiz: Management Theory

View Set

Chapter 13: The costs of production

View Set

Recombinant DNA Methods: from Insulin to GMO's

View Set