CNM345 Final Exam

Ace your homework & exams now with Quizwiz!

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

/dev/log

You plug a USB flash memory drive into a system that has two SATA hard disks. How will the partition on this USB flash memory drive be identified by Linux?

/dev/sdc1

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

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

CREATOR="Torvalds"

A device file _______________________. (Choose all that apply.)

Displays a major and minor number in place of a file size Has no data section

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

FTP

Character devices typically transfer data more quickly than block devices. True or False?

False

The less command offers less functionality than the more command. True or False?

False

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

Firewall

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

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

What software type is distributed free of charge, but the source code is not available?

Freeware

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

Hiring people to maintain the Linux system

The vi editor can function in which two of the following modes? (Choose both that apply.)

Insert Command

After typing the ls -a command, you notice a file whose filename begins with a dot ( . ). What does this mean?

It is a hidden file.

After typing the ls -F command, you notice a filename that ends with an * (asterisk) character. What does this mean?

It is an executable file.

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 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

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

Mail User Agent

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

Minor number

A user runs the fsck command with the -f option on an ext4 filesystem that is showing signs of corruption. How would that user locate any files the system was unable to repair?

Mount the filesystem and check the lost+found directory underneath the mount point

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)

How can you specify a text pattern that must be at the beginning of a line of text using a regular expression?

Precede the string with a ^

How can a user switch from insert mode to command mode when using the vi editor?

Press the esc key

Which of the following statements are true? (Choose all that apply.)

Soft limits allow a user to exceed them for a certain period of time Quotas can limit both user space and the number of files a user can own Hard limits can never be exceeded

What is the most commonly used LAN protocol?

TCP/IP

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

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

/etc/systemd/journald.conf

Which of the following is an absolute pathname?

/home/resume

Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command?

/, /proc, and swap

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

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

Linux has only one root directory per directory tree. True or False?

True

The lvextend command can be used to add unused space within a volume group to an existing logical volume. True or False?

True

Which command is used to display the amount of free space that exists on a filesystem?

df

You want to see the filesystems that are in use on the system. What command could you use? (Choose all that apply.)

df -T cat /etc/mtab

The tac command _________.

displays the contents of a file in reverse order last line first and first line last

What does the command dumpe2fs -h do?

displays the number of used and available inodes for an ext2/ext3/ext4 filesystem

What does the du -s /varcommand do?

displays the total size of the /var directory

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

dnf.rpm.log

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

domain comptia.org nameserver 10.1.1.4

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

dpkg.log

Which command can be used to repair an XFS filesystem?

e2fsck /dev/sdb1

Which command is used to format a partition on a hard disk drive with the ext4 filesystem?

e2mkfs -t ext4 device

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

What will the following wildcard regular expression return: file[a-c]?

filea, fileb, filec

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 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

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

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 you use to view events within the journald database?

journalctl

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 queue for printer1 only?

lpstat -o printer1

Which of the following commands will send 4 ICMP echo requests to a remote host named server1 to determine the round trip time it takes a packet to travel?

ping -c 4 server1

Which command would a user type on the command line to find out the current directory in the directory tree?

pwd

What will typing q! at the : prompt in command mode do when using the vi editor?

quit without saving any changes

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

seq 10 -1 1

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

sort /etc/passwd

A user types the command head /poems/mary. What will be displayed on the terminal screen?

the first 10 lines of the file mary

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

traceroute6 tracepath6

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

xargs

Which of the following is the first field of the /etc/passwd file?

username

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

/etc/rsyslog.conf

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

/etc/services

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

Device driver

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

.gitignore

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

#

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 can be used with the usermod command to change the description of the user account that is stored in the GECOS field?

-c

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

-lt =

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

/etc/hostname

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

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

/var/log/btmp

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 a valid APIPA address?

169.254.38.101

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

2

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

>>

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

Asymmetric

Jim has just installed two new SAS SSDs in his system. He properly installs the hardware in his machine. Before he can use them for data storage and retrieval, what must he do? (Choose all that apply.)

Create one or more partitions on each of the SSDS Mount any partitions created on the two SSDs such that they are accessible by the operating system Format any partitions created on the SSDs with a valid filesystem recognized by Linux.

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

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

Red Hat

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

SaaS

A directory is a type of file. True or False?

True

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

A user mounts a device to a mount point directory and realizes afterward she needs files previously found within the mount point directory. What should this user do?

Unmount the device from the directory

What must you do to successfully run the fsck command on a filesystem?

Unmount the filesystem

Which of the following statements regarding LVM structure is correct?

VGs are comprised of one of more PVs

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

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

X Windows

Using wildcard metacharacters, how can you indicate a character that is not an a or b or c or d?

[!a-d]

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

\t

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

a semicolon

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

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

Which 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

A user typed in the command pwd and saw the output: /home/jim/sales/pending. How could that user navigate to the /home/jim directory?

cd ../..

If a user's current directory is /home/mary/project1, which command could she use to move to the etc directory directly under the root?

cd /etc

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

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

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

cupsdisable Printer1

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

ethool

After a partition on a hard disk is formatted with a filesystem, all partitions on that hard disk drive must use the same filesystem. True or False?

false

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 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

Which of the following commands can only be used to create partitions on a GPT hard disk?

gdisk

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

getent

Which of the following will display the contents of the /etc/shadow file? (Choose all that apply.)

getent /etc/shadow cat /etc/shadow

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

git add

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

git pull origin master

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

groupdel delgroup

Which of the following commands can a user run to display the groups that they are a member of?

groups

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

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

kern.log

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

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 command mounts all existing filesystems in /etc/fstab?

mount -a

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

netstat --udp netstat -u

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

On a system running NetworkManager, which of the following commands can be used to view or modify connection information?

nmcli

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

A special device file is used to ___________.

represent hardware devices such as hard disk drives and ports

If "resume" is the name of a file in the home directory off the root of the filesystem and your present working directory is home, what is the relative name for the file named resume?

resume

Which of the following is a valid method of running a script named myscript.sh? (Choose two)

source myscript.sh ./myscript.sh

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

ss

Which command searches for and displays any text contents of a binary file?

strings

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

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.)

userdel deluser

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

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

wc -l data.csv

Which of the following server roles does Apache perform?

web server

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

wheel


Related study sets

Chapter 78 & 80 Nervous & Sensory System Disorders Review

View Set

USDA Loans & Ch 6A Nontraditional Financing Tools-Buydowns and ARMs

View Set

Chapter 07 Mediated Communication and Social Media

View Set

Intro to Criminal Justice chapter 2

View Set

Intermediate Swim team Vocabulary quiz words

View Set

Organizational Behavior Quizzes for final exam study guide

View Set

Microeconomics Homework 2 and Quiz 2 Practice Review

View Set

Intro to liability (Liability - KY)

View Set

Sec 2 Biology (Transport in plants)

View Set