LINUX 1 Final Exam Review

Ace your homework & exams now with Quizwiz!

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

a.#

Which of the following is a valid method of running a script named myscript.sh? (Choose two) a../myscript.sh b.run myscript.sh c.source myscript.sh d.exec ./myscript.sh

a../myscript.sh c.source myscript.sh

In which directory would a system administrator store scripts that should be run monthly by the cron daemon? a./etc/cron.monthly b./var/crontab/monthly c./etc/crontab/monthly d./var/cron/monthly

a./etc/cron.monthly

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

a./etc/fstab

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

a.A filesystem label b.A filesystem UUID

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

a.Device driver

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

a.It will split a file into new files that are 1,000 lines each.

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

a.Mail User Agent

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

a.NTP

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

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

a.Run the partprobe command b.Reboot the system

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

a.SaaS

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

a.\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.a semicolon b.a colon c.a comma d.a pound sign

a.a semicolon

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

a.blkid

In order to move from the /home/joe/test/data to the /home/joe directory, what command should be issued? a.cd ../.. b.cd .. c.cd ./.. d./home/joe

a.cd ../..

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

a.diff document1.txt document2.txt

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

a.fsck

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

a.gdisk

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

a.grep "Joe*" document1.txt b.grep -E "Joe*" document1.txt c.grep -E "Joe?" document1.txt

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

a.lsblk d.ls /sys/block

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.) a.mkdir newdir && cd newdir b.mkdir newdir >> cd newdir c.mkdir newdir || cd newdir d.mkdir newdir; cd newdir

a.mkdir newdir && cd newdir d.mkdir newdir; cd newdir

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

a.mkswap /dev/sda6 g.swapon /dev/sda6

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

a.unalias showauth

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

a.wc -l data.csv

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

b.*

What option can be used with the ps command to display an entire list of processes across all Terminals, including daemons? a.-f b.-e c.-a d.-l

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

b.-i 14d

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

b.= d.-lt

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

b.>>

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

b.A

When using the vi text editor, which of the following keys, when in command mode, will move to the last line in the document? a.L b.G c.P d.W

b.G

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

b.Linux Mint c.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? a.MDA b.MUA c.MTA d.MBR

b.MUA

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

b.Tarball

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

b.X Windows

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

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

b.carrot dog elephant banana apple

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

b.echo $CREATOR

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

b.edquota

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

b.ext2

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

b.fgrep d.grep -F

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

b.git add

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.) a.cat employees.csv | grep 423,424,425,426,427,428 > employees.csv b.grep "42[3-8]" < employees.csv > employees-newhires.csv c.grep "42[3-8]" employees.csv > employees-newhires.csv d.cat employees.csv | grep "42[3-8]" > employees-newhires.csv

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

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

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

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

b.nl /etc/passwd

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

b.proxy server

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

b.pwd

Which of the following characters, when pressed while the top program is running, will allow you to change the niceness of a process? a.p b.r c.n d.d

b.r

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

b.stat

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

c. .gitignore

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

c. print

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? a./etc/cron.allow b./etc/cron.d/cron.allow c./etc/cron.deny d./etc/cron.d/cron.deny

c./etc/cron.deny

Where are scheduled commands stored on Ubuntu Linux systems? a./tmp/at b./etc/at/ c./var/spool/cron/atjobs d./var/spool/at

c./var/spool/cron/atjobs

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

c.2

When issuing the ls -F command, what special character indicates a linked file? a.= b.& c.@ d.*

c.@

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

c.CREATOR="Torvalds"

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

c.Firewall

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

c.Minor number

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

c.Network Address Translation (NAT)

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

c.Tab

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

c.asymmetric

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

c.cat /etc/passwd | grep jsmith

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

c.echo $?

After a background process has been started, what command below can be used to move it to the foreground? a.fgnd b.b2f c.fg d.fgd

c.fg

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

c.git pull origin master

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

c.if

Which of the following commands will send a process's resources to /dev/null to kill the process for process ID 1357? a.sigkill 1357 b.killall 1357 c.kill -9 1357 d.kill -15 1357

c.kill -9 1357

Which of the following commands can be used to terminate a process by the process name? a.pskill b.stop c.pkill d.kill

c.pkill

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

c.repquota

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

c.seq 10 -1 1

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

c.tail -5

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? a.unmount b.mount --eject c.umount d.disable

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

c.umount /media/cdrom d.eject /media/cdrom

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

c.xfs_fsr

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

d. 2TB

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

d./boot

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

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

d./etc/fstab

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

d./lost+found/

Which of the following would be the results of running the command seq 7? a.7 through 1 being displayed one number per line. b.6 through 0 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.

d.1 through 7 being displayed one number per line.

At the vi command mode prompt, what key combination will force a quit from the vi editor without saving changes? a.:q b.:exit c.:! d.:q!

d.:q!

Which of the following key combinations, commonly used in the vi editor command mode, displays current line statistics? a.x b.P c.$ d.Crl+g

d.Crl+g

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

d.FTP

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

d.Freeware

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

d.Hiring people to maintain the Linux system

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

d.clustering

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

d.du

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

d.freeware

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

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

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

d.ls -l

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

d.lsblk

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

d.mkfs exfat /dev/sdb1

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

d.pwd

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

d.quotacheck

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

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

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

d.sort /etc/passwd

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

d.tac

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

d.until ctrl-c is used to terminate it

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

d.web server


Related study sets

MKT Research and Analysis- Ch. 9

View Set

chap 4, Chapter 1, Chapter 2, Chap 3, Chap 5

View Set

ob. Diagnostic Sonography TEST 2 Review

View Set

Adult Health 3 - exam 3 cranial nerves

View Set

Gov 15.1 SWYK 1 - Indiana's Only President

View Set