CH 1-7 Linux Midterm

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

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

*

Under the root directory in Linux, which directory contains system commands and utilities? /opt /var /boot /usr

/usr

What directory under / contains the log files and spools for a Linux system? /boot /usr /opt /var

/var

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

asymmetric

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

fsck

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

g+r-w

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

gdisk

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

grep -F fgrep

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? herding clustering group computing cloud computing

-Clustering

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? .zip .tar.gz .iso .tgz

.iso

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

/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? /etc/ftab /etc/crontab /etc/mtab /etc/fstab

/etc/fstab

Which file should be configured so that quotas are enabled at boot time? /etc/edquota /etc/quotas /etc/fstab /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? /etc/locate.d/updatedb.conf /etc/locate.conf /etc/updatedb.conf /etc/locatedb.conf

/etc/updatedb.conf

What is the complete path and filename for the database that is used by the locate and mlocate commands? /var/lib/mlocate/mlocate.db /var/lib/locate/locate.db /etc/mlocate.db /etc/locate/mlocate.db

/var/lib/mlocate/mlocate.db

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

0177

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? 047 740 026 620

740

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

;q!

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

All of the other options are true.

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

Minor number

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

Network Address Translation (NAT)

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

SaaS

After logging into a terminal, a user will receive an interface known as which option? Processor User interface Swap memory Shell

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? Alt Tab Ctrl 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: Package manager Tarball Router DBMS

Tarball

If a hard link is created to a file and then the original file is deleted, which of the following is true? Both the original file and the hard link are removed. An error message will be displayed preventing the deletion of the original file. 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.

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 This would set the owner of file1.txt to root. This would set the group ownership of file1 to root. This would set the owner and group ownership of file1 to root. This would keep the current ownership of the file, and add root as a second owner of the file.

This would set the group ownership of file1 to root.

What two Linux distributions utilize the Debian package manager by default? SUSE Linux Ubuntu Linux Red Hat Linux Linux Mint

Ubuntu Linux Linux Mint

In Linux, the core component of the GUI is known as: KDE GNOME Red Hat X Windows

X Windows

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

In order to move from the /home/joe/test/data to the /home/joe directory, what command should be issued? cd .. cd ../.. /home/joe 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? chmod 777 filename chmod 7777 filename chmod 6666 filename chmod 0000 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 o=rwx,g=rx,u=r file1.txt chmod u=rwx, g=rx, o=r file1.txt chmod 754 file1.txt chmod file1.txt 754

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

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? match document1.txt document2.txt version --compare document1.txt document2.txt compare document1.txt document2.txt diff 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? drwxrwxrwt Srwxrwxrwx trwxrwxrwx drwxrwxrw-

drwxrwxrwt

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

du

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? locate find where search

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? locate mlocate find 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? find /var/log -user root find -uid root -print /var/log find -user root -print /var/log find -path /var/log -user root

find /var/log -user root

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 grep (John|Bob) salesemployees.csv grep -E (John|Bob) salesemployees.csv egrep (John|Bob) salesemployees.csv

grep -E "(John|Bob)" salesemployees.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 "Joe?" document1.txt grep -E "Joe?" document1.txt grep "Joe*" document1.txt grep -E "Joe*" document1.txt

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

Which of the following commands will create a symbolic link named foo.txt to an original file named bar.txt ln bar.txt foo.txt ln foo.txt bar.txt ln -s bar.txt foo.txt ln -h foo.txt bar.txt

ln -s bar.txt foo.txt

Which of the following permissions would show for a symbolic link when displayed with the ls -l command? -rw-r--r-- srwxrwxrwx lrwxrwxrwx srw-r--r--

lrwxrwxrwx

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 -ax ls -al ~ ls -ax ~ ls -al /home/wayne

ls -al ~ ls -al /home/wayne

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

ls /sys/block lsblk

The apropos list command produces the same results as which command below? man -j list man -k list man -l list man -m list

man -k list

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? ver --help help version man uname lsproc -?

man uname

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

memtest86

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? mkdir -r ~/2019projects/project/projectplans mkdir -p ~/2019projects/project/projectplans mkdir --all ~/2019projects/project/projectplans mkdir -v ~/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? mkfs.exfat /dev/sdb1 mkfs exfat /dev/sdb1 mkexfatfs /dev/sdb1 mke2fs.exfat /dev/sdb1

mkfs exfat /dev/sdb1

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.) makeswap /dev/sda6 mkswap /dev/sda6 mkeswap /dev/sda6 mke2swap /dev/sda6 mke2swap -on /dev/sda6 mkswap -on /dev/sda6 swapon /dev/sda6

mkswap /dev/sda6 swapon /dev/sda6

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? mv projectx projecty rename projectx projecty ren projectx projecty move projectx projecty

mv projectx projecty

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

rm -rf olddir

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

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? unmount disable umount mount --eject

umount

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? apt upgrade mlocate updatedb locate --update mlocate --update

updatedb

Which of the following server roles does Apache perform? certificate authority name server web server mail server

web server

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

which grep type grep

Which Linux command can be utilized to display your current login name? who whoami id w

whoami

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

Run the partprobe command Reboot the system

The iptables software on Linux is an example of what kind of software? Anti-virus Routing Firewall Proxy

Firewall


Set pelajaran terkait

CH 4 (Government Controls and Real Estate Markets)

View Set

Late Medieval + Early Renaissance Northern Europe

View Set

Trigonometry - Solving Trig Equations

View Set

Intro to Corrections, Ch. 7 quiz

View Set

3.3.2 Transform plate boundaries

View Set