Linux - Chapter 8 Review, Ch. 8 Review Questions, Linux | Chapter 8

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Which of the following statements is true?

Either the MBR or the active partition can contain the boot loader.

Which of the following statements is true?

LILO needs to be reinstalled after it has been modified.

Which command can be used to start X Windows, the window manager and the default desktop environment?

Startx

In what directory is Stage2 of the GRUB2 boot loader stored?

/boot

Which runlevel halts the system?

c. 0

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

What Systemd target corresponds to runlevel 5? a. multi-user.target b. graphical.target c. system.target d. runlevel5.target

graphical.target

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

if

The first daemon loaded on a Linux system is _____.

init

Which command causes the system to enter Single User Mode?

init 1

Which command can be used to modify the default locale on the system?

localectl

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

xargs

Which command causes the system to enter single user mode?

Init 1

What is the name of the directory that contains symbolic links to UNIX SysV rc scripts for runlevel 2?

. /etc/rc2.d

Which of the following indicates the second partition on the third hard disk drive to GRUB?

(hd2,1)

Which directory stores most UNIX SysV rc scripts?

/etc/init.d

Which directory stores most UNIX sysV rc scripts?

/etc/init.d

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

= -lt

What Systemd target corresponds to runlevel 5?

graphical.target

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

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

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

mkdir newdir && cd newdir mkdir newdir; cd newdir

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

nl /etc/passwd

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

until ctrl-c is used to terminate it (b/c there's no update statement to update counter so this is infinite loop)

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

wc -l data.csv

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

#

In what directory is Stage 2 of the GRUB2 boot loader stored?

/boot

Which file does the UNIX SysV init daemon reference on startup to determine the default runlevel?

/etc/initab

Which file does the UNIX SysV init daemon reference on startup to determine the default runlevel?

/etc/inittab

What is the name of the directory which contains symbolic links to UNIX SysV rc scripts for runlevel2?

/etc/rc2.d

Which runlevel halts the system?

0

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

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

2

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

>>

In what directory is Stage 2 of the GRUB2 boot loader stored? A. /boot B. /root C. /bin D. /

A. /boot

What is the name of the directory that contains symbolic links to UNIX SysV rc scripts for runlevel 2? A. /etc/rc2.d B. /etc/init.d/rc2.d C. /etc/runlevel/2 D. /etc/inittab/rc2/d

A. /etc/rc2.d

Which directory stores most UNIX SysV rc scripts? A. /etc/rc5.d B. /etc/rc.d C. /etc/init.d D. /usr/local/systemd

A. /etc/rc5.d

Which assistive technology will make a desktop environment more accessible to a person with low vision? A. High Contrast B. Visual Alerts C. Repeat Keys D. Click Assist

A. High Contrast

Which two implementations of X Windows are commonly used in Linux? (Choose two answers.) A. X.org B. XFCE C. winX D. Wayland

A. X.org D. Wayland

Which of the following Systemd commands can be used to stop a daemon called lala? A. service stop lala B. systemctl stop lala.service C. chkconfig stop lala D. stop lala

A. service stop lala

Which of the following statements is true?

After modifying /etc/default/grub, you must run the grub2-mkconfig command before the changes are made to GRUB2.

Which command causes the system to enter Single User Mode? A. init 0 B. init 1 C. init 6 D. initstate 5

B. init 1

Which runlevel halts the system? A. 1 B. 6 C. 0 D. 5

C. 0

The first daemon loaded on a Linux system is . A. initstate B. inittab C. init D. linux

C. init

Which command can be used to start X Windows, the window manager, and the default desktop environment? A. startgui B. startgdm C. startx D. gstart

C. startx

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

CREATOR="Torvalds" (no spaces)

Which file does the UNIX SysV init daemon reference on startup to determine the default runlevel? A. /etc/initstate B. /inittab C. /etc/init D. /etc/inittab

D. /etc/inittab

Which of the following statements is true? A. GRUB Legacy can be loaded from a MBR or GPT. B. After modifying /etc/default/grub, you must run the grub2-mkconfig command before the changes are made to GRUB2. C. GRUB2 can only be loaded from a UEFI System Partition. D. GRUB needs to be reinstalled after it has been modified.

D. GRUB needs to be reinstalled after it has been modified.

Which command can be used to modify the default locale on the system? A. tzselect B. cmdline C. localectl D. export LANG=C

D. export LANG=C

Which of the following commands can be used to start a UNIX SysV daemon called lala in runlevels 1, 2, and 3? A. chkconfig --level 123 lala on B. update-rc.d lala defaults C. systemctl enable lala 123 D. service enable lala 123

D. service enable lala 123

Which assistive technology will make a desktop environment more accessible to a person with low vision?

High contrast

The first process generated on a Linux system is ______________.

Init

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 equally sized files that are 1/10th of the original file size. b. It will split a file into new files that are 1,000 lines each. 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 kilobyte each.

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

You want to configure the runlevels that a particular upstart daemon is started in. What should you do?

Modify the daemon configuration file within the /etc/init directory

You wish to configure the runlevels that a particular upstart daemon is started in. What command would you use?

Modify the daemon configuration file within the /etc/init directory.

The timeout value in the GRUB configuration file is measured in?

Seconds

Which of the following statements is true?

UTF-8 is commonly used to provide Unicode character set support.

Which two implementations of X Windows are commonly used in Linux? (Choose two answers.)

X.org Waylanmd

Which two implementations of X Windows are commonly used in Linux?

X.org XFree86

Which command can be used to fine-tune the vsync and hsync of a video card for use in X Windows?

Xvidtune

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

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

a semicolon

In what directory is Stage2 of the GRUB2 boot loader stored?

a. /boot

Which directory stores most UNIX SysV rc scripts?

a. /etc/rc5.d (TEST /etc/init.d)

You wish to configure the runlevels that a particular upstart daemon is started in. What should you do?

a. Run the appropriate update-rc.d command. (TEST modify the daemon configuration files within the /etc/init directory)

Which two implementations of X Windows are commonly used in Linux? (Choose two answers.)

a. X.org, ** d. XFree86

The timeout value in the GRUB configuration file is measured in?

a. seconds

Which of the following Systemd commands can be used to stop a daemon called lala?

a. service stop lala (TEST systemctl stop lala.service)

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. alias 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. create showauth='tail -f /var/log/auth.log'

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

What is the name of the directory that contains symbolic links to UNIX SysV rc scripts for runlevel 2?

b. /etc/init.d/rc2.d

Which of the following statements is true?

b. Either the MBR/GPT or the active partition can contain the boot loader?

You have recently modified the options within the /etc/default/grub file. What command can you use next to rebuild the GRUB2 configuration file?

b. grub-install (TEST grub2-mkconfig)

Which command causes the system to enter Single User Mode?

b. init 1

The first daemon loaded on a Linux system is ________________.

c. init

What keyword can be specified within a boot loader to force the system to boot to Single User Mode?

c. single

Which command can be used to start X Windows, the window manager, and the default desktop environment?

c. startx

Which command can be used to fine-tune the vsync and hsync of a video card for use in X Windows?

c. xvidtune

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

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

Which of the following commands can be used to start a UNIX SysV daemon called lala in runlevels 1, 2 and 3?

chkconfig --level 123 lala on

Which of the following commands can be used to start a UNIX SysV daemon called lala?

chkconfig --level 123 lala on

Which of the following indicates the second partition on the third hard disk drive to GRUB?

d. (hd2,1)

Which file does the UNIX SysV init daemon reference on startup to determine the default runlevel?

d. /etc/inittab

Which of the following statements is true?

d. GRUB need not be reinstalled after it has been modified (TEST LILO needs to be reinstalled after it has been modified)

Which of the following commands can be used to start a UNIX SysV daemon called lala in runlevels 1, 2, and 3?

d. service enable lala 123 (TEST chkconfig --level 123 lala on)

Which of the following commands will display the exit status of the last command used in the BASH shell? 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? a. echo $CREATOR b. print CREATOR c. echo CREATOR d. disp $CREATOR

echo $CREATOR

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

git add

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

git pull origin master

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

gitignore

What Systemd target corresponds to runlevel 5? A. multi-user.target B. graphical.target C. system.target D. runlevel5.target

graphical.target

What command can you use to rebuild the GRUB2 configuration file?

grub2-mkconfig

Which of the following indicates the second MBR partition on the third hard disk drive to GRUB2?

hd2,msdo2

Which of the following indicates the second MBR partition on the third hard disk drive to GRUB2? A. hd2, msdos2 B. hd4, mbr3 C. hd3, mbr2 D. hd2, msdos1

hd2,msdos2

You have recently modified the system time using the date command. What command can you run to ensure that the same time is updated within the system BIOS?

hwclock -w

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

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

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

seq 10 -1 1

What kernel option can be specified within a boot loader to force the system to boot to Single User Mode?

single

What keyword can be specified within a boot loader to force the system to boot to single user mode?

single

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. sort /etc/passwd d. sed /etc/passwd

sort /etc/passwd

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

source myscript.sh ./myscript.sh

Which command can be used to start X Windows, the window manager, and the default desktop environment?

startx

Which command can be used to stop a daemon called lala?

systemctl stop lala.service

Which of the following Systemd commands can be used to stop a daemon called lala?

systemctl stop lala.service


संबंधित स्टडी सेट्स

MKTG 334 EXAM 2 KEY MULTIPLE CHOICE

View Set

Ch 3 National Ownership - Unit 1 : Chapter 4 : Ownership

View Set

Mirrors,Lenses,and the Eye Lesson 3

View Set

PEDS CH 26 prep u immunologic disorders

View Set

Human Anatomy and Physiology CHAPTER 2, Human anatomy and physiology Exam 3, Human Anatomy and Physiology Tissue Review, Human Anatomy and Physiology Review, Essentials of Human Anatomy and Physiology, Human Anatomy and Physiology Lab, TEAS Human Ana...

View Set