CTS1111 Midterm SG

Ace your homework & exams now with Quizwiz!

What two Linux distributions utilize the Debian package manager by default? Select one or more: a. Ubuntu Linux b. Red Hat Linux c. Linux Mint d. SUSE Linux

Ubuntu Linux Linux Mint

Which of the following represents stderr at the command line when used for redirection? Select one: a. 2 b. 0 c. 1 d. 3

2

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? Select one: a. a b. I c. i d. A

A

In the following command, what do we call the part in blue? ls -a /home/jsmith/private Select one: a. argument b. option

argument

Assume there is a file named green_file within your current working directory. What command would you use to rename this file blue_file?

mv green_file blue_file

Which of the following files can you add filenames to so that the git add * command will not stage them? Select one: a. .ignore b. .gitnopush c. .gitignore d. .nopush

.gitignore

The Filesystem Hierarchy Standard specifies what directory as the root user's home directory? Select one: a. /boot b. /home/root c. /root d. /bin

/root

Under the root directory in Linux, which directory contains system commands and utilities? Select one: a. /usr b. /boot c. /opt d. /var

/usr

Which of the following can be used for comparing values within an if statement? (Choose two.) Select one or more: a. -neq b. -lt c. -grt d. =

= -lt

Which of the following redirection symbols should be used to append the results to an existing file (preserving the contents)? Select one: a. &> b. > c. >> d. 2>

>>

Which of the following will take output from a command and append it to the end of a file? Select one: a. > b. < c. >> d. <<

>>

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? Select one: a. .tgz b. .zip c. .iso d. .tar.gz

.iso

Which of the following would be the device file for the third partition on the second SATA drive on a Linux system? Select one: a. /dev/sdc2 b. /dev/sdb3 c. /dev/hdb3 d. /dev/hdc2

/dev/sdb3

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? Select one: a. /etc/mtab b. /etc/ftab c. /etc/crontab d. /etc/fstab

/etc/fstab

Which file should be configured so that quotas are enabled at boot time? Select one: a. /etc/quotas b. /etc/edquota c. /etc/fstab d. /etc/fsq

/etc/fstab

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? Select one: a. /etc/locate.conf b. /etc/locatedb.conf c. /etc/updatedb.conf d. /etc/locate.d/updatedb.conf

/etc/updatedb.conf

What is the complete path and filename for the database that is used by the locate and mlocate commands? Select one: a. /etc/mlocate.db b. /etc/locate/mlocate.db c. /var/lib/mlocate/mlocate.db d. /var/lib/locate/locate.db

/var/lib/mlocate/mlocate.db

Which of the following umask settings will result in new files receiving the default permissions -rw-------? Select one: a. 0688 b. 0188 c. 0177 d. 0600

0177

If the physical extent of a volume group is set to 32MB, what is the maximum logical volume size? Select one: a. 1TB b. 2TB c. 512GB d. 256GB

2TB

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? Select one: a. 740 b. 620 c. 026 d. 047

740

What metacharacter can be used to issue two commands to be run in consecutive order, without piping or redirecting output? Select one: a. & b. \ c. | d. ;

;

Which of the following can be used to mount a filesystem? (Choose all that apply.) Select one or more: a. A filesystem nickname configured in /etc/mtab b. A filesystem UUID c. A filesystem label d. A device path such as /dev/sdb2

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

Which of the following are true of the echo command? Select one: a. When used to display text, quotation marks are optional. b. All of the other options are true. c. It can be used to display shell variables by including a $ sign in front of the variable name. d. Including a semicolon at the end of the line will not affect the text being displayed.

All of the other options are true

What piece of software tells the operating system how to use a specific hardware device? Select one: a. Device driver b. System service c. User interface d. Graphical user interface

Device driver

What service provides a method for the efficient transfer of files over the Internet? Select one: a. HTML b. Telnet c. FTP d. SMTP

FTP

The iptables software on Linux is an example of what kind of software? Select one: a. Anti-virus b. Proxy c. Routing d. Firewall

Firewall

What software type is distributed free of charge, but the source code is not available? Select one: a. Shareware b. Closed source software c. Freeware d. Open source software

Freeware

Which of the following is the greatest expense for companies using Linux? Select one: a. Hiring people to maintain the Linux system b. Software upgrades c. Operating system cost d. Additional software

Hiring people to maintain the Linux system

Which of the following would be a term applicable to an e-mail program on a workstation that is used to view email? Select one: a. MUA b. MDA c. MBR d. MTA

MUA

The mutt software is an example of what type of mail service software on Linux? Select one: a. Mail Transfer Agent b. Mail User Agent c. Mail Delivery Agent d. Mail Transport Agent

Mail User Agent

What Linux distribution is the most commonly used distribution within organizations today? Select one: a. SuSE b. Mandrake c. Red Hat d. Debian

Red Hat

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.) Select one or more: a. Run the parted command b. Reboot the system c. Run the partprobe command d. Run the cfdisk program

Run the partprobe command Reboot the system

Which of the following types of cloud platforms would a webmail service offered to the general public be considered? Select one: a. PaaS b. SaaS c. IaaS d. MaaS

SaaS

After logging into a terminal, a user will receive an interface known as which option? Select one: a. Shell b. Swap memory c. User interface d. Processor

Shell

If enough unique letters of a directory name have been typed, what key can be pressed to activate the BASH shell's completion feature? Select one: a. Ctrl b. Tab c. Alt d. Esc

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: Select one: a. Package manager b. Router c. DBMS d. Tarball

Tarball

If a hard link is created to a file and then the original file is deleted, which of the following is true? Select one: a. The original file will be removed while the hard link remains usable to access the contents of the file. b. Both the original file and the hard link are removed. c. An error message will be displayed preventing the deletion of the original file. d. The original file will be removed while the hard link remains, though the content will not be accessible.

The original file will be removed while the hard link remains usable to access the contents of the file.

What would be the result of running the command chown :root file1.txt Select one: a. This would set the owner of file1.txt to root. b. This would set the owner and group ownership of file1 to root. c. This would keep the current ownership of the file, and add root as a second owner of the file. d. This would set the group ownership of file1 to root.

This would set the group ownership of file1 to root.

In Linux, the core component of the GUI is known as: Select one: a. KDE b. X Windows c. Red Hat d. GNOME

X Windows

Which of the following types of encryption uses a pair of keys known as a public and private? Select one: a. SHA1 hashing b. asymmetric c. message digest d. symmetric

assymmetric

Inorder to move from the /home/joe/test/data to the /home/joe directory, what command should be issued? Select one: a. cd ../.. b. cd ./.. c. /home/joe d. cd ..

cd ../..

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? Select one: a. chmod 6666 filename b. chmod 777 filename c. chmod 7777 filename d. chmod 0000 filename

chmod 7777 filename

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? Select one: a. clustering b. herding c. cloud computing d. group computing

clustering

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? Select one: a. compare document1.txt document2.txt b. match document1.txt document2.txt c. diff document1.txt document2.txt d. version --compare document1.txt document2.txt

diff document1.txt document2.txt

Which of the following are valid permissions for a directory where the command chmod 1777 has been used to set the permissions on it? Select one: a. trwxrwxrwx b. drwxrwxrw- c. drwxrwxrwt d. Srwxrwxrwx

drwxrwxrwt

Which of the following commands when run from the /, or root, directory will return a very long list of many pages of results? Select one: a. df b. du c. ls -al d. fdisk --list

du

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? Select one: a. ext3 b. ext2 c. ext4 d. exFAT

ext2

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? Select one: a. search b. locate c. where d. find

find

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? Select one: a. find b. mlocate c. locate d. where

find

Which of the following commands will display all files and directories within the /var/log directory or its subdirectories which are owned by the root user? (Choose two.) Select one: a. find /var/log -user root b. find -path /var/log -user root c. find -uid root -print /var/log d. find -user root -print /var/log

find /var/log -user root

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? Select one: a. shareware b. malware c. tryware d. freeware

freeware

What command can be used to check different kinds of filesystems on Linux for errors? Select one: a. fsck b. errorchk c. chkdsk d. fs_check

fsck

What argument can be used with the chmod command to add read permission and remove write permission for a group on a file? Select one: a. g-r+w b. u+r+w c. o+r-w d. g+r-w

g+r-w

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? Select one: a. egrep (John|Bob) salesemployees.csv b. grep -E (John|Bob) salesemployees.csv c. grep (John|Bob) salesemployees.csv d. grep -E "(John|Bob)" salesemployees.csv

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

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.) Select one or more: a. ls -al b. ls -il c. ls -l d. ls -i

ls -i ls -il

Select the command that can be used to provide a long listing for each file in a directory: Select one: a. ls -F b. ls -T c. ls -I d. ls -L

ls -l

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.) Select one or more: a. ls -ax ~ b. ls -al ~ c. ls -al /home/wayne d. ls -ax

ls ~ ls -al /home/wayne

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? Select one: a. ls -al /sys/block b. lsblk c. lsblock d. cat /sys/block

lsblk

Which of the following can be used to show the block devices on a Linux system? (Choose two.) Select one or more: a. ls /sys/block b. lsblk c. cat /proc/block d. ls /etc/block

lsblk ls /sys/block

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? Select one: a. man uname b. ver --help c. lsproc -? d. help version

man uname

Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplans to 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? Select one: a. mkdir --all ~/2019projects/project/projectplans b. mkdir -v ~/2019projects/project/projectplans c. mkdir -p ~/2019projects/project/projectplans d. mkdir -r ~/2019projects/project/projectplans

mkdir -p ~/2019projects/project/projectplans

Which of the following commands cannot be used to create an exFAT filesystem on a USB thumb drive that is recognized as /dev/sdb? Select one: a. mkfs.exfat /dev/sdb1 b. mkexfatfs /dev/sdb1 c. mkfs exfat /dev/sdb1 d. mke2fs.exfat /dev/sdb1

mkfs exfat /dev/sdb1

Which of the following commands can be used to scan a filesystem for disk usage, create, check, and repair quota files? Select one: a. quota b. chkquota c. edquota d. quotacheck

quotacheck

What command can be used to display the last five lines of a text file? Select one: a. stop -5 b. tail -5 c. end -5 d. head -5

tail -5

The Linux kernel exists as a file named: Select one: a. vmlinuz b. krn.linux c. vmlinux d. kernel.0

vmlinuz

Which of the following server roles does Apache perform? Select one: a. name server b. mail server c. certificate authority d. web server

web server

Which of the following commands will return one result of where the grep binary executable is located? (Choose two.) Select one or more: a. which grep b. type grep c. find grep d. locate grep

which grep type grep

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? Select one: a. fsck b. defrag c. xfs_fsr d. xfs_db

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? Select one: a. /var/tmp/ b. /var/crash/ c. /proc/tmp/ d. /lost+found/

/lost+found/

Which runlevel reboots the system? Select one: a. 1 b. 3 c. 6 d. 5 e. 0

6

Linux commands entered via the command line are not case sensitive. Select one: True False

False

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? Select one: a. > b. % c. # d. $

#

What metacharacter indicates background command execution? Select one: a. ! b. & c. @ d. ^

&

Select the regular expression metacharacter that matches 0 or more occurrences of the previous character. Select one: a. * b. ? c. + d. ^

*

Which of the following options will change the ownership of files and directories recursively within a directory? (Choose all that apply.) Select one or more: a. -r b. --follow c. -R d. --recursive

--recursive -R

What directory under / contains the log files and spools for a Linux system? Select one: a. /var b. /opt c. /boot d. /usr

/var

segmentation fault

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

journald

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?

libvert

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

Which of the following will the split command do on a file when no other options are specified? Select one: a. It will split a file into new files that are 1 kilobyte each. b. It will split a file into new equally sized files that are 1/10th of the original file size. c. It will split a file into new files that are 1 megabyte each. d. It will split a file into new files that are 1,000 lines each.

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

modinfo bluetooth

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

Linux was developed by ______________ to resemble the ______________ operating system. Select one: a. Linus Torvalds, GNU b. Linus Torvalds, MINIX c. Richard Stallman, GNU d. Richard Stallman, MINIX

Linus Torvalds, MINIX

When viewing the version number for a Linux kernel, what number indicates the stability of the kernel? Select one: a. Revision number b. Production kernel number c. Minor number d. Major number

Minor number

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? Select one: a. SFTP b. NTP c. IMAP d. SMTP

NTP

Proxy servers keep track of the information passed to each client by maintaining what type of table? Select one: a. Caching b. Network Address Translation (NAT) c. Firewall d. Routing

Network Address Translation (NAT)

Match the file with the order in which the BASH shell environment files are read: /etc/profile, /etc/bashrc, ~/.bashrc, /etc/profile.d/*

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

chroot

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.

sysfs

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?

nodememstats

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

Which of the following is the common escape sequence to display a horizontal tab using the echo command? Select one: a. \tab b. ?tab c. %tab d. \t

\t

The Linux operating system is ___________________.

open source software

Which Linux command can be utilized to display your current login name? Select one: a. whoami b. id c. w d. who

whoami

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 a valid method of running a script named myscript.sh? (Choose two) Select one or more: a. source myscript.sh b. run myscript.sh c. ./myscript.sh d. exec ./myscript.sh

./myscript.sh source myscript.sh

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? Select one: a. -d 14 b. -i 14 c. -i 14d d. -i 336

-i 14d

Which of the following is required as a separate partition in order to use LVM? Select one: a. /boot b. /tmp c. /var d. /home

/boot

Which of the following would be the results of running the command seq 7? Select one: a. 6 through 0 being displayed one number per line. b. 7 through 1 being displayed one number per line. c. 0 through 6 being displayed one number per line. d. 1 through 7 being displayed one number per line.

1 through 7 being displayed one number per line.

What is a daemon?

A daemon is a system process that performs key tasks like printing, maintenance or scheduling. The first daemon on the system is the init daemon, which loads all of the other daemons that are necessary to make the system usable.

lsusb

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?

Which of the following commands can be used to create a BASH variable named CREATOR with the value of Torvalds? Select one: a. CREATOR = "Torvalds" b. set $CREATOR = "Torvalds" c. CREATOR="Torvalds" d. var CREATOR as "Torvalds"

CREATOR="Torvalds"

target ID

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

The author of your textbook provides the following seven Linux Advantages: Risk Reduction Meeting business needs Stability and security Flexibility for different hardware platforms Ease of customization Ease of obtaining support Cost reduction Choose two (2) and in your own words briefly describe these advantages including a real world example.

Stability and security: Linux is more secure because it is open-sourced. This means that more developers have access to the Linux source code and can quickly eliminate security bugs as they appear. Cost reduction: There is no operating system and the costs of administration, additional software and upgrades are either free or low cost. Most of the software run on Linux is open-source, so there is no cost.

Consider the following shell script:What would be displayed if a user executes this shell script and answers Blue when prompted? Select one: a. The code would cause an error. b. The answer is red or blue. c. The answer is not red nor blue. d. The answer is red or blue. The answer is not red nor blue.

The answer is not red nor blue.

/proc/meminfo

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?

mdadm

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

ioports

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

modules

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

ZFS volume

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

depmod

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

lshw

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

dmesg

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

cat /proc/cpuinfo

Which of the following commands will display the current CPU(s) detected by a Linux system?

Hypervisor

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

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? Select one: a. a semicolon b. a colon c. a comma d. a pound sign

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? Select one: a. create showauth='tail -f /var/log/auth.log' b. ln showauth='tail -f /var/log/auth.log' c. new showauth as 'cat -f /var/log/auth.log' d. alias showauth='tail -f /var/log/auth.log'

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

Which of the following commands can be used to display the filesystem and partition UUIDs on a Linux system? Select one: a. fatlabel b. blkid c. e2label d. showpart

blkid

In vi editor, which key combination do we use to save and exit? Select one: a. ctrl-c b. :q c. :wq d. :q!

c. :wq

A calendar for the current month can be shown on the command line by issuing which command? Select one: a. cal b. w c. date d. id

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 Select one: a. carrot dog elephant apple banana b. carrot dog elephant banana apple c. elephant dog carrot d. apple banana carrot dog elephant

carrot dog elephant banana apple

Assume there exists a file named data.txt within your current working directory. Which command would you issue to print the entire contents of data.txt to the terminal?

cat

Which of the following commands will send the output of the cat command to the grep command to be filtered? Select one: a. cat /etc/passwd | grep jsmith b. cat /etc/passwd >> grep jsmith c. cat /etc/passwd @ grep jsmith d. cat /etc/passwd > grep jsmith

cat /etc/passwd | grep jsmith

Chase is trying to extract records for employees 423 through 428 out of a comma separated values file and store them in another one. Which of the following commands would accomplish this? (Choose all that apply.) Select one or more: a. grep "42[3-8]" < employees.csv > employees-newhires.csv b. grep "42[3-8]" employees.csv > employees-newhires.csv c. cat employees.csv | grep 423,424,425,426,427,428 > employees.csv d. cat employees.csv | grep "42[3-8]" > employees-newhires.csv

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

What command would you issue to change directories to the parent directory of the directory you are currently working in?

cd ..

Assume there exists a file named passwords.txt within your current working directory. What command would you issue to set the permissions on this file to rw-r----- such that: the owner of the file can read and write the group can only read others have no permissions

chmod u+r+w-x, g+r-w-x, o-r-w-x

Which of these commands will set the following permissions on file1.txt? User = Read, Write, Execute Group = Read, Execute Others = Read Select one or more: a. chmod 754 file1.txt b. chmod o=rwx,g=rx,u=r file1.txt c. chmod u=rwx, g=rx, u=r file1.txt d. chmod file1.txt 754

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

What command would you issue to view a list of currently mounted filesystems? Hint: There are multiple ways to do this, and thus I will accept many different answers as correct.

df -T

Write the command that would print the following sentence to the terminal (exactly as it appears below): When I graduate I hope to make a lot of $$

echo "When I graduate I hope to make a lot of \$\$"

Which of the following commands will display the exit status of the last command used in the BASH shell? Select one: a. echo $status b. echo $? c. echo $exit d. echo $!

echo $?

You have just created a variable named CREATOR. Which of the following commands will display the contents of the variable to standard output? Select one: a. echo $CREATOR b. disp $CREATOR c. print CREATOR d. echo CREATOR

echo $CREATOR

The quotas for certain users can be edited by using which command? Select one: a. repquota b. chquota c. edquota d. usrquota

edquota

After a shell is no longer needed, what command can be given to exit the shell? Select one: a. quit b. reset c. exit d. stop

exit

Users enter commands directly to the kernel of the Linux operating system. Select one: True 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? Answer: ________________________________

fi

Which of the following commands will prompt to convert an MBR partition to GPT, thus destroying all existing MBR partitions on a disk? Select one: a. gfdisk b. cfdisk c. gdisk d. iconv

gdisk

Which of the following commands should you use to specify that you want to use Git for version tracking on them? Select one: a. git track b. git new c. git version d. git add

git add

Which command can be used to download an updated copy of the master branch from the original Git repository? Select one: a. git pull master original b. git pull master origin c. git pull origin master d. git pull original master

git pull origin master

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.) Select one or more: a. grep "Joe?" document1.txt b. grep -E "Joe*" document1.txt c. grep -E "Joe?" document1.txt d. grep "Joe*" document1.txt

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

You work as a Linux system administrator for a small business. The company has a web server that records every login attempt to a custom log file named log_file.txt. There has a been a recent security breach, and your boss has asked you to generate a list of all failed login attempts in this log file. Below is an example of what the first 10 lines of this log file might look like: What grep command would you issue to generate a list of failed login attempts?

grep "login:fail" login_log.txt

Which of the following commands will not interpret regular expressions, which translates into faster results being returned? (Choose all that apply.) Select one or more: a. egrep b. grep -F c. fgrep d. grep

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? Select one: a. cat /etc/passwd | grep root >> ~/root.txt b. grep root /etc/passwd | split ~/root.txt c. cat /etc/passwd | grep root | merge ~/root.txt d. grep root /etc/passwd | tee ~/root.txt

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

Each operating system that is run within virtualization software is called a virtual machine, and the underlying operating system running the virtualization software is called the virtual machine ___________. Select one: a. home b. host c. root d. guest

host

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? Select one: a. if b. when c. comp d. where

if

Which of the following commands will create a symbolic link named foo.txt to an original file named bar.txt Select one: a. ln bar.txt foo.txt b. ln -h foo.txt bar.txt c. ln -s bar.txt foo.txt d. ln foo.txt bar.txt

ln bar.txt foo.txt

Which of the following permissions would show for a symbolic link when displayed with the ls -l command? Select one: a. lrwxrwxrwx b. -rw-r--r-- c. srwxrwxrwx d. srw-r--r--

lrwxrwxrwx

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? Select one: a. ls -s b. ls -al c. ls -l d. ls -i

ls -i

Which command would you issue to generate a long listing for each file in the current working directory, like the example shown below?

ls -l

The apropos list command produces the same results as which command below? Select one: a. man -j list b. man -m list c. man -l list d. man -k list

man -k list

Select the utility below that will start and perform a thorough check of RAM for hardware errors when run. Select one: a. fixram b. fsck c. memtest86 d. memcheck68

memtest86

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.) Select one or more: a. mkdir newdir; cd newdir b. mkdir newdir || cd newdir c. mkdir newdir >> cd newdir d. mkdir newdir && cd newdir

mkdir newdir && cd newdir mkdir newdir; cd newdir

Assume you have the following files and directories within your current working directory: You are doing some clean up and want to move all of the project files into the Project directory. What command can you use to move all of the project files displayed above into the Project directory?

mv project* Project

Jim wants to rename a directory for a project that he has been working on. Which of the following commands can he use to perform that action? Select one: a. rename projectx projecty b. ren projectx projecty c. mv projectx projecty d. move projectx projecty

mv projectx projecty

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? Select one: a. nl /etc/passwd b. ln /etc/passwd c. numbers /etc/passwd d. wc -l /etc/passwd

nl /etc/passwd

In the following command, what do we call the part in blue? rm -rf /home/jsmith/private Select one: a. option b. argument

option

When using command-line terminal, specific letters that start with a dash ("-") and appear after command names are considered to be: Select one: a. Keywords b. Options c. Metacharacters d. Arguments

options

Filenames for hidden files start with a __________ character. Select one: a. underscore (_) b. pipe (|) c. period (.) d. dash (-)

period(.)

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? Select one: a. display b. print c. disp d. list

print

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? Select one: a. DNS server b. DHCP server c. file server d. proxy server

proxy server

If you ever forget where you are at within the filesystem, which command will print the absolute path of your current working directory to the terminal?

pwd

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? Select one: a. cwd b. pwd c. cd - d. ls -dir

pwd

What command can be issued to confirm which directory you are in at a command line prompt? Select one: a. dir b. whereami c. ld d. pwd

pwd

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? Select one: a. read -s -p "Please enter the password: " $password b. read -p -s "Please enter the password: " password c. read -s -p "Please enter the password: " password d. read -p "Please enter the password: " $password

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

Which of the following commands will display a summarization of quotas for a filesystem? Select one: a. repquota b. quotaprint c. quotadisplay d. quota --list

repquota

Suppose you have a directory named Project within your current working directory. Assume the Project directory also contains files and additional subdirectories. Which command would remove the Project directory and all of its contents without prompting to confirm each file deletion?

rm -rf Project

Which of the following commands will delete a directory and all of the files contained within it? (Choose all that apply.) Select one: a. rmdir olddir b. rmdir -rf olddir c. rm olddir d. rm -rf olddir

rm -rf olddir

Which of the following commands will count down from 10 to 1? Select one: a. seq 10 -1 b. seq 10 1 c. seq 10 -1 1 d. seq 10 1 -1

seq 10 -1 1

After you log in to a terminal, you receive a user interface called a ____________. Select one: a. shell b. command screen c. text box d. GUID

shell

You work as a system administrator managing a small number of Linux web servers. Your boss has informed you that there are issues with one of the servers and asked you to reboot it. This server does not have a GUI. You know that the command you should issue is 'shutdown' but you do not remember which option should be used to reboot the machine.Which command could you issue to get a listing of all the available options (as well as their purpose) for the shutdown command?

shutdown --help

Which of the following commands will display the contents of the /etc/passwd file in alphanumerical order? Select one: a. cat -s /etc/passwd b. sed /etc/passwd c. cat --sort /etc/passwd d. sort /etc/passwd

sort /etc/passwd

What command is most effective at identifying different types of files? Select one: a. stat b. file c. ll d. ls -l

stat

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.) Select one or more: a. swapon /dev/sda6 b. makeswap /dev/sda6 c. mke2swap -on /dev/sda6 d. mkswap -on /dev/sda6 e. mke2swap /dev/sda6 f. mkeswap /dev/sda6 g. mkswap /dev/sda6

swapon /dev/sda6 mkswap /dev/sda6

To start and stop daemons, as well as configure them to automatically start during system initialization, you can use the _______________________ command.

systemctl

To display a text file in reverse order, what command should be used? Select one: a. cat b. tac c. tee d. sed

tac

Which of the following commands can be used to update the last modified timestamp on a file, or if the file specified does not exist will create the file? Select one: a. touch file.txt b. updatets file.txt c. stamp file.txt d. update file.txt

touch file.txt

Assume there exists a file named j_names.txt within your current working directory. This is a large text file that contains a random list of first names that begin with the letter J with one name on each line. Here is what the first 10 lines of the file look like when you use the head command: Write a command using piping that will replace all lowercase j characters with uppercase J characters, sort the names/lines in alphabetical order, number each line, and save the output to a file called j_names_new.txt instead of sending the output to the terminal screen.

tr j J <j_names.txt | sort | nl >j_names_new.txt

Elijah is done working with an external USB hard drive and wants to properly disconnect it. Which of the following commands should he use before unplugging the USB cable? Select one: a. unmount b. mount --eject c. disable d. umount

umount

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.) Select one or more: a. unmount /media/cdrom b. eject /media/cdrom c. umount /media/cdrom d. detach /media/cdrom

umount /media/cdrom eject /media/cdrom

An alias has previously been created named showauth. Which of the following commands can be used to get rid of that alias? Select one: a. unalias showauth b. ualias shoauth c. noalias showauth d. alias -d showauth

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 Select one: a. 7 b. 0 c. 1 d. until ctrl-c is used to terminate it

until ctrl-c is used to terminate it

You work as a Linux system administrator for a small business. There is a security breach and you are tasked with generating a list of all IP addresses that have connected to one of the web servers within the last 3 hours using the grep command on one of the server log files. This grep command could take a while to write, but luckily you remember that you were asked to perform the same command last week. Which key on the keyboard can you press to cycle through a history of recently issued commands? Select one: a. tab / shift b. ctrl / alt c. up / down arrows d. space bar

up / down arrows

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? Select one: a. updatedb b. apt upgrade mlocate c. locate --update d. mlocate --update

updatedb

Which of the following commands will count the number of lines in a file named data.csv? Select one: a. lc data.csv b. wc -l data.csv c. lines data.csv d. count -l data.csv

wc -l data.csv


Related study sets

Anxiolytic and Hypnotic Agents; Chapter 20

View Set

Civil Rights and Society: Minersville School Board v. Gobitis (1940)

View Set

Macroeconomics Exam 2 Study Guide

View Set

Chapter 1: Becoming a Public Speaker

View Set

تصميم خرساني مسلح2

View Set

Ch. 45 NCLEX Review- Cerebral Dysfuntion

View Set

Chapter 51: Concepts of Care for Patients With Noninflammatory Intestinal Disorders

View Set