Linux Final NOS 120

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

What stage of the GRUB boot loader typically resides on the MBR / GPT?

Stage1

Which of the following is not necessarily generated by every command on the system? (Choose all that apply.)

Standard Input Standard Deviation

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

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

True

Because the Makefile often includes some documented items, it is good form to read the Makefile after running the configure script. T/F

True

Each process can start an unlimited number of other processes. T/F

True

Most source code is available on the Internet in tarball format. True or False?

True

The alias command can be used to make a shortcut to a single command. True or False?

True

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

True

You can choose to use a window manager only, and not use a desktop manager. T/F

True

You can lock a user account by changing the default login shell to an invalid shell in /etc/passwd. 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"

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 current value for the HOME variable is displayed by which of the following commands? (Choose all that apply.)

echo ~ echo $HOME

A list of all exported environment and user-defined variables in a shell can be viewed with what command below?

env

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

exported

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

fi

​What construct is intended for use in processing a list of objects, such as files, directories, users, printers, and so on?

for

The term used to describe a process spawning or initiating another process is referred to as_____.

forking

What Systemd target corresponds to runlevel 5?

graphical.target

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

grub2-mkconfig

What command can be used to configure the LILO, ELILO, GRUB, and GRUB2 bootloaders?​

grubby

In the /etc/lilo.conf file, what keyword should be specified in order to provide the absolute pathname to the Linux kernel?

image=

The first daemon loaded on a Linux system is _____.

init

Which process will always have a PID of 1 and a PPID of 0?

init

Which command causes the system to enter Single User Mode?

init 1

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

is a rogue process

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

jobs

What two commands below can be used to stop a process, either by PID number or process name?​

kill ​killall

What command looks for a Makefile and uses the information within to compile the source code into binary programs using the appropriate compiler program for the local hardware architecture?

make

When compiling source code into a binary program, which command does the compiling using the GNU C Compiler?

make

Which command can be used to count the number lines, words, and characters in a file?

wc

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 commands can be used to search for packages that contain the word oobla on RPM software repositories?

yum search oobla

What character combination at the start of a shell script are referred to as a hashpling, and allow for the specification of the shell that interprets the contents of the script?

​#!

​What option can be added to the rpm command to upgrade a specified package only if an older version exists on the system?

​-F

​What option can be added to the dpkg command to remove a specified package from the system, including any configuration files used by the package?

​-P

​What two options below are used to tell the useradd command where a user's home directory will be, and where the skeleton directory is?

​-d ​-k

What option can be added to the rpm command in order to query packages?​

​-q

Files with what two file extensions are commonly known as tarballs?​

​.tar.gz tgz

In Fedora 20, where are user configured settings for Xorg stored?​

​/etc/X11/xorg.conf.d/

On Linux, the root user always has a UID of what number?​

​0

What kill signal and number can be used to send an interrupt signal to a process, and is the same as using the Ctrl+c combination to kill a running process?​

​2 SIGINT ​

When viewing the output of the ps ax​ command, what does a < symbol in the STAT column indicate for a process?

​The process is high priority.

In order to download DPM packages, what command should be used below?​

​apt-get

Select the two keywords that can be used in the lilo.conf file in order to specify where LILO should be installed, and what parameters should be passed to the Linux kernel when loaded:​

​boot= ​append=

On Linux systems that use the traditional ​UNIX SysV init, what command below can be used to list and modify the runlevels that a daemon is started in?

​chkconfig

What two window managers is the Compiz Fusion window manager based upon?​

​compiz beryl

​What command can be used to search for DPM package information?

​dpkg-query

After modifying the /etc/default/grub file, what command should be run to rebuild the grub config files?​

​grub-mkconfig

​What configuration file contains parameters that set the default location for e-mail, password expiration information, minimum password length, and the range of UIDs and GIDs available for use?

​login.defs

When killing a background job with the kill command, the background job ID must be prefixed by what character below?

%

What character, when appended to a command, causes the command to be run in the background?

&

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

(hd2,1)

When there are multiple background processes executing in the shell, the jobs command indicates the most recent one with which symbol?

+

A user account can be locked with the usermod command using what option?

-L

Which option to the dpkg command can be used to list the files that comprise a package?

-L

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

-e

What option can be added to the userdel command to remove the home directory of the target user?

-r

When compiling source code into a binary program, which command performs a system check and creates the Makefile?

./configure

Which filename extension indicates a tarball?

.tar.gz

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

/boot

Under what directory is the Linux kernel stored?

/boot

​RPM packages that require other RPM packages to be installed on a system prior to being installed creates a relationship known as?

​package dependency

What can be used on a Linux system to trace the lineage of each child process?​

​parent process ID

​What yum command below can display a list of package group names?

​yum grouplist

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

What number represents the stderr file descriptor?

2

Along with a listing of user accounts, the /etc/passwd file also contains information on account expiry. True or False?

False

Most Linux distributions make use of what package manager?

RPM

What kill signal stops a process, then restarts it with the same PID?

SIGHUP

Which of the following file descriptor numbers represents stdout?

1

Which command can you use to lock a user account?

usermod -L username

Which command would you use to unlock a user account?

usermod -U username

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

!

​What operator below is known as the NOT operator?

!

Which file contains default information such as UID and GID ranges and minimum password length to be used at user creation?

/etc/login.defs

What is the name of the file that contains a listing of all users on the system and their home directories?

/etc/passwd

What environment file is always executed immediately after login for all users on the system, and sets most environment variables, such as HOME and PATH?

/etc/profile

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 is the skeleton directory located on most Linux systems?

/etc/skel

At what runlevel does a Linux system have no daemons active in memory, allowing it to be safely powered off?

0

What number represents the stdin file descriptor?

0

Which runlevel halts the system?

0

What kill level signal cannot be trapped?

9

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

Begin the line with #.

Which of the following statements is true?

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

Because Standard Error and Standard Output represent the results of command and Standard Input represents the input required for a command, only Standard Error and Standard Output can be redirected to/from a file. True or False?

False

Fedora 20 makes use of the XFree86 ​implementation of X Windows. T/F

False

The Debian Package Manager (DPM) is the default package manager used by Fedora 20. True or False?

False

To install a new program from RPM software repositories on the Internet, you can use the yum update program name command. True or False?

False

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

False

UIDs and GIDs are unique to the system and once used can never be reused. True or False?

False

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

It appends Standard Ouput to a file.

Which of the following statements is true?

LILO needs to be reinstalled after it has been modified.

You wish 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 is wrong with the following command string ls /etc/hosts >listofhostfile?

Nothing is wrong with the command.

Consider the following shell script: echo -e "What is your favorite color?--> \c" read REPLY if [ "$REPLY" = "red" -o "$REPLY" = "blue" ] then echo "The answer is red or blue." else echo "The answer is not red nor blue." fi

The answer is not red nor blue.

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

There is a question mark in the TTY column.

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.

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

X.org XFree86

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.

You have redirected Standard Error 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 Standard Error to the Error file and as a result, it was overwritten when the command was run a second time.

Select the escape sequence that is used for a form feed:

\f

The killall command terminates _________.

all instances of a process with the same name

Which command can be used to remove the test DPM package, including any test configuration files?

apt-get purge test

​What two commands below can be used to modify the password expiry information and a user's default shell?

chsh chage

What character is used to delimit most Linux configuration files?

colon

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

daemon process

Which option to the rpm command can be used to remove a package from the system?

e

To change the primary group temporarily to another group that is listed in the output of the groups and id commands, you can use which command below?

newgrp

Every process has a process ID and a_______.

parent process ID

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

ps

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

pstree

A system that uses an /etc/passwd file only can be converted to use /etc/shadow for security by using what command?

pwconv

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

read

Which command can be used to alter the primary group associated with a given user temporarily?

usermod

Which command can be used to remove the RPM package file ?

rpm -e packagename

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

seconds

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

set

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

single

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

startx

In order to change keyboard layout if X Windows can't detect the layout, you should use what CLI command?

system-config-keyboard

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

systemctl stop lala.service

Which of the following commands creates an archive?

tar -zcvf /dev/st0 *

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

In order to create user accounts on a Linux system, what command should be utilized?

useradd

Which command is used to delete a user account?

userdel username


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

Solving for side lengths of right triangles

View Set

Chapter 8: The designers: Scenery and costume part 1

View Set