CH 6-9 Linux+ Exam Study

¡Supera tus tareas y exámenes ahora con Quizwiz!

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?

/etc/cron.deny

In addition to /etc/localtime, some Linux distributions also have an /etc/timezone text file that contains a reference to the correct time zone file contained in which directory?

/usr/share/zoneinfo

To kill a process running in the background, you must place a % character before its process ID. True or False?

FALSE

What component of a Linux server is used to connect to a Fibre Channel SAN?

FC HBA

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

High Contrast

When viewing the output of the lsmod command, you notice several modules that start with vmw. What does this indicate?

Linux is running as a guest operating system.

Which of the following does Click Assist do?

Simulates a right click by holding down the left mouse button.

A for construct is a loop construct that processes a specified list of objects. As a result, it is executed as long as there are remaining objects to process. True or False?

TRUE

What file in the /proc directory contains information about a computer's CPU?​

/proc/cpuinfo

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

/proc/meminfo

What command is used to view and modify user jobs scheduled to run with cron?

crontab

Which of the following commands will show the current user cron jobs that have been created for the currently logged in user?

crontab -l

Which of the following will look at the /etc/passwd file for any lines containing the word root and display them out to the screen while simultaneously writing the results to a file?

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

Where is the /proc filesystem stored?

in RAM

The first daemon loaded on a Linux system is _____.

init

Which command causes the system to enter Single User Mode?

init 1

Which process has a PID of 1 and a PPID of 0?

init/systemd

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

ioports

A runaway process that is faulty and consuming mass amounts of system resources ________.

is a rogue process

Which of the following commands can be used on a modern Linux system to view hardware information that was captured at the beginning of the boot process?

journalctl -k

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?

journald

Which of the following commands can be used to display the current locale of a system? (Choose two.)

locale localectl

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

localectl

What command is used to display the lineage of a process by tracing its PPIDs until the init daemon?

pstree

Which construct can be used in a shell script to read stdin and place it in a variable?

read

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

seq 10 -1 1

Which command could you use to see a list of all environment and user-defined shell variables as well as their current values?

set

Which type of RAID can be entirely configured during the Linux installation process?

software RAID

Which of the following commands will list the time zones available on a Linux system?

timedatectl list-timezones

Which of the following options can be specified in the GRUB Legacy configuration file to set how long the boot menu is displayed before loading the default image?

timeout

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

xargs

To which directory will the test ZFS volume from the previous question be mounted by the ZFS system?

/test

Which of the following would be the results of running the command seq 7?

1 through 7 being displayed one number per line.

Because stderr and stdout represent the results of a command and stdin represents the input required for a command, only stderr and stdout can be redirected to/from a file. True or False?

FALSE

DM-MPIO can be configured to provide multiple, redundant connections to data stored on a SAN. True or False?

FALSE

ZFS volumes are mounted at boot time from entries within /etc/fstab by default. True or False?

FALSE

What does &> accomplish when entered on the command line after a command?

It redirects both stderr and stdout to the same location.

Which of the following options is passed to the Linux kernel from the GRUB2 configuration file to set the locale?

LANG

Which of the following RAID levels is not fault tolerant?

RAID 0

The sed and awk commands are filter commands commonly used to format data within a pipe. True or False?

TRUE

Which of the following will display the message welcome home if the cd /home/user1 command is successfully executed?

cd /home/user1 && echo "welcome home"

What is the name given to a process not associated with a terminal?

daemon process

Which of the following can be used preceding a command to prevent a process from terminating when the parent process terminates?

nohup

Every process has a process ID and a_______.

parent process ID

Which of the following commands will show the current runlevel along with the previous runlevel?

runlevel

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

single

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

systemctl stop lala.service

When configuring a virtual hard disk file, which term refers to the feature that allows the virtual hard disk file to expand dynamically as space is requested by the guest operating system?

thin provisioning

Which of the following commands will prompt you to answer a series of questions to help determine which time zone file you should use?

tzselect

An alias has previously been created named showauth. Which of the following commands can be used to get rid of that alias?

unalias showauth

If incompatible X Windows settings are configured, where will the errors that are generated be written to?

~/.xsession-errors

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?

#

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

/boot

In which directory would a system administrator store scripts that should be run monthly by the cron daemon?

/etc/cron.monthly

Which directory stores most UNIX SysV rc scripts?

/etc/init.d

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

/etc/inittab

Which of the following files is where the default runlevel is set on some Linux systems?

/etc/inittab

Where are the files stored that contain information for all of the time zones that could be recognized by a Linux operating system?

/usr/share/zoneinfo

You want to view log files to get information about a problem that occurred during a Linux installation. In which directory will you likely find the log files?

/var/log

Where are individual user tasks scheduled to run with the cron daemon stored on a Fedora system?

/var/spool/cron/username

Which runlevel halts the system?

0

Which of the following is the highest value that can be set for the nice value which would result in a greater chance of a lower priority?

19

What kill level signal cannot be trapped?

9

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

>>

How do you indicate a comment line in a shell script?

Begin the line with #.

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

CREATOR="Torvalds"

BTRFS filesystems do not need to be checked for errors as they are resilient to data corruption. True or False?

FALSE

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

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

Which of the following will the split command do on a file when no other options are specified?

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

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

What type of redundant storage configuration is most common for hosting the operating system and applications on a server?

RAID 1

Which kill signal terminates a process by taking the process information in memory and saving it to a file called core on the hard disk in the current working directory?

SIGQUIT

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

Segmentation Fault

As daemon processes are not associated with terminals, you must use an option such as -e alongside the ps command to view them. True or False?

TRUE

Both aliases and functions can be used to store commands that can be executed, but functions can also accept positional parameters. True or False?

TRUE

Which of the following system variables can you modify to override the default system timezone within your current shell?

TZ

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

Target ID

Which of the following statements is true?

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

What would be the effect of using the alias command to make an alias for the date command named cat in honor of your favorite pet?

When you use the cat command at the command prompt with the intention of viewing a text file, the date appears instead.

What is contained in the DISPLAY variable on a Linux system running the X window system?

Which X server the client is supposed to connect to by default.

Which of the following is a lightweight desktop environment that uses very few system resources that a system administrator might choose to install on a Linux server instead of one of the two main desktop environments?

XFCE

How can you bypass the wait function and send a user process to the background?

You can use the Ctrl+z key combination and the bg command.

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

\t

Which of the following lines can be used to perform command substitution within a shell script? (Choose all that apply.)

`command` $(command)

The pkill command terminates _________.

all instances of a process with the same name matched by a regular expression

Which of the following commands will display the number of seconds that have elapsed since January 1, 1970?

date +%s

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

depmod

Which of the following commands will display the exit status of the last command used in the BASH shell?

echo $?

You have just created a variable named CREATOR. Which of the following commands will display the contents of the variable to standard output?

echo $CREATOR

Before a user-defined variable can be used by processes that run in subshells, that variable must be __________.

exported

After a background process has been started, what command below can be used to move it to the foreground?

fg

When writing shell scripts and using an if statement to determine whether a set of code should be executed, what is the proper syntax to end the if construct? ___________

fi

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

git add

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

git pull origin master

Which command can be used to see processes running in the background?

jobs

Which of the following commands can be used to only show jobs that have been paused.

jobs -s

Which command can be used to display general hardware info for the entire system?

lshw

Which of the following commands can quickly determine whether your network hardware was detected properly following a Linux installation?

lshw -class network

A government offce want to secure a few of its Linux systems so thy can only use certain USB devices. After plugging in a USB device, which command an be used to detect certain identifying information that can be used to only allow that type of USB device?

lsusb

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

mdadm

Which of the following files holds the configuration information for GRUB Legacy on Ubuntu Linux systems?

menu.lst

Which of the following commands will generate a new initramfs?

mkinitrd dracut

Leonard wants to find detailed information about the Bluetooth kernel module. What can he use to display this information?

modinfo bluetooth

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

modules

Which of the following commands can be used to terminate a process by the process name?

pkill

Which command entered without arguments is used to display a list of processes running in the current shell?

ps

While the top command is running, what key can be pressed to change the nice value of a process?

r

Which of the following commands will most likely increase the chance of a process receiving more time slices?

renice -12

Which of the following is not a type of RAID?

serial RAID

Which of the following commands will shut down a Linux system? (Choose all that apply.)

shutdown -h now poweroff telinit 0

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

sort /etc/passwd

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

startx

Which of the following commands will set the default runlevel of a Linux system?

systemctl set-default runlevel5.target

Which of the following commands will display a list of Systemd units sorted by the time they took to load?

systemd-analyze blame

Which command is used to gain real-time information about processes running on the system, with the most processor-intensive processes listed at the beginning of the list?

top

Which of the following commands will show a list of process names along with their process ID (PID)? (Choose two.)

top ps

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

On a system using the KVM hypervisor, which of the following modules would you expect to see as part of the output of the lsmod command on a guest Linux virtual machine?

virtio

Which of the following states describe a process that is waiting for a parent process to release its PID?

zombie

What command can be used to create a ZFS volume called test from the space on /dev/sdb and /dev/sdc that functions like RAID level 1?

zpool create test mirror /dev/sdb /dev/sdc

Which of the following variables could access the value "/etc" within the sample shell script, if the sample shell script was executed using the bash sample /var /etc /bin command?

$2

Nice values are used to affect process priorities using a range between _____________.

-20 and 19

Which of the following is an on-screen keyboard used with Linux?

GOK

Which of the following accessibility features simulates simultaneous key presses when two keys are pressed in sequence?

Sticky Keys

Which of the following is a valid Linux initialization process?

SysV Systemd

Which of the following does a Linux kernel use to store the value of epoch time?

The number of seconds since January 1, 1970

Which of the following could result in a segmentation fault (fatal signal 11) during a Fedora installation?

a. overclocked CPU b. RAM problems c. faulty hardware components ALL OF THE ABOVE

Which command will display the total amount of memory as well as the amount of free memory for a node?

nodememstats

Which of the following is a valid method of running a script named myscript.sh?

source myscript.sh ./myscript.sh

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

.gitignore

Which of the following operators reverses the meaning of a test statement?

!

What option can be used with the ps command to display an entire list of processes across all Terminals, including daemons?

-e

Command that can be used for comparing values within an if statement

-lt =

Which of the following files is a binary file that contains the rules for calculating the time based on your time zone relative to epoch time?

/etc/localtime

Which of the following files is always executed immediately after any user logs in to a Linux system and receives a BASH shell?

/etc/profile

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

/etc/rc2.d

Where are scheduled commands stored on Ubuntu Linux systems?

/var/spool/cron/atjobs

Linux servers are typically installed in a rack using rackmount server hardware. Which of the following describes the minimum height of a rackmount server?

1U

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

2

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 of the following is the default desktop environment used by Linux Mint?

Cinnamon

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

If /etc/cron.allow exists, only users listed in it can use the cron command. If /etc/cron.deny exists and /etc/cron.allow does not exist, any user not listed in /etc/cron.deny can use the cron command. If /etc/at.allow exists, only users listed in it can use the at command.

Consider the following shell script: echo -e "What is your favorite color?--> \c" read REPLYif [ "$REPLY" = "red" -o "$REPLY" = "blue" ] then echo "The answer is red or blue." else echo "The answer is not red nor blue." fi What would be displayed if a user executes this shell script and answers Blue when prompted?

The answer is not red nor blue.

You attempt to perform the git commit -m "Added listdir function" but the command fails. What are possible reasons for the failure? (Choose all that apply.)

The user performing the commit is not running the command from within the Git repo directory. The user performing the commit has not set their Git user information. No files were added to the Git index beforehand.

When you run the ps command, how are daemon processes recognized?

There is a question mark in the TTY column.

Which of the following commands can be used to see files that are currently being used by a specific process ID (PID)?

This command can be used to see files that are currently being used by a specific process ID (PID)?

Which of the following is responsible for starting tasks and services during boot, stopping them during shutdown, and supervising them while the system is running?

Upstart

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

Wayland X.org

You have redirected stderr to a file called Errors. You view the contents of this file afterward and notice that there are six error messages. After repeating the procedure, you notice that there are only two error messages in this file. Why?

You did not append the stderr to the Error file, and, as a result, it was overwritten when the command was run a second time.

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

ZFS volume

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

a semicolon

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

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

Which of the following commands will display a list of the pending jobs to be run? (Choose all that apply.)

at -l at -q atq

Which of the following command can be used to remove a job from the list of pending jobs? (Choose all that apply.)

at -r at -d atrm

Which of the following commands will send the output of the cat command to the grep command to be filtered?

cat /etc/passwd | grep jsmith

What command will display the current CPU(s) detected by a Linux system?

cat /sys/cpuinfo

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

The command that can be used to change the root filesystem to a different directory, such as when you are in a rescue environment.

chroot

Which command can you use during a system rescue to switch from the root of the live OS to the root of the Linux system installed on the hard disk?

chroot

You have run the top command successfully, but realize that the q key on the keyboard has suddenly stopped working. What is another way that you can exit out of the top program?

ctrl-c

The current value for the HOME variable is displayed by which of the following commands? (Choose all that apply.)

echo ~ echo $HOME

You have started a job running in the background that you want to now bring to the front so that you can watch it execute. Which of the following commands can be used to display the job's output to the terminal?

fg

Every if construct begins with if and must be terminated with?

fi

A process spawning or initiating another process is referred to as _____.

forking

What Systemd target corresponds to runlevel 5?

graphical.target

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

hd2,msdos2

Which of the following can be used to compare the hardware clock to the system clock, writing a new result to a new line every 10 seconds?

hwclock -c

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

A type of software that allows a piece of hardware to host multiple operating systems

hypervisor

Which of the following describes a computer that is used to access an iSCSI hard disk across the network?

iSCSI initiator

Which of the following commands can be used to convert files between different character encodings?

iconv

Which of the following constructs can be used in a shell script to determine whether two values are equal and if so run another set of commands?

if

Which of the following will invalid entries in the GRUB2 configuration cause?

kernel panic and halt the system

Which of the following commands will send a process's resources to /dev/null to kill the process for process ID 1357?

kill -9 1357

In order to create and manage KVM or Qemu virtual machines, a Linux system must have this installed

libvert

Which of the following commands will show a number of environment variables that start with LC_?

locale

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?

mkdir newdir && cd newdir mkdir newdir; cd newdir

Which of the following is the default window manager used by the GNOME version 3 desktop environment?

mutter

Which command will display the output of a file while also displaying a line number at the left side of each line for the /etc/passwd file?

nl /etc/passwd

Which of the following commands will display the output of a file while also displaying a line number at the left side of each line for the /etc/passwd file?

nl /etc/passwd

Which of the following can be included in a shell script to ask the user to type in a password and then store it in the variable named $password?

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

The at command is used to _______________.

schedule processes to run at a single instance in the future

Which of the following commands can be used to schedule very frequent recurring tasks, such as running once every minute?

watch

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

wc -l data.csv


Conjuntos de estudio relacionados

Practice II - Exam 1 Dr. Gummelt

View Set

Management Self-Quizzes TRUE/FALSE

View Set

Ch. 4 Stress on Campus Vocabulary

View Set

what is cognition and what are the functions of concepts? what cognitive strategies assist our problem solving and what obstacles hinder it? what is an intuition and how can the availability heuristic, overconfidence, belief perseverance and framing infl

View Set

Geology Exam Review 1: Chapters 1-4

View Set