Linux + CompTIA

Ace your homework & exams now with Quizwiz!

Leonard wants to find detailed information about the Bluetooth kernel module. Which of the following commands can he use to display this information?

modinfo bluetooth

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

modules

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

xargs

Archie wants to optimize an XFS filesystem and minimize the chance of future corruption. Which of the following commands will compact or otherwise improve the layout of the contiguous blocks of file data for an XFS filesystem?

xfs_fsr

Which of the following directories is created by default when an ext2, ext3, or ext4 filesystem is created on a device that is used by the fsck utility?

/lost+found/

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

/proc/meminfo

Under the root directory in Linux, which directory contains system commands and utilities?

/usr

Where are scheduled commands stored on Ubuntu Linux systems?

/var/spool/cron/atjobs

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

/proc/cpuinfo

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

if

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

ioports

Jamie has created a hard link to another file within the same directory. Which of the following commands can he use to verify that the hard link was created correctly? (Choose all that apply.)

ls -i ls -il

Which of the following commands can be used to see files that are currently being used by a specific process ID (PID)?

lsof

What PostgreSQL command-line utility backs up PostgreSQL database settings?

pg_dump

Which of the following options can be specified in the GRUB Legacy configuration file to set how long the boot menu is displayed before loading the default image?

timeout

Which of the following states describe a process that is waiting for a parent process to release its PID?

zombie

If incompatible X Windows settings are configured, where will the errors that are generated be written to?

~/.xsession-errors

What is the path to where the journald.conf file is located?

/etc/systemd/journald.conf

Lynn runs the locate command and the results include many files from a directory that she doesn't want to include in her search. Which of the following files could Lynn modify so that the locate command no longer includes those results?

/etc/updatedb.conf

Which of the following files stores information about failed logins on a Linux system?

/var/log/btmp

What zone configuration file contains a PTR record used to identify the loopback adapter?

/var/named/named.local

Where is the default document root directory for the Apache Web server?

/var/www/html

Which of the following umask settings will result in new files receiving the default permissions -rw-------?

0177

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

;

Which of the following commands will prompt to convert an MBR partition to GPT, thus destroying all existing MBR partitions on a disk?

gdisk

You want to determine whether your Linux workstation was able to get assigned an IP address from the DHCP server once you connected it to the network. Which of the following legacy commands might help you determine this?

ifconfig eth0

The system administrator has shut ethernet interface eth0 down while making some changes to the system. Which of the following commands can they use to bring the network connection back up?

ifup eth0

Which of the following commands can be used to show the block devices, including their major and minor numbers, on a system which are located in the /sys/block directory?

lsblk

Which of the following can be used to show the block devices on a Linux system? (Choose two.)

lsblk ls /sys/block

Which of the following commands can be used to display general hardware information for the entire system?

lshw

Which of the following commands can be used to create and activate a swap partition on a Linux system? (Each answer represents part of the whole.)

mkswap /dev/sda6 swapon /dev/sda6

Which of the following virsh commands will display the total amount of memory as well as the amount of free memory for a node?

nodememstats

Which of the following can be used preceding a command to prevent a process from terminating when the parent process terminates?

nohup

Which of the following permissions should a standard user have on the /etc/shadow file?

none

Which of the following are examples of multifactor authentication?

password and fingerprint reader

Which of the following types of servers can be used to cache requested Internet resources so that they can be more quickly delivered to users requesting the same resource while at the same time reducing the burden on the external network connection to the Internet for an organization?

proxy server

Which of the following server roles does Apache perform?

web server Apache is one of the most popular web server platforms on the Internet.

Which of the following is a special group that provides its members with the ability to run the su and sudo commands?

wheel

What FTP command runs a shell on the local computer?

!

What metacharacter indicates background command execution?

&

Select the regular expression metacharacter that matches 0 or more occurrences of the previous character.

*

Which of the following entries could be added to the rsyslog.conf configuration file to have all syslog messages displayed to console 10?

*.* /dev/tty10

Which of the following options will change the ownership of files and directories recursively within a directory? (Choose all that apply.)

--recursive -R

Which of the following options for the gpg command will attempt to use the gpg agent and if it cannot will ask for a passphrase?

--use-agent

Which of the following options for the iptables command will delete all rules for all chains?

-F

Which of the following RPM options will update a software package to the newest version, or install the package if it does not already exist on a system?

-U

In which of the following directories can you place files that will be copied to new user directories when new users are created?

/etc/skel

Where does the sudo command check to determine a user's privileges when they attempt to run the sudo command?

/etc/sudoers

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

2

Which of the following ports should you disable so that they no longer respond to network requests on a Linux system due to a lack of encryption? (Choose all that apply.)

21 23

Which of the following results from the nmap command would let an administrator know that they have an insecure service running on a Linux server?

23/tcp open telnet

If the physical extent of a volume group is set to 32MB, what is the maximum logical volume size?

2TB

The output of the ifconfig shows a HWaddr expressed in hexadecimal. How many bits is the hardware address shown made up of?

48

Which of the following ports would be used to resolve a domain name to an IP address?

53

If no level of compression is specified, the gzip command assumes what compression level?

6

At the vi command mode prompt, what key combination will force a quit from the vi editor without saving changes?

:q!

What metacharacter can be used to issue two commands to be run in consecutive order, without piping or redirecting output?

;

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

>>

When issuing the ls -F command, what special character indicates a linked file?

@

When using the vi text editor, which of the following keys, when in command mode, will change to insert mode and place the cursor at the end of the current line?

A

Which of the following file extensions are used by the Debian Package Manager?

.deb

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

.gitignore

Sandra needs to obtain the latest image of Fedora so that she can install it as a virtual machine on her Windows workstation. Which of the following file formats is Sandra likely to find available for download from Fedora's website in order to allow her to use the file as the source for booting and installing Linux as a VM?

.iso

Which of the following is not a valid compression file extension for the Linux operating system?

.vz

Upon running the ifconfig command, the IP address is listed along with the subnet mask in dotted decimal notation listed as 255.255.255.224. You have installed a remote access software that has an address field that requires the address to be configured in CIDR notation. Which of the following is the equivalent CIDR notation for the subnet mask listed?

/27

Which of the following is required as a separate partition in order to use LVM?

/boot

The System Log Daemon, rsyslogd, creates a socket for other system processes to write to. What is the path to this socket?

/dev/log

Which of the following would be the device file for the third partition on the second SATA drive on a Linux system?

/dev/sdb3

Which of the following is the full path and file name where the Debian Package Manager repositories can be configured?

/etc/apt/sources.list

A system administrator wants to allow most users to be able to run cron jobs, but wants to specifically prevent a couple of users from doing so. Which of the following files could the administrator edit to disallow these users from creating cron jobs?

/etc/cron.deny

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

/etc/profile /etc/profile.d/* /etc/bashrc ~/.bashrc

Which of the following files contain the path and filename where DNS servers should be configured?

/etc/resolv.conf

In order to move from the /home/joe/test/data to the /home/joe directory, what command should be issued?

cd ../..

Which of the following are valid permissions for a directory where the command chmod 1777 has been used to set the permissions on it?

drwxrwxrwxt

Which of the following commands will show a list of process names along with their process ID (PID)? (Choose two.)

ps top

What command is used to display the lineage of a process by tracing its PPIDs until the init daemon?

pstree

Mike has changed directory into one subdirectory after the next and has lost track of where he's at in the directory tree. Which of the following commands can he use to tell him the full path to the current subdirectory he is in?

pwd

What command can be issued to confirm which directory you are in at a command line prompt?

pwd

Which of the following commands will return one result of where the grep binary executable is located? (Choose two.)

which grep type grep

Which Linux command can be utilized to display your current login name?

whoami

Which of the following is the default desktop environment used by Linux Mint?

Cinnamon

The United States Air Force was able to install Linux on a popular gaming console and then connect over 1,700 of these systems together to work as one big supercomputer. Which of the following types of technologies did they implement?

Clustering

Violet wants to configure an encrypted partition to mount when her workstation boots up. Which of the following should she do?

Configure /etc/crypttab to open the volume and then /etc/fstab to mount it.

Which of the following key combinations, commonly used in the vi editor command mode, displays current line statistics?

Ctrl+_g

If a process state is currently showing as uninterruptible sleep, which letter will show in the output of the ps command?

D

In which of the following zones might a system administrator put the web server hosting the company's publicly accessible website?

DMZ

Which of the following SQL statements can be used to delete a table from adatabase?

DROP TABLE table_name;

Which of the following can be used to synchronize the time between a number of Linux servers and workstations on a network with a time clock source on the Internet?

NTP

Proxy servers keep track of the information passed to each client by maintaining what type of table?

Network Address Translation (NAT)

After compiling source code, which command still needs to be run in order to copy the newly compiled binaries into a directory listed in the PATH variable as well as copy supporting files (such as man pages) to the correct location on the filesystem?

make install

Dustin runs a command at the command line trying to find out what kernel version the system is running. However, it doesn't give him the information he needs. He knows there is an option that can be used to display the kernel version. How can he find out which option to use?

man uname

Select the utility below that will start and perform a thorough check of RAM for hardware errors when run.

memtest86

Which of the following files holds the configuration information for GRUB Legacy on Ubuntu Linux systems?

menu.lst

Which of the following commands can be used to determine the round trip time that a packet takes to traverse a network connection?

ping

Which of the following commands can be used to terminate a process by the process name?

pkill

Clint has run the command parted /dev/sdb and wants to display a list of the existing partitions that exist on that drive. Which of the following commands can he use to display the existing partitions?

print

Which of the following commands can be used to scan a filesystem for disk usage, create, check, and repair quota files?

quotacheck

While the top command is running, what key can be pressed to change the nice value of a process?

r

What command can be used to display the contents of a file that was compressed with the compress utility?

zcat

Which type of CM software can connect to inventory members via SSH to perform configuration management activities?

agentless

John has been using the cdrom on his computer that is running the Linux operating system. He pushes the eject button on the front of the drive, but it doesn't eject the disk. Which of the following commands should he run? (Choose all that apply.)

eject /media/cdrom umount /media/cdrom

Which of the following commands will display detailed information for network hardware?

ethtool

If the mkfs command is executed to create a filesystem and only the block device name is specified, which of the following filesystems will be created?

ext2

Which of the following commands can you use to list users who have been locked out by pam_faillock.so?

faillock

After a background process has been started, what command below can be used to move it to the foreground?

fg

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

git add

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

journald

Which of the following commands can be used for the command line version of a popular GUI-based program that is used to examine network traffic passing to and from a network interface?

tshark

Which of the following commands can be used to force udev to reload new rulesfrom the /etc/udev/rules directory? (Choose all that apply.)

udevadm control --reload udevadm contorl -R

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

unalias showauth

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

until ctrl-c is used to terminate it

Which of the following commands can be used to delete a user account?

userdel

When connecting to a host via SSH for the first time, the user is prompted to accept the encryption fingerprint for the target computer which is stored in ___________ in the ~/.ssh/ directory.

known_hosts

Which of the following commands will list missing libraries as not found if a necessary library is not installed?

ldd

In order to create and manage KVM or Qemu virtual machines, a Linux system must have which of the following installed?

libvert

Which of the following commands will show a number of environment variables that start with LC_?

locale

Which of the following two commands can be used to add custom log file entries to the journald database? (Choose two.)

logger systemd-cat

Which of the following commands can you use to send a print job to printer1? (Choose all that apply.)

lp -d printer1 mydocument.txt lpr -P printer1 mydocument.txt

Which of the following commands can be used to set the default printer for all users on a Linux system where printer1 is the name of the printer?

lpoptions -d printer1

Which of the following commands will display the print jobs in the print queuefor printer1 only?

lpstat -o printer1

Which of the following permissions would show for a symbolic link when displayed with the ls -l command?

lrwxrwxrwx

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

virtio

T he Linux kernel exists as a file named:

vmlinuz

Which of the following is a protocol originally developed by Cisco that uses TCP to handle authentication, authorization, and accounting services?

TACACS+

Which of the following can you use to start network daemons in order to limit which computers are allowed to connect to the network service?

TCP Wrapper

Which of the following is the default option for the kind of keys to be generated when using the gpg --gen-key command?

RSA and RSA

Which of the following commands can you use to view events within the journald database?

journalctl

In Linux, the core component of the GUI is known as:

X Windows

What piece of software tells the operating system how to use a specific hardware device?

Device Driver

What service provides a method for the efficient transfer of files over the Internet?

FTP. A recent protocol that focuses on secure file transfer is called SFTP based on FTP.

The iptables software on Linux is an example of what kind of software?

Firewall

Which of the following terms describes a type of useful and legitimate software that is distributed by a developer where they do not charge for the software but also do not distribute the source code along with it?

Freeware

When using the vi text editor, which of the following keys, when in command mode, will move to the last line in the document?

G

Which of the following is an on-screen keyboard used with Linux?

GOK

Which of the following statements should be used at the end of a SQL statement where an aggregate function such as SUM or COUNT is used?

GROUP BY

When working with Sendmail, what command can be used to test SMTP support?

HELO

Which of the following is the greatest expense for companies using Linux?

Hiring people to maintain the Linux system

Which of the following types of joins will return a record from two intersecting tables only if there is a match on the joining field from both tables?

INNER JOIN

Which of the following is a valid SQL statement for adding a new row of data to a SQL database table?

INSERT INTO users (firstname, lastname) values ('George', 'Washington');

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

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

Which of the following options is passed to the Linux kernel from the GRUB2 configuration file to set the locale?

LANG

Which of the following environment variables can you change the value of to set the default printer on a Linux system? (Choose two.)

LPDEST PRINTER

What two Linux distributions utilize the Debian package manager by default?

Linux Mint Ubuntu Linux

Which of the following would be a term applicable to an e-mail program on a workstation that is used to view email?

MUA. Mail User Agent

What DNS resource record type is used to provide the IP address for the e-mail server for a zone?

MX

The mutt software is an example of what type of mail service software on Linux?

Mail User Agent responsible to transferring and routing mail from sender to receiver.

When logging into a system, you are prompted to type in a code from a small token that you carry around with you. The code on this token constantly changes. What type of technology has been implemented?

OTP

When using command-line terminal, specific letters that start with a dash ("-") and appear after command names are considered to be:

Options

Aria has modified the hard disk that hosts the operating system by using the fdisk command. The fdisk command indicates that the new partition information must be manually reloaded. Which of the following should she do next? (Choose two. Either answer is independently correct.)

Reboot the system Run the partprobe command

What Linux distribution is the most commonly used distribution within organizations today?

Red Hat

Which kill signal terminates a process by taking the process information in memory and saving it to a file called core on the hard disk in the current working directory?

SIGQUIT

Which of the following types of cloud platforms would a webmail service offered to the general public be considered?

SaaS Software as a service as one of the three main categories of cloud computing. other two Iaas/PaaS

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

Segmentation fault

After logging into a terminal, a user will receive an interface known as which option?

Shell

Which of the following is a valid Linux initialization process?

SysV Systemd

Which of the following system variables can you modify to override the default system timezone within your current shell?

TZ

If enough unique letters of a directory name have been typed, what key can be pressed to activate the BASH shell's completion feature?

Tab

An archive of files that usually contain scripts that install the software contents to the correct location on the system is referred to as a:

Tarball

Which of the following does a Linux kernel use to store the value of epoch time?

The number of seconds since January 1, 1970

What would be the result of running the command chown :root file1.txt

This would set the group ownership to file1 to root

You have set up a TFTP server to support PXE booting of several workstations. Which of the following protocols would this setup make use of?

UDP

Which of the following is responsible for starting tasks and services during boot, stopping them during shutdown, and supervising them while the system is running?

Upstart

Which of the following can be used to graphically remotely administer a Linux machine?

VNC

Which of the following types of technologies will create a tunneled encrypted connection from a remote location into a corporate network to be able to access resources as if the user was physically connected to the LAN?

VPN

Which of the following are true of the echo command?

When used to display text, quotation marks are optional. Including a semicolon at the end of the line will not affect the text being displayed. It can be used to display shell variables by including a $ sign in front of the variable name.

Which of the following is a lightweight desktop environment that uses very few system resources that a system administrator might choose to install on a Linux server instead of one of the two main desktop environments?

XFCE

Which of the following commands will install an RPM package while ignoring any other packages that it may be dependent upon for proper operation?

YUM

Which of the following is a tool that can be used to search Internet software repositories for RPM packages that map to your system's architecture, and automatically install or upgrade those packages on your system?

YUM

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

ZFS volume

Which of the following package managers are used to install RPM packages on the SUSE or openSUSE distributions by default?

Zypper

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

\t

Which of the following can be used to mount a filesystem? (Choose all that apply.)

a device path such as /dev/sdb2 a filesystem UUID a filesystem label

Which of the following commands can you use to search available repository information? (Choose two.)

apt apt-cache

Which of the following Debian Package Management commands will install the newest versions of all packages that are currently installed on a system?

apt-get upgrade

Which of the following types of encryption uses a pair of keys known as a public and private?

asymmetric

Which of the following command can be used to remove a job from the list of pending jobs? (Choose all that apply.)

at-d atrm at -r

Which of the following commands will display a list of the pending jobs to be run? (Choose all that apply.)

atq at -q at -l

Which of the following commands can be used to display the filesystem and partition UUIDs on a Linux system?

blkid

If a Linux system is running as a virtual machine, it may be using a bridge for the virtual network adapter within the virtual machine to the physical network adapter. Which of the following commands can be used to view or modify the bridge configuration used by the Linux kernel for your network adapter?

brctl

A calendar for the current month can be shown on the command line by issuing which command?

cal

Which of the following results would be created by the command sequence:echo 'apple banana carrot dog elephant' | while read a b c; do echo result: $c $b $a; done

carrot dog elephant banana apple

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

cat /etc/passwd | grep jsmith

Which of the following will show account aging information for a user such as the date of the last password change, when the password expires, and the number of days of warning before the password expires?

chage -l jsmith

In order to set all of the special permissions on a certain file or directory, which command should be used on a file named filename?

chmod 7777 filename

Which of these commands will set the following permissions on file1.txt? User = Read, Write, Execute Group = Read, Execute Others = Read

chmod u=rwx, g=rx, o=r file1.txt chmod 754 file1.txt

Which of the following commands will display the number of seconds that have elapsed since January 1, 1970?

date +%s

Which of the following types of CM software only requires that you specify the attributes that the inventory members must have within a configuration file, not the individual procedures that must be executed on them?

declaritive configuration

Which of the following commands can be used to remove a group from a Linux system? (Choose all that apply.)

delgroup groupdel

Emily accidentally created a new user account on the wrong server. Which of the following commands could she use to delete the account she created? (Choose all that apply.)

deluser userdel

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

depmod

Kate wants to compare two text files to identify what might have been changed from one version to another. Which of the following commands can she use to do this?

diff document1.txt document2.txt

Which of the following commands will display messages that were displayed during the boot sequence by the kernel?

dmesg

Which of the following commands will list the BIOS information about a device when it cannot otherwise be detected by a Linux system?

dmidecode

Which of the following is the log file where Dandified YUM writes its log entries?

dnf.rpm.log

Which of the following commands can be used to only show jobs that have been paused.

job -s

Which of the following is the log file where the Debian Package Manager writes entries for actions taken and packages installed?

dpkg.log

Which of the following commands when run from the /, or root, directory will return a very long list of many pages of results?

du

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

echo $?

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

echo $CREATOR

The quotas for certain users can be edited by using which command?

edquota

Which of the following commands can be used to view the quota for a user?

edquota -u jsmith

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

git pull origin master

Which of the following commands will generate a GPG public/private key pair?

gpg --gen-key

Garrett wants to search through a csv file to find all rows that have either the name John or Bob in them and display them out to the terminal. Which of the following commands could Garrett use to perform this search?

grep -E "(John|Bob)" salesemployees.csv

Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplansto start storing the initial project plans for projectx. However, this is the first project she has worked on in 2019 and the 2019projects directory does not exist yet. Which of the following commands will create the higher level directories if they do not already exist?

mkdir -p ~/2019projects/project/projectplans

Which of the following commands will generate a new initramfs?

mkinitrd dracut

Which of the following hashing algorithm commands reduces the chances of collisions due to the bit length of the message digest?

sha256sum

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

sort /etc/passwd

Which of the following commands can be used to display socket information out to the terminal screen?

ss

What option can be added to the dpkg command to remove a specified package from the system, including any configuration files used by the package?

-P

What option can be used with the ps command to display an entire list of processes across all Terminals, including daemons?

-e

Callie wants to make sure that a filesystem is checked every 20 days. Which of the following options, when used with the tune2fs command, would set a full filesystem check to run every 14 days?

-i 14d

Which of the following can be used for comparing values within an if statement?(Choose two.)

-lt =

When using the compress command to archive a set of files into a single file, which of the following options will display the compression ratio of the individual files making up the new compressed file?

-v

In which directory would a system administrator store scripts that should be run monthly by the cron daemon?

/etc/cron.monthly

Jackson wants to automatically mount a secondary internal hard drive when his Linux workstation boots up. In which of the following files should he configure an entry for the partition on the drive that he wants to mount?

/etc/fstab

Which file should be configured so that quotas are enabled at boot time?

/etc/fstab

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

1 through 7 being displayed one number per line

Which of the following is the highest value that can be set for the nice valuewhich would result in a greater chance of a lower priority?

19

Which of the following types of DNS records need to be configured to facilitate email delivery?

CNAME

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

CREATOR="Torvalds"

When viewing the version number for a Linux kernel, what number indicates the stability of the kernel?

Minor number

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

chroot

Which of the following is used on modern Linux distributions that reads YAML configuration files to add apps, modify existing configuration settings, or perform administrative tasks at boot time?

cloud-init

Which of the following commands can be used to back up files in case of system failure, supports long filenames, and can also back up device files?

cpio

You have run the top command successfully, but realize that the q key on the keyboard has suddenly stopped working. What is another way that you can exit out of the top program?

ctrl-c

Which of the following commands can be used to pause a printer named Printer1?

cupsdisable Printer1

Which command can be used at a BASH command prompt to obtain a Web page?

curl

After a shell is no longer needed, what command can be given to exit the shell?

exit

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

fi

Which of the following is the keyword that should be listed after the hosts statement in the /etc/nsswitch.conf file so that the system will consult the /etc/hosts file to resolve a name to an IP address?

files

Which of the following commands can be used to recursively search a directory tree for files that meet a certain criterion without using a database or premade index of files?

find

Which of the following will display entries from the Name Service Switch libraries?

getent

Chase is trying to extract records for employees 423 through 428 out of a commaseparated values file and store them in another one. Which of the following commands would accomplish this?

grep "42[3-8]" < employees.csv > employees-newhires.csv grep "42[3-8]" employees.csv > employees-newhires.csv cat employees.csv | grep "42[3-8]" > employees-newhires.csv

Jo has received a text file which contains multiple instances of his name spelled correctly as well as multiple instances spelled as Joe. Which of the following commands would search a text file for any occurrences of either spelling and display them out to the terminal? (Choose three.)

grep -E "Joe?" document1.txt grep -E "Joe*" document1.txt grep "Joe*" document1.txt

Which of the following commands will not interpret regular expressions, which translates into faster results being returned? (Choose all that apply.)

grep -F fgrep

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

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

You run the command hostname server1 and issue the reboot command. You notice that the host name has reverted back to what it was before the reboot. Which of the following commands should you have used to change the host name instead?

hostnamectl set-hostname server1

What command can be used to view and modify the date and time within the BIOS?

hwclock

Which of the following can be used to compare the hardware clock to the system clock, writing a new result to a new line every 10 seconds?

hwclock -c

Which of the following is a type of software that allows a piece of hardware to host multiple operating systems?

hypervisor

Which of the following commands can be used to convert files between different character encodings?

iconv

Wayne is using the command line and is in his home directory. Which of the following will display a list of all files and their sizes from his home directory? (Choose two.)

ls -al~ ls -al /home/wayne

Nicholas wants to verify whether a file is a hard link to a file within the same directory. Which of the following commands could he use to see information that would be helpful to make this determination?

ls -i

What command can be used to check different kinds of filesystems on Linux for errors?

lsblk

What command looks for a Makefile and uses the information within it to compile the source code into binary programs using the appropriate compiler program for the local hardware architecture?

make

The apropos list command produces the same results as which command below?

man -k list

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

mdadm

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

mkdir newdir && cd newdir mkdir newdir; cd newdir

Which of the following are valid statements in the /etc/resolv.conf file? (Choose two.)

nameserver 10.1.1.4 domain comptia.org

Which of the following commands will show active UDP connections on a Linux system? (Choose all that apply.)

netstat -u netstat --udp

After modifying the /etc/aliases file, what command must be run in order to rebuild the aliases database?

newaliases

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

nl /etc/passwd

Which of the following utilities can be used by a system administrator to determine which services are responding to network requests?

nmap

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

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

Which of the following commands will delete a directory and all of the files contained within it? (Choose all that apply.)

rm -rf olddir

Which of the following commands will show the current runlevel along with the previous runlevel? (Choose all that apply.)

runlevel

What command is most effective at identifying different types of files?

stat

Which of the following is a virtual filesystem that is made up of virtual files that a Linux operating system is able to export information to about kernel sub-systems, hardware devices, and device drivers to make it easy for users to access the information?

sysfs

Which of the following commands will set the default runlevel of a Linux system?

systemctl set-default runlevel5.target

Which of the following commands will display a list of Systemd units sorted by the time they took to load?

systemd-analyze blame

To display a text file in reverse order, what command should be used?

tac

What command can be used to display the last five lines of a text file?

tail -5

Which of the following options for the tar command will create an archive that isalso gzipped while displaying all of the work in progress to the terminal screen?

tar -czvf

Which of the following commands will shut down a Linux system? (Choose all that apply.)

telinit 0 poweroff

Which of the following commands can be used to trace an IPv6 route? (Choose two.)

traceroute6 tracepath6

Which of the following commands can be used to set the number of days until user account jsmith with an expired password is disabled?

usermod -f 15 jsmith

In which file can you configure rules for logging on a Linux system?

/etc/rsyslog.conf

Which of the following files does the hostnamectl command modify to set the hostname on a machine?

/etc/hostname

On a system running SysV init, which of the following files can you edit to disable the ability to reboot by using the Ctrl+Alt+Delete key combination?

/etc/inittab

Which of the following files is where the default runlevel is set on some Linux systems?

/etc/inittab

Which of the following files is a binary file that contains the rules for calculating the time based on your time zone relative to epoch time?

/etc/localtime

In addition to /etc/localtime, some Linux distributions also have an /etc/timezone text file that contains a reference to the correct time zone file contained in which directory?

/usr/share/zoneinfo

What directory under / contains the log files and spools for a Linux system?

/var

What is the complete path and filename for the database that is used by the locate and mlocate commands?

/var/lib/mlocate/mlocate.db

Jan needs to set permissions on a file so that the owner has read, write, and execute permissions. The group should have read permissions only, and everyone else should have no access. Which of the following parameters, when used with the chmod command, would set the permissions described?

740

Which of the following can be used at the command line to download a file using the HTTP protocol? (Choose two.)

curl wget

Which of the following commands can be used to recursively search through the directory tree in search of a file that meets a set of given criteria instead of using an indexed database?

find

What argument can be used with the chmod command to add read permission and remove write permission for a group on a file?

g+r-w

Which of the following log files contains information and error messages generated by the Linux kernel?

kern.log

Which of the following will invalid entries in the GRUB2 configuration cause?

kernel panic and halt the system

Which of the following commands will send a process's resources to /dev/null to kill the process for process ID 1357?

kill -9 1357

A government office wants to secure a few of its Linux systems so that they can only use certain USB devices. After plugging in a USB device, which of the following commands could be used to detect certain identifying information that can be used to only allow that type of USB device?

lsusb

Which of the following commands can be used to display any email messages awaiting delivery alongside the reason that they were not delivered?

mailq

What ftp command uploads the filename from the current directory on the local computer to the current directory on the remote computer and allows the use of wildcard metacharacters to specify the filename?

mput filename

Which of the following is the default window manager used by the GNOME version 3 desktop environment?

mutter

Which of the following commands allows a standard user to execute a single command as root without actually switching to the root account?

sudo

Which of the following commands will prompt you to answer a series of questions to help determine which time zone file you should use?

tzselect

Jean installs a distribution of Linux on a workstation and attempts to run the locate command to find a certain file. Instead of returning the results she expected, an error message is displayed that it cannot find the mlocate.db file in its default location. Which of the following commands should Jean run in an attempt to resolve this problem?

updateb

Which of the following commands will allow an administrator to edit the list ofpermissions assigned to a user wanting to run the sudo command?

visudo

Which of the following utilities will allow you to view information about virtual memory usage on a Linux system?

vmstat

Which of the following commands can be used to schedule very frequent recurring tasks, such as running once every minute?

watch

If someone tries to log into a system using a daemon account, but the daemon account does not have a valid shell assigned to it, they would normally see a standard warning. If you want to customize the error, which of the following files can you put a message in that will display upon an attempted login?

/etc/nologin.txt

You currently have a Linux system configured to check the /etc/hosts file before trying to contact a DNS server to resolve host names. You want to reverse the configuration so that it checks with a DNS server before falling back to the /etc/hosts file. Which of the following files should you modify to make this possible?

/etc/nsswitch.conf

What is the complete path and filename of the file where ports and their associated protocols are defined? ___________

/etc/services


Related study sets

Lecture 4: Books of Prime Entry, Control a/c, Correction of Errors & Computerised Acc.

View Set

Chapter 9 - The Judiciary (Court System)

View Set

Ch 3 Types of Business Ownership

View Set

Human Biological Variation Midterm

View Set

Retail Image: Layout and Visual Merchandising

View Set

Chapter 5: Life History- Growth and Development

View Set

AP Human Geography Unit 5 quizlet

View Set

ICND 1 Chapter 4 (Fundamentals of IPv4 addressing and routing)

View Set