CompTIA CertMaster Linux+ LXO-103 ALL

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

Which of the following is a keyboard shortcut for repeating the last command entered?

!! The keyboard shortcut !! repeats the last command entered on the command line.

Which of the following locations is an unusual location to find shared libraries?

/bin/lib (It would be highly irregular to find shared libraries in /bin/lib, which ordinarily does not exist.)

Which partition's recommended size is 100 MB?

/boot (The /boot partition's recommended size, if created as a separate partition, is 100 MB. There are no particular size recommendations for the other listed partitions, if created as separate partitions.)

The configuration file templates and the settings in the /etc/default/grub file are combined by the grub2-mkconfig utility to generate which file?

/boot/grub2/grub.cfg (The grub2-mkconfig utility combines the /etc/default/grub file and the contents of the /etc/grub.d templates to generate the /boot/grub2/grub.cfg file. None of the other options refer to valid files.)

Which of the following is NOT a standard Linux directory?

/data The /data directory, while common, is not a standard Linux directory of a default filesystem layout. It is a directory created by an administrator after installation.

Which of the following is the bootable partition? Device Boot Start End Blocks Id System /dev/sda1 * 63 960140789 480070363+ 83 Linux /dev/sda2 960140790 976768064 8313637+ 5 Extended /dev/sda5 960140853 976768064 8313606 82 Linux swap / Solaris

/dev/sda1 (The /dev/sda1 partition is bootable. The boot flag (*) is set on the active partition.)

If a system administrator wants to add a new software repository to use with apt-get on a Debian system, to which file must the new repository information be added?

/etc/apt/sources.list (The correct file to edit on Debian systems to add a new software repository is /etc/apt/sources.list.)

In which file are the default GRand Unified Bootloader (GRUB) menu settings stored?

/etc/default/grub (The /etc/default/grub file contains the default GRUB menu configurations. It is the same file for GRUB Legacy and for GRUB 2. The /boot/grub2/grub.cfg is the actual menu file, as is /boot/grub/menu.lst, for GRUB 2 and GRUB Legacy, respectively. There is no /etc/grub.cfg file.)

Where on the file system is Upstart's list of configuration files kept?

/etc/init (The Upstart configuration files are kept in the /etc/init directory.) -Key word: configuration -/etc holds configuration files of all kinds

In which directory are the main system services start and stop scripts located?

/etc/init.d (The /etc/init.d directory holds all system services start and stop scripts. The /etc/services file lists system services and their corresponding Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) ports. The /etc/system and /var/init.d directories do not exist.)

Which of the following is the correct configuration file and location for the LInux LOader (LILO) boot loader?

/etc/lilo.conf (The correct name and location for the LILO configuration file is /etc/lilo.conf.)

If a system administrator wants to know which shell a user is configured to use, in which file would the administrator look?

/etc/passwd The shell assigned to each user is set in /etc/passwd. The /etc/group file contains group information, but nothing about shells. The /etc/shadow file contains user names and encrypted passwords. The /bin/bash file is the user shell, bash.

What is the name of the global bash configuration file?

/etc/profile The global bash configuration file that sets the PATH, configures the prompt, sets aliases, and sets environment variables is /etc/profile. There is no /etc/bash file. The .bash_history file keeps a running history of commands used in bash. The .profile file is each user's personal profile file where some default variables and settings can be placed.

In which file is the master system umask set?

/etc/profile The master system umask is defined in the /etc/profile file. The /etc/passwd file contains only user account information. There is no /etc/umask and no /etc/defaults file.

Which partition's size will vary based on the number of users on a system?

/home (The /home directory varies greatly in size based on the number of users on a system. The /var directory will vary based on the number of applications installed on the system. The /tmp directory is typically not a separate partition on modern systems. The root (/) directory varies based on the size of the disk and the desired layout.)

Onto which directory do administrators typically mount temporary and removable filesystems, such as compact disc/digital video disc read-only memory (CD/DVD-ROMs)?

/media Administrators typically mount removable and temporary media such as CD/DVD-ROMs onto /media. The /mnt directory is often for temporarily mounting local or remote filesystems. The /tmp and /usr directories are never used for mounting media because they are system directories that need to be accessed or written to in the case of /tmp.

Which file system directory contains resource information?

/proc (The /proc directory or proc file system contains text files that hold resource information. The /etc directory holds system configuration information. The /usr directory holds files pertaining to and usable by system users. The /mnt directory is a temporary mount point for external resources.) -Doesn't exist until directory is typed in -Information about various processes running on your system, as well as system information -what's up proc? proc has resources!

Which of the following is NOT a standard subdirectory of /usr?

/usr/etc The /usr/etc (etc) is NOT a standard subdirectory of /usr.

Which directory on a systemd init system holds the unit files?

/usr/lib/systemd (The system unit files are located in the /usr/lib/systemd directory.)

Which directory holds all system log files?

/var/log (The /var/log directory holds all system log files and should be the first location that an administrator checks when troubleshooting problems that occur during boot.) -Make sure you study what the different directories mean!!

What is the default setting for the <pass> section of /etc/fstab for the root filesystem (/)?

1 The default setting for the root filesystem (/) for the <pass> section of /etc/fstab is 1. 0 is for removable devices, and 2 is for other filesystems. There is no X entry in /etc/fstab for <pass>.

By default, how many commands does the HISTSIZE variable keep?

1,000 The default HISTSIZE is 1,000 commands.

Which of the following is the numeric definition of a tebibyte expressed in bytes?

1,024^4 The expression of a tebibyte in bytes is 1,024^4, or 1,099,511,627,776.

The systemd multi-user.target corresponds to three different SysVinit runlevels. Which three?

2, 3, and 4 (The systemd multi-user.target corresponds to runlevels 2, 3, and 4. Systemd makes the distinction among these three targets by prefacing the multi-user.target with a runlevel, such as runlevel3.multi-user.target.)

What is the output of the following command? ls | tee files.txt

A list of files is displayed to standard output (stdout) and written to the files.txt file. The tee command sends the output of the stream to the screen and to the specified file. There are no errors, so nothing is directed to stderr.

Which information does The Master Partition Table contain?

A list of partitions on the hard disk The Master Partition Table contains the list of partitions on the disk. There are no separate disk structures that keep metadata, a database of all files, or the disk's geometry—other than the number of cylinders occupied by a partition, which is kept by the Master Partition Table.

What is the default size of the boot sector program?

512 bytes (The boot sector program has a fixed size of 512 bytes.)

How does a user copy five lines of text and then undo before pasting in a new location?

5yy,u 5yy,u copies five lines with yy, then undoes the copy with u (undo). 5dd,p deletes five lines, and then pastes them. 5x,u deletes five characters and then undoes the deletion. 5r,u replaces five characters with u.

Identify the number that will match the regular expression: '^[0-9]{5}'

76470 76470. The regular expression '^[0-9]{5}' matches all numbers with five or more digits.

What are the default permissions for newly created directories?

775 The default permissions for newly created directories are 775.

Which of the following are the maximum permissions that a file or directory can have?

777 777 is rwx rwx rwx, which are the maximum permissions for a file.

How does a user access online help while using the vi editor?

:help The :help command opens help above the current file in vi, but does not affect the current file.

If a user opens multiple files (file1.txt, file2.txt, file3.txt) for editing with vi, how does the user switch to the next file (file2.txt)?

:n file2.txt The :n file2.txt command switches to file2.txt in vi. The :! command is for executing an external command. The :r command reads in the contents of a file into the current file. The :o command has no functionality in vi.

How does a user quit without saving any changes in the vi editor?

:q! To quit vi without saving changes, use :q!.

If a user has opened multiple files in vi, how does the user quit all of them at the same time?

:qa The command qa (quit all) quits all files that are in the buffer. The :q! command quits all files without saving data. The :wq command quits only the current file. The :e command requires an external file to edit.

How does a user editing a file in vi periodically save work without exiting the file to do so?

:w Periodic saves can be done by entering command mode and typing :w. ZZ writes and then quits vi. The :q! command quits vi without saving. The :wq command writes and then quits vi.

What is the difference between a copy and a hard link?

A copy has its own inode, and a hard linked file shares the inode with the original. A copy is an independent file with its own inode. A hard linked file shares an inode with the original. A copy and a hard link are not the same.

If a user opens vi by typing vi <ENTER> at the command line and enters text into the buffer, what must the user do to save the current file?

:w <file name> The user must supply a file name when saving for the first time, :w <file name>. After the first save to the file, then the user can issue :w to periodically save the file. The :wq command will write and quit. The :q! command quits without saving.

Which command line operator redirects output from a command to a file?

> The command line operator that redirects output from a command to a file is the > operator. The & operator puts a command into the background for operation. The ; operator between commands directs the shell to execute one command and then the other in order from left to right. The | (pipe) operator takes the output of one command and provides it as input for another command.

What does the recovery mode option on the GRand Unified Bootloader (GRUB) menu provide to a system administrator?

A Recovery Menu of options (The recovery mode on the GRUB menu loads a Recovery Menu that displays multiple options for working with the system.) -Self explanatory

A user opens a trouble ticket and reports the following error for a directory they attempted to remove that they own in their home directory: rm: cannot remove `dir1': Is a directory. What is the problem?

A directory cannot be removed using the rm command. A directory cannot be removed using the rm command, even if the user has sufficient permissions to do so. The -i option specifies interactive and will not affect the outcome. Using the -f option will not remove the directory.

What does the env command display to a user?

A list of the user's environment variables and their values The env command displays a list of the user's environment variables and their values. A user's command history is shown using the history command. A list of the user's aliases is displayed with the alias command. No single command will list all available languages, fonts, and aliases on the system.

Which of the following regular expressions, when used with egrep, will match all words or lines that begin with any letter from a to e and their capitalized alternatives?

'^[a-e]|[A-E]' The '^[a-e]|[A-E]' regular expression matches all lines or words that begin with the letters a through e or A through E. Neither option '^[a-e][A-E]' nor '^[a-e]&[A-E]' works, because the correct operator is missing. The '^[a-e]|[A-E]$' option matches words that begin with a through e or words that end with A through E.

To be sure that a user does not overwrite or remove any important files when moving, copying, or removing files, which option should a user always use?

-i The -i option, which is interactive, should always be used. In fact, many users and almost all administrators set aliases for mv, cp, and rm. The -R option is only valid for cp and rm. The -f option is the force option, which should not be used in every case. The -v option only means to report in verbose mode, but is done so after the command has executed.

Which ps option allows a user to view the priority of a process?

-l The -l option allows a user to view the priority of processes. The -f option is for full format. The -e option displays every process running on a system. The -u option displays the processes for a user.

Which of the following is an example of a hotplug device?

A server power supply (Server systems have hotplug power supplies that can be removed and replaced with the system still powered on, because they also have redundant power supplies. As long as one power supply powers the system, another may be removed.)

A child shell is also known as which type of shell?

A subshell A child shell is also known as a subshell. Subshells are typically invoked by running a script.

Which pattern will the command, grep [0-9] file.txt, match?

Any line with a number in it [0-9] will match any line that contains a number.

Which user may launch a program with a lower priority?

Any user Any user may lower the priority of a program.

What is the primary difference between apt-get and aptitude?

Aptitude is a menu-driven apt-get. (Aptitude is equivalent to the apt-get command, but it is menu driven. It is a command line tool and does not require a graphical desktop. It is used on Debian and its derivative distributions. It has the same functionality as apt-get and therefore is not view only.)

Which of the following is the simplest type of regular expression?

An alphabetic string The alphabetic string is a regular expression that is as simple as a word or sample of text. For example, searching for the word, Linux, or the alphabetic text pattern, process.

What does btrfs stand for?

B-tree filesystem The acronym btrfs stands for b-tree filesystem.

Which of the following is a match for egrep -i '1{3}' file.txt?

Bob (212) 555-1111 The egrep -i '1{3}' file.txt command searches for lines containing three consecutive 1s in them.

Which of the following would NOT match the regular expression '^[0-9]{3}'?

Bob 111 Bob 111. The regular expression '^[0-9]{3}' matches at least three digits at the beginning of the line.

Which shell is the most commonly used in Linux?

Bourne-again shell (bash) (Bash, the Bourne-again shell, is the most commonly used Linux shell. The csh, or C shell, is mainly used by programmers. The Korn shell (ksh) is a standard UNIX shell that is still available, but not commonly used on Linux systems. The Bourne shell (sh) is a common UNIX shell that was the basis for the creation of bash.)

Which types of files are found under the /etc directory?

Configuration The /etc directory contains the system's configuration files. This directory should always be backed up.

Which type of drive is becoming a legacy (outdated) technology in favor of larger media types such as Universal Serial Bus (USB) flash drives?

Digital video disc (DVD) drive (DVD drives are becoming legacy devices and are rarely seen in Linux server hardware. The replacement technology is the portable and much greater capacity USB flash drive.)

Prior to installing Linux on a system, a technician should check the system's hardware against the hardware compatibility list (HCL). If the technician finds that Linux does not support a particular integrated component or built-in feature, what action does the technician take to ensure a smooth installation?

Disable the components or features in the Basic Input-Output System (BIOS) (The technician should disable the components or features in the BIOS. If the components are disabled, they will not show up in the system scan during installation and will not stop or complicate installation. Upgrading the system's BIOS will only help enable newer features, not support the existing ones. Replacing old components is usually not possible because the components are integrated into the motherboard. Installing an older Linux version makes the problem worse because drivers for newer hardware and features did not exist at the time the older version was released.)

A process may include all but which of the following attributes?

Disk location ID A process runs in memory and therefore has no disk location ID. It has a process ID (PID).

The df and du commands are which type of commands?

Disk space tracking The df and du commands are disk space tracking commands.

What is the recommended size for a swap partition?

Double the random-access memory (RAM) size (There has been much debate over the recommended size for a swap partition, but the standard is twice the amount of RAM. If your system contains 4 GB of RAM, then your swap partition should be 8 GB in size.)

Which key switches from insert mode to command mode in vi?

ESC The ESC key is used to switch from insert mode to command mode. The i key switches to insert mode. The v key switches to visual mode, enabling selection of one character at a time. The A key switches to insert mode at the end of the line.

How often is the boot process repeated?

Each time the computer is started (The boot process occurs every time the computer is started.)

How does a user place a command into the background?

Enter the command with a trailing & To place any command into the background for processing, enter the command with a trailing &. For example, xclock &. The trailing - is not a valid option. Piping the command to /dev/null is not possible because output is redirected, not piped, to /dev/null. Redirecting output to a remote terminal does not place the command into the background.

Which of the following is NOT true of the init process?

Init is responsible for maintaining security patches. (nit is NOT responsible for maintaining security patches for a system.) -security is just not init's thing -FALSE: Init is responsible for maintaining security patches. -All of the following are TRUE: Init is the parent of all processes. Init manages the runlevel of a system. Init is the system and session manager.

What does the acronym "initramfs" stand for?

Initial RAM File System (The Initial RAM File System (initramfs) is the successor to the initrd (Initial RAM disk).) -It's got RAM in it

In the command mail user@domain < /etc/passwd, what is the file /etc/passwd for the purposes of this command?

Input (The /etc/passwd file in the command mail [email protected] < /etc/passwd is input for the command. Output requires the > operator. Piped filter requires the pipe (|) and a filter command. A filter requires one of the filter commands.)

The vi editor has four modes: command mode, visual mode, execute mode, and which other mode?

Insert Insert mode is the fourth vi mode.

When a user runs a bash script, where do the commands inside the script run?

Inside the child shell (The script executes in the parent shell, but the commands inside the script run in the child shell. )

Why would an administrator run the warnquota -u command on a regular basis?

It checks if users are not exceeding the allotted quota limit. The warnquota -u command checks if users are not exceeding the allotted quota limit.

What is the function of the following command for a system administrator in setting up quotas on the /opt/data filesystem? quotacheck -cug /opt/data

It creates the user and group quota files on /opt/data. The quotacheck -cug /opt/data command sets up new user and group quota files on the /opt/data filesystem. There is no quota compatibility check. A quota report is generated by using the repquota utility. Quotacheck does not scan for permissions.

What is the notable feature of the fgrep command?

It does not recognize regular expressions. The fgrep command does not recognize regular expressions. Extensions are meaningless to the Linux operating system shells.

Which information is NOT stored in the inode?

File name The file name is NOT stored in the inode. Files can be hard linked and have different names, but have the same inode. The inode stores file metadata.

The du command displays which type of resource information?

File sizes

A program that a user executes interactively at the command line, such as ls -lR *.txt, is which type of process?

Foreground A command or process that a user executes interactively at the command line is an example of a foreground process. A background process is not interactive with the user. A paged process is saved to disk. A killed process is no longer in memory.

What is the maximum number of primary partitions that a system administrator can configure on a disk?

Four (A hard disk can have a maximum of four primary partitions.)

How many major divisions does the Linux boot process have?

Four (The eleven-step boot process is a series of sequential steps that has been divided into four major sections: Basic Input-Output System (BIOS) initialization, boot loader, kernel and init initialization, and boot scripts.)

How many possibilities for job status are there?

Four There are four possible statuses for jobs: Running, Stopped, Terminated, and Done.

Which filesystem is the default filesystem for Linux installations?

Fourth extended filesystem (ext4) The ext4 filesystem is the default Linux filesystem for installation. Previously, ext2 and then ext3 filesystems were the default. There is no ext5 filesystem.

From where does the apt-cache command obtain its information?

From package metadata (The apt-cache command obtains its information from package metadata. There is no in-memory package cache. The apt.conf file is a configuration file for the apt-get command. There is no apt.cache file.)

Identify an advantage to changing the partitioning style from Master Boot Record (MBR) to Globally Unique Identifier (GUID) Partition Table (GPT).

GPT can handle disks more than 2 terabytes (TB) in size. The primary advantage to GPT over MBR, although there are others, is that GPT can handle disks larger than 2 TB, while MBR cannot. Both GPT and MBR can boot multiple operating systems, work well with Linux and Windows, and can address multiple disks.

Which feature of systemd allows systems to boot faster?

Greater concurrency (Greater concurrency is the feature that enables the systemd init process to start multiple programs at the same time for faster boot. The ext4 file system is more efficient, but has little to do with faster boot times. Runlevel targets affect the system only after it has booted. The initrd would not improve boot times, but would be positively affected by improved boot times.) -Concurrency means happening at the same time -Multiple programs booting at the same time speeds up process

Which vi keyboard shortcut moves the cursor to the beginning of the line?

I I moves the cursor to the beginning of the current line. H moves the cursor to the beginning of the file. G moves the cursor to the beginning of the last line. O opens a new line above the current line.

Why can the system administrator specify the mount point or the filesystem to mount, but is not required to specify both when mounting a filesystem?

If the entry is in /etc/fstab, the administrator can specify either the filesystem or the mount point, but does not have to specify both. If the filesystem has an entry in /etc/fstab, the administrator has to only specify either the filesystem or the device to mount the filesystem. The system does not know which filesystem the administrator has been working with in order to mount it. No option in /etc/fstab enable this feature other than the entry itself.

Where does the user select which kernel to boot?

In the GRand Unified Bootloader (GRUB) menu (The user may select any listed kernel from the GRUB menu on boot.)

Where must the /boot partition be installed?

In the first primary disk partition (The /boot partition must be installed in the disk's first primary partition.)

Processes may run where in memory?

In the foreground or in the background Processes run either in the foreground or in the background. All processes run in memory only—not on file systems or storage of any kind.

Where on a hard drive is the GRand Unified Bootloader (GRUB) boot loader installed?

In the master boot record (MBR) (The GRUB boot loader is typically installed into the MBR on the hard drive. The boot loader cannot be installed in an extended partition or into a logical partition. The now deprecated LInux LOader (LILO) boot loader had to be installed into the MBR of a disk with no more than 1,024 cylinders.)

An administrator attempts to unmount a filesystem but receives the message, "device is busy." What does this message mean?

It means that a user has the mounted filesystem as their current directory. The "device is busy" message means that someone on the system has the mounted filesystem as their current working directory. It is possible that the root user's current directory is the mounted filesystem.

What does the nouser mount option mean?

It means that only the root user can mount the device or filesystem. The nouser option means that only the root user can mount the filesystem or the device.

What is the function of the export command?

It sets an environment variable that is passed to child shells. (The export command makes variables set in a parent shell available to scripts and commands in child shells. The export command cannot provide variable values to other users, send outputs to other users, or redirect output to other shells. )

A user edits a file with the vi editor, with the following command: vi file.txt. Immediately after editing the file, the user issues the following command: ^vi^cat^. What does this command do?

It substitutes cat for vi, so that the new command is cat file.txt. The caret (^) is a substitution operator. The command ^vi^cat^ replaces vi with cat for the previously run command and then executes it.

Which filesystem feature makes it resilient to system crashes and power failures?

Journaling Journaling is the filesystem feature that makes it resilient to power failures and system crashes.

What is the difference in the two commands L and G?

L moves the cursor to the bottom of the screen and G moves to the bottom of the file. L moves the cursor to the bottom of the screen and G moves to the bottom of the file.

Which Linux boot loader menu contains the following entry by default? image=/boot/memtest.bin label=memtest86

LInux LOader (LILO) (The memtest entry shown is a LILO standard boot option.)

What is the matching pattern for the command egrep '^\w{6,8}'?

Match all lines that begin with any alphanumeric characters between six and eight characters in length Match all lines that begin with any alphanumeric characters between six and eight characters in length.

What does the nohup command's acronym mean?

No hangup The nohup acronym means no hangup, which is to say, do not kill the task when the shell logs out.

How can a user create a permanent environment variable?

Place the variable into the .profile file and export it To create a permanent environment variable, the user must edit the .profile file, enter the variable, export the variable, and save the file. The variable will be available at login. The root user would not create a personal environment variable in a global file. The script option would not work, because child shell variables are not available to the parent shell. There is no .variable file.

Which filesystem shortcomings does b-tree filesystem (btrfs) address?

Pooling, snapshots, checksums, and multi-device spanning The btrfs filesystem was created to address shortcomings of Linux filesystems such as pooling, snapshots, checksums, and multi-device spanning.

How can a user overwrite multiple characters in vi?

R The R key is used to allow a user to overwrite an unlimited number of characters. The dd command deletes an entire line of text. The xx combination deletes two characters. The r command allows a user to overwrite a single character.

What does the acronym RPM stand for?

RPM Package Manager (The acronym RPM stands for RPM Package Manager. It once stood for Red Hat Package Manager, but now is a recursive acronym.)

Which of the following ps command fields describes the physical memory in kilobytes (KB) used by a process?

RSS The RSS field is the amount of physical memory in KB used by a process. PRI is the priority. SIZE is the virtual image size. TT is the TTY or terminal associated with a process.

Which two environment variables does the Upstart init daemon set?

RUNLEVEL and PREVLEVEL (The two Upstart environment variables are RUNLEVEL and PREVLEVEL.) -The two levels, before [pre] and after [run]

The term regex refers to what in Linux?

Regular expressions The term regex refers to regular expressions, which are sequences of characters that define a string search pattern.

Which user account must the system administrator account use to install or reinstall GRand Unified Bootloader (GRUB) on a system?

Root (GRUB has to be installed by the root user or by a user with the permission to use sudo.)

Which two partitions are standard and automatically set up when installing Linux?

Root (/) and swap (The only two standard partitions set up during installation are the root (/) partition and the swap partition.)

Packages include all files required to perform which function?

Run an application (Packages include all files required to run an application.)

What is the difference between terabyte and tebibyte?

Terabyte is a decimal reference and tebibyte is its binary equivalent. The terabyte is a decimal reference for the same amount of information as a tebibyte, but the terabyte is expressed in decimal notation and the tebibyte is expressed in binary notation. Both terms refer to either quantity of storage or memory. Both a terabyte and a tebibyte represent a trillion bytes.

Which of the following is the correct term defined as a sequence of one or more lines of text that can be written to be read on a text-based display?

Text stream A text stream is a sequence of one or more lines of text that can be written to be read on a text-based display. A text filter uses a text stream, but is passed through a filter to isolate part of a text stream. A text pipe is output from a command that is used as input for another command. A text redirect is a text stream that is passed in its entirety to a file.

In contrast to shared libraries that have "so" in their file names, what naming characteristic identifies a library as static?

The ".a" suffix. (Static libraries all share the common ".a" suffix.)

What is the significance of the $ in the environment variable $SHELL?

The $ means that the object is a shell variable name. (The $ designates an object as a variable. A variable is usually in all caps. The variable name is the $ and the variable. For example, the variable FOO has the variable name $FOO.)

For which activity is the apt-cache utility used?

Searching through the lists of available software packages (The apt-cache command is used to search through local software lists for software packages.)

Section 2

Section 2

Section 3

Section 3

Section 4

Section 4

Section 7

Section 7

Section 8

Section 8

What happens if a user enters the command, type rm?

The command displays aliases for the rm command. The type rm command displays aliases to the rm command. The rm -rf command will remove all files in the user's home directory. The file command responds with the type of file (text, executable, data). The ls -li command displays links to a file.

A user creates an executable shell script, file_list.sh, in their home directory and attempts to execute it by typing file_list.sh. They receive an error: file_list.sh: command not found. What is the problem?

The file is in their current directory, but the current directory is not in their path. The script is in the user's current directory and the current directory is not part of the default path. The extension has nothing to do with the file type in Linux.

What does a job status of Stopped mean?

The job has been suspended. A stopped job has been suspended by the user. A stopped job can be restarted. A completed job has a status of Done. A terminated or killed job has a Terminated status.

How can a user determine which job was executed most recently?

The jobs table displays a (+) next to the job name. The jobs table displays a (+) next to the most recently executed job. All running jobs have a status of Running. There is no Current job status. The list order is not in the correct order of execution.

In a user's .profile file, there is an entry: TZ='America/Chicago' ; export TZ. What is the purpose of this line?

The line sets the TZ (time zone) variable to America/Chicago, and export TZ makes TZ an environment variable. (This line has two effects. The first is that it sets the TZ (time zone) variable to America/Chicago, and second, it exports the variable TZ so that it is an environment variable.)

If a system administrator mounts /dev/sdb1 on the /mnt directory, what happens to this mount after a system reboot?

The mount does not persist after the reboot. The mount will not persist after a reboot because the administrator did not create an /etc/fstab entry for the filesystem, which would make the mount permanent and persistent. No filesystem or directory will be removed or reset on the system.

If a user launches a new shell within a shell, what is the relationship of the new shell to the original shell?

The new shell is the child shell of the original or parent shell. The new shell is a child shell of the original or parent shell. The original shell does NOT pass its variables to the child shell.

A user attempts to remove a directory and receives the following error: rmdir: failed to remove `dir1': Directory not empty. Explain the problem.

The user used the correct command, rmdir, to remove the directory; however, the directory is not empty and cannot be removed with rmdir. The rmdir command cannot remove a directory that contains files. Any user can execute the rmdir command. The -ignore-fail-on-non-empty option only suppresses the error, but does not remove the directory.

What happens to the files in the /opt directory if a system administrator mounts a filesystem on /opt?

They are hidden and inaccessible. The files and subdirectories that exist in /opt will be hidden and inaccessible if the administrator mounts another filesystem or device on /opt.

What is the significance of the leading dot in some file names, such as .bash_history, .profile, and .bashrc?

They are hidden from a standard file listing. (The leading dot (.) in a file name means that it is hidden from a standard directory listing. Files named with a leading dot are not necessarily executable or owned by the root user—as any user can create them and interact with them. )

How does a system administrator verify that the GRand Unified Bootloader (GRUB) password they set up works?

They have to supply the password prior to entering edit mode. (The only time the GRUB password is required is prior to entering edit mode to change boot options.)

The vi and the vim editors are often known as simple editors because of which feature?

They use simple keystrokes to perform complex text editing tasks. The vi and vim editors are known as simple editors because they use simple and somewhat intuitive keystrokes to perform complex editing tasks.

A user uses a sed command to convert the letter b to B in a file, but when the user looks at the file, there are no changes to it. What happened?

The user failed to redirect the converted output to a file. The user failed to redirect the converted output to a file. The sed command does not rewrite the file.

The init process is also known as what?

The parent of all processes (Init is also known as the parent of all processes. The Linux kernel initializes prior to the init process. The GNOME display manager, or gdm, is a graphic interface. The remote shell daemon is a subprocess of init.) -Once the parent is ready, everyone else is ready -The second to last step for booting

Which of the following is NOT part of the process table?

The process job status The process job status is NOT part of the process table. The jobs table displays job status.

Which part of the computer checks for the Basic Input-Output System (BIOS) program and then executes it?

The processor (The processor checks for the BIOS program and then executes it. This is the first step in the boot process.)

How does a user initiate a foreground process at the command line?

The user issues a command. To run a program in the foreground, the user simply issues the command. Unless the user places the command into the background with a trailing &, commands are always in the foreground.

How does a user turn a local variable into an environment variable?

The user must export the variable. (To turn a local variable into an environment variable, the user has to export the variable. The user-exported variable is not permanent if created in an interactive environment and will disappear upon logout.)

How does the system administrator mount the swap partition for use?

The swap partition is not mounted on a mount point. The swap partition is not mounted in the traditional sense in that it has no mount point and it can be neither mounted by the root user nor unmounted.

If a user creates a symbolic link from file1.txt to storage.txt, then renames storage.txt to inventory.txt, the symbolic link from file1.txt to storage.txt is broken. What happens if the user creates a new file named storage.txt?

The symbolic link is re-established from file1.txt to storage.txt. The symbolic link is restored from file1.txt to storage.txt.

A user has a soft block limit of 100 kilobytes (KB) and a hard limit of 1,000 KB (1 megabyte [MB]). What happens to the user's ability to save new files after the grace period if they have 150 KB of data on that filesystem?

The user cannot save new files. The user cannot save new files. Once the user passes the soft limit, the grace period begins, and after it expires, the user can write no more data. There is no new grace period and no files are ever deleted by the system.

What happens if there is no soft limit set and the user hits the hard limit?

The user receives no warning and cannot save more files. The user receives no warning, but cannot save any new files to the filesystem.

What is the purpose of this statement: ps -ef >> processes.txt?

This statement appends process information to information already in processes.txt. The statement appends any information in the processes.txt file with current process information. The single operator > will create the file and overwrite any existing information. To send process information to a file and to the screen requires the tee command.

How many stages does the Debian archive package installation process have?

Three (The Debian archive package installation process consists of three steps: check for dependency, unpack, and configure.)

What is the purpose of the modprobe command?

To add or to remove modules from the kernel (The modprobe command adds or removes kernel modules on a system. It does not scan, test, or search for modules.) -only modifies

The rmdir command removes a directory, but which particular idiosyncrasy does the rmdir command have?

To be used successfully, the directory has to be empty To remove a directory with the rmdir command, the directory has to be empty. There are no -R or -f options for rmdir. There is no character limitation for directory names to be removed.

What are text filters sometimes used for?

To insert or remove headers Filters are shell scripts and are sometimes used to insert or remove headers. Passing text into a file is redirection. Reading data from a file is parsing. Executing one program after another is performed by using a semicolon between the commands.

What is the function of the J (uppercase j) command in vi?

To join the current line with the line below it The J command joins the current line with the line below it. To jump down five lines in a file, use the 5j command. There is no spell check in vi. The dG command deletes from the current cursor position to the end of the file.

Why does a Linux system run a filesystem check at startup?

To check for errors at boot time The fsck command runs anytime the system detects that there might be errors on the disk.

Which of the following is NOT a role of the master boot record (MBR)?

To launch the user environment (The MBR does NOT launch the user environment. The user environment is launched by the init process.)

What is the main function of the boot sector program?

To load the second stage boot loader (The main function of the boot sector program is to load the second stage boot loader. The second stage boot loader contains the kernel loader. The POST occurs before the boot sector portion of the boot process. Booting a live CD/DVD distribution is a function of the second stage boot loader.) -The second time brings the kernel -Another one bites the dust

What is the purpose of the timeout entry in the GRand Unified Bootloader (GRUB) Legacy menu.lst file?

To specify the time limit for the login screen to be displayed (The GRUB timeout entry specifies the amount of time that the GRUB menu is displayed on the screen. After the timeout value has been reached, the system will boot into the default operating system.)

Which task must the administrator perform to activate quotas on a filesystem once the additions have been made to /etc/fstab?

Unmount and remount the filesystem The filesystem on which quotas were enabled via the /etc/fstab entries has to be unmounted and remounted. Logging off users, restarting the SSH daemon, or restarting networking will have no effect.

Which task should the system administrator perform prior to using the tune2fs utility on a filesystem?

Unmount the filesystem Before performing filesystem checks or tuning, the administrator should unmount the filesystem. There is no need to reboot the computer, fsck the filesystem, or convert it to ext3 prior to using tune2fs.

If a user wants to terminate only one instance of a particular process, what must the user do?

Use ps -ef | grep <command> and selectively use the kill command to terminate the specific instance The ps -ef |grep <command> ; kill PID is the best method. Using killall will kill all processes with the command name and not just the specific one. The pkill command can kill more than one instance, especially when using a partial name. The top command can work, but only if the desired instance appears near the top of the list.

Which two attributes does a process inherit from the user who starts the process?

User ID (UID) and group ID (GID) When a user starts a process, the process inherits the user's user ID and the user's group ID. The process is assigned a process ID from the system and has nothing to do with the user. The process does not inherit a user's home directory or the user's shell environment variables.

Which information does the system administrator place into the configuration file to enable GRand Unified Bootloader (GRUB) password protection?

User name and encrypted password (The system administrator enters user name and the encrypted password into the configuration file to enable GRUB password protection.)

As the final part of the boot process and after the user logs into the system, what happens?

User profile and login scripts run. (The user's profile and login scripts run to complete the boot process.)

What is the possible result if a new administrator assigns a small space soft limit, but does not specify a hard limit?

Users can store as much data as they want until the grace period expires. The administrator who makes this mistake runs the risk of filling a filesystem, because users may store as much data as they want until the grace period expires.

Which apt-cache command displays a package's dependencies and reverse dependencies for the openssl package, for example?

apt-cache showpkg openssl (The apt-cache showpkg openssl displays the package's dependencies and reverse dependencies. The search option displays a regular expression (regex) matched list for openssl. The show option displays extended information about openssl. The pkgnames option searches package cache for packages that begin with the name openssl.)

Which of the following Debian Linux commands installs software packages from Internet sources?

apt-get (The apt-get command installs software from Internet sources, such as Debian mirrors or specifically configured sites. Yum is the Red Hat Linux equivalent of apt-get. Dpkg installs single DEB software packages located on media. The make ; make install commands compile and then install software from source files.)

If a new administrator is unsure of which specific options to specify under <options> in /etc/fstab, what should the administrator enter in that section for a filesystem?

defaults The administrator should use 'defaults' in the <options> section of /etc/fstab if unsure of which specific options to set for a filesystem. The defaults are: rw, suid, dev, exec, auto, nouser, async, and relatime. Placing 'auto' in this section means that the filesystem will be automounted. There are no standard or normal options.

Which of the following commands provide a human readable output of disk space?

df -h

Which command does a system administrator use to install a single software package and its dependencies from an Internet site (for example, the openssl package)?

apt-get install openssl (The Debian command to install a single software package, such as openssl, is apt-get install openssl. The apt install openssl command does nothing because there is no apt command—APT is the name of the tool: Advanced Package Tool. The yum install openssl command is the equivalent command on Red Hat Linux systems. The rpm -qa |grep openssl command will list the openssl.rpm package, if installed, on Red Hat Linux systems.)

Running quotacheck for the first time creates two files on the filesystem for which you want to set up quotas. What are the two files?

aquota.group and aquota.user The two files created the first time quotacheck is run are aquota.group and aquota.user.

Which files does the following command match in file.txt? egrep '^(b|r)e' file.txt

better rent better and rent. The expression '^(b|r)e' translates as words beginning either with b or r and the second letter is an e.

How does a user restart a stopped job?

bg %# To restart a stopped job, issue bg %#. There is no restart command. Using an & after the fg or bg command has no effect.

Which of the following words will the grep command, cat file.txt | grep b[aeiou]t, not match?

boot The regular expression b[aeiou]t will match any word with the pattern: bat, bet, bit, bot, or but at the beginning of the word. The word boot is not matched.

Which log file is especially important to check during troubleshooting of boot problems?

boot.log (The boot.log is a good place to start when searching for problems that occur during the boot process. There are no logs named startup.log or booterr.log. The lastlog checks who was logged in, usually to correlate a problem with the user who was logged in at the time.) -Log because it's a log file, and boot because it's during boot process, so it gives boot problems

Which of the following words matches the regular expression ^b[aeiou]t?

butcher The word butcher is matched. The word to match must begin with the letter b (^b); have one of the letters a, e, i, o, or u next; and then have a t in it. Any characters after those first three letters will also be a match.

Which command does a system administrator use to confirm the device where the GRand Unified Bootloader (GRUB) 2 boot loader is installed?

cat /boot/grub2/device.map (For the GRUB 2 boot loader, the system administrator uses cat /boot/grub2/device.map to determine where GRUB 2 is installed. The /etc/redhat-release file displays the Red Hat Linux version running, but nothing about the boot loader. The /boot/grub/menu.lst contains the information, but for GRUB Legacy and not GRUB 2. The dmesg command has no information about the install location of the GRUB 2 boot loader.)

Which command changes the permissions for a file or a directory?

chmod The chmod command changes the permissions for a file or a directory. The chown command changes file or directory ownership. The chgrp command changes group ownership of a file or a directory. The chdir command changes directory and is more commonly issued as 'cd'.

How does an administrator set the sticky bit on a folder, named files, using the octal method?

chmod 1755 files/ Use chmod 1755 files/. 4755 is Set User ID (SUID). 2755 is Globally Unique Identifier (GUID), and 6755 sets both SUID and GUID.

A user wants to remove all the tabs in a file and convert them to spaces, but to do so manually is time-consuming and tedious. Which command performs this function for the user?

expand The expand command converts tabs in a file to the equal number of spaces. The fmt command formats text to a specific width by filling empty lines for the file. The split command splits a file into two equally sized files. The paste command merges the lines of one or more files.

To provide commands to the GRand Unified Bootloader (GRUB) boot loader, which key does a system administrator press when presented with the GRUB boot menu?

e (The administrator presses the e key to edit. None of the other options has relevance at the GRUB menu.) -e for edit -GBUBe grube grubedit

Which editor does an administrator use to edit the quota files?

edquota Since the quota files are binary and not directly editable, the administrator must use edquota to edit the files. No other listed editor can successfully edit the binary quota files.

Which of the following is NOT an option available in the GRand Unified Bootloader (GRUB) Legacy /boot/grub/menu.lst file?

encrypt (The encrypt option is not available in the /boot/grub/menu.lst file.)

Which command can a user run to view all of the user's shell environment variables?

env The env command displays the user's shell environment variables. $SHELL is not a command, but is a shell variable. The echo $SHELL command displays the user's default shell. The uname command displays system information.

Which log file collects information about the status of various hardware devices on the system during kernel initialization?

dmseg (The dmesg file collects information on the status of various hardware devices during kernel initialization. The messages file records non-critical system messages. The user.log file contains information about all user level logs. The daemon.log file records information about background daemons that run on the system.) -dmseg sounds like dstatus -daemon log pertains to daemons only

Which of the following utilities is NOT part of the RPM Package Manager (RPM) suite?

dpkg (The RPM suite has several associated utilities, but dpkg belongs to the Advanced Package Tool (APT) (Debian) package management suite.)

Which command brings a program to the foreground that has been placed into the background?

fg The fg (foreground) command brings a program placed into the background into the foreground. The bg command can be used to place a program into the background. The kill command terminates a command whether in the foreground or in the background. The free command displays the amount of free memory in a system.

Based on current Linux system architecture limitations, the /boot partition must be placed on which filesystem type?

ext4 (Both / and /boot partitions must be placed on ext2, ext3, or ext4 filesystems only. Other partitions may have any type of filesystem type.)

Which disk management tool prepares a disk for simple partitioning?

fdisk (The fdisk command prepares the disk for simple partitioning. The pvcreate command prepares physical volumes to be used in logical volumes. The lvcreate command creates and names logical volumes. The vgcreate command creates and names volume groups.)

Which utility does an administrator use to create new partitions?

fdisk The fdisk utility is used to create new disk partitions. The mkfs utility is used to create a filesystem. The swapon and mksiwap utilities have to do with activating and creating swap partitions.

An administrator sets up a new disk on an existing system. Which utilities, and in which order, does the administrator use to set up the new disk for use?

fdisk, mkfs, mount The administrator first uses fdisk to set up the disk's partitions, then uses mkfs to create the filesystem(s), and finally uses mount to use the disk's partitions.

A user finds a file named file_backup on the system. How can the user determine which type of file it is, because it has no discernable extension or other identifier?

file file_backup The user should use the file file_backup command to determine what type of file it is. None of the other options will give any information about the type of file, and the ls | cpio command will overwrite the file as a cpio backup.

Which command do Linux users usually pipe input from when using xargs?

find The output of the find command is used as a filter for xargs and then xargs is used to take some action, such as removing files, further filtering results, or to display results in a more convenient pattern.

How does a user display the amount of free memory on a system in megabytes?

free -m The free -m command displays the amount of free memory in megabytes. The -M option is not a functional option. The -b option displays free memory in bytes. The -V option displays the free version.

Which of the following is an option on the GRand Unified Bootloader (GRUB) Recovery Menu?

fsck Check all file systems (The fsck Check all file systems choice is the option available on the GRUB Recovery Menu.) -GRUB gives you the option to felton all file systems -the heck with all

The gdisk utility supports a single command line option. Which of the following is the correct gdisk command line option?

gdisk -l /dev/sda The gdisk utility supports only one command line option for list, which is the (-l) option.

Which GRand Unified Bootloader (GRUB) Legacy utility is equivalent to the GRUB 2 utility grub2-mkconfig?

grub-mkconfig (The GRUB Legacy utility grub-mkconfig is equivalent to the GRUB 2 grub2-mkconfig utility.)

Which command does the system administrator use to reinstall GRand Unified Bootloader (GRUB)?

grub2-install /dev/sda (To reinstall GRUB, the system administrator uses the grub2-install /dev/sda command, where /dev/sda is the system's primary disk that is also bootable. Using grub2-install by itself, /mbr, and with sda only are the incorrect syntaxes for grub2-install. There is no /mbr option.)

Which command does a user execute to delete the exit command out of the command history from the history command output below? 1 ls -la 2 ps -ef |more 3 who 4 history 5 rm file.txt 6 touch newfile 7 exit 8 logout

history -d 7 The command history -d 7 will remove the exit command from history. To remove a specific command, use the command's corresponding history position offset.

What type of information does the regular expression '^http(s?):\/\/.*' match?

http or https web addresses The regular expression 'http(s?):\/\/.*' matches http or https web addresses.

One of the functions of the /etc/inittab file is to instruct the init process to start the user environment in the default runlevel of 3. Which entry below has the correct syntax to set the default runlevel in the /etc/inittab file?

id:3:initdefault: (The correct entry for the /etc/inittab default runlevel of 3 is id:3:initdefault:.)

Which command does a system administrator issue to generate a Password-Based Key Derivation Function 2 (PBKDF2) encrypted password for GRand Unified Bootloader (GRUB)?

grub2-mkpasswd-pbkdf2 (To set up a PBKDF2 encrypted password for GRUB, enter grub2-mkpasswd-pbkdf2. The command is interactive and will prompt twice for the password to encrypt.)

The X display manager (xdm), GNOME display manager (gdm), and KDE display manager (kdm) all depend on which program for launching one of them?

init (The launch of one of the graphical display managers (xdm, gdm, or kdm) depends on the init program. Using initrd loads an initial root file system into memory. The .login file loads the user's environment information for the csh or the tcsh. The .bash_profile is the program containing user-specific settings for the bash.) -init is the graphical part of the startup process -the managers are all display managers, aka graphical, so they pertain to the init program

Which command does a user issue to create a hard link from file.txt to list.txt?

ln list.txt file.txt The user issues the ln list.txt file.txt command. The syntax is: ln {target} {link name}. ln -s creates a symbolic link. The ln -f command removes existing destination files.

If a system administrator needs to kill or restart a particular application on a shared system, which command does the administrator use in order warn everyone on the system of the impending application shutdown?

wall (The administrator uses the wall (write all) command to send a message to all users. Using mail will work, but is not a speedy method of sending messages to all users. The telinit command is not a method of sending messages. The shutdown command warns users of an impending system shutdown.)

A user wants to create a list of every file in their home directory and save it to a file named homefiles.txt. Which of the following commands accomplishes this?

ls -aR > homefiles.txt The command that creates a complete list of all files in the user's home directory and saves it to the homefiles.txt file is: ls -aR > homefiles.txt. The -a option lists all files, and the -R option lists files recursively. The ls -la command will list files in the current directory only. The ls command will list non-hidden files only. The locate command will list every file in the mlocate database that the user has access to.

Which ls command produced the following output? -rw-r--r-- 1 root root 3042 Feb 16 20:47 passwd

ls -l The ls -l command provides the user with a long listing of directory contents displaying permissions, file name, file ownership, size, and last modified date and time. The ls -a command displays a list of all files, including hidden ones. The ls -s command displays a list of files by size and with file sizes. The ls -r command lists files in reverse alphabetical order.

Which ls command displays a list of files in the reverse order of when they were last modified? In other words, how does a user list files with the most recently changed files at the bottom of the list?

ls -ltr The ls -ltr command provides a long list, by modification time, in reverse order. The ls -r command lists files in reverse alphabetical order. The ls -lt command displays a long list sorted by modification time, newest first. And ls -t just displays the list by modification time, newest first.

Which of the following is NOT an acceptable method of using multiple pipes with the grep utility?

ls /etc/passwd | grep bash | grep -i fred The incorrect command is: ls /etc/passwd | grep bash | grep -i fred.

Duplicate the functionality of the following tee command by using only the ls command. ls | tee files.txt

ls > files.txt ; ls The ls > files.txt ; ls command duplicates the ls | tee files.txt command's output. The ls files.txt command will only display the files.txt file if it exists; otherwise, an error is displayed. The ls | ls > files.txt command gives no output to the screen.

Which of the following ls commands will redirect standard output (stdout) to a file and standard error (stderr) to the same file, logfile.txt, such that the administrator can keep a log of which files do and which files do not exist?

ls FY2011.txt >> logfile.txt 2>> logfile.txt The ls FY2011.txt >> logfile.txt 2>> logfile.txt command is the correct option because it uses >> (append) for both redirects of stdout and for stderr. All the other options use a single > (create/overwrite) option.

Which of the following creates the cpio archive, files.cpio, from a list of files?

ls | cpio -ov > /opt/bkup/files.cpio ls | cpio -ov > /opt/bkup/files.cpio. The cpio command creates archives by having some file listing piped to it. There are several methods of generating output from which to pipe into cpio, but typically ls or find are used to generate the list of files for its input. None of the other options have input piped into cpio; therefore, none of them work.

Which command produces output similar to the following?: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 2

lscpu (The lscpu command produces output related to the system's central processing units (CPUs). The lspci command produces output related to the system's Peripheral Component Interconnect (PCI) devices. The lsmod command displays a list of loaded modules. The lsusb command displays a list of all Universal Serial Bus (USB) devices.)

Which command does a user enter if the user needs help with the sudo command?

man sudo To get help with sudo, the user enters man sudo. The general form is: man command. Using help sudo will give an error, as will sudo /?, which is the DOS/Windows method of accessing command help. Typing export sudo will set the word sudo as an exported variable.

Which command creates the XFS filesystem?

mkfs.xfs The mkfs.xfs command creates XFS filesystems. The mkfs.ext4 command creates fourth extended (ext4) filesystems. The xfscreate and createfs commands do not exist.

Which command creates a filesystem suitable as swap space?

mkswap The mkswap command creates swap space. There is no mkfs.swap command. The swapon command activates the swap space after it has been created with mkswap. The swaplabel command changes the Universally Unique Identifier (UUID) of swap space.

Which of the following would NOT match the egrep command's search? egrep 'ton\b' file.txt

monotone The egrep 'ton\b' file.txt will match all except monotone, because the 'ton\b' matches the string at the end of the word.

Which mount option prevents an entry being made into the /etc/mtab file?

mount -n The mount -n option prevents an entry being made into the /etc/mtab file. The mount -a option mounts all filesystems. The mount -f option fakes a mounting of a filesystem. The mount -V option displays the version information for mount.

Which systemd target corresponds to the SysVinit runlevel 3?

multi-user.target (Runlevel 3 corresponds to the multi-user.target systemd target, whereas graphical.target is runlevel 5, rescue.target is runlevel 1, and reboot.target is runlevel 6.) -Runlevels: 0 halt system 1 single user 2, 3, 4 multiuser 5 multiuser 6 reboot

Which command successfully moves an entire directory and its contents to another directory?

mv dir1 dir2 The mv dir1 dir2 command moves dir1 into the dir2 directory. The -i option is interactive and will prompt for any overwrites. The -v option means verbose, which shows the user that the directory was moved. The option that includes rm dir1 is not necessary, because the mv command performs this function for the user.

Which of the following commands renames the file one.txt to once.txt?

mv one.txt once.txt To rename a file, use the mv command: mv one.txt once.txt. The cp command copies the file. REN is the DOS/Windows rename command. The rm command removes (deletes) both files.

Which of the following is the correct naming convention for RPM Package Manager (RPM) software packages?

name-version-release.architecture.rpm (The naming convention for RPM software packages is name-version-release.architecture.rpm.)

Which of the following nice commands does NOT change the execution priority of the test.sh command to a value of 10?

nice --10 test.sh The option --10 raises the priority to -10, whereas the other options lower the priority to 10.

Which of the following is the correct syntax usage of the nice command to set a specific priority on a user script, ping_network.sh?

nice -10 ./ping_network.sh The correct syntax for the nice command is: nice -10 ./ping_network.sh.

What is the output of the command sed s/two/nine/ numbers.txt on the contents of numbers.txt below? numbers.txt: one two three

one nine three The command sed s/two/nine/ numbers.txt replaces all instances of the string two with the string nine.

A user has a file, list.txt, with the following contents: one one two three four four five If the user cats the file and passes it through uniq (cat list.txt | uniq), what will be the output?

one two three four five The uniq command filters out all repeated lines; therefore, the duplicate one and duplicate four would be removed to give the following as output: one two three four five

Which utility does a system administrator use to partition a 4 terabyte (TB) disk as a single partition for a database server's data storage?

parted The parted utility can partition filesystems larger than 2 TB in size. The fdisk utility will partition them, but it has a 2 TB limitation. The mkfs utility creates filesystems, but does not partition disks.

Which RPM Package Manager (RPM) utility does a system administrator use to extract individual files from an RPM package?

rpm2cpio (The rpm2cpio utility allows an administrator to extract files from an RPM package. The rpm command installs and removes RPM packages. Yellowdog Updater, Modified (YUM) is the front-end installer for RPM. The yumdownloader utility allows administrators to download RPM packages from yum repositories.)

Which of the following is the default option for mounting a filesystem?

rw The default mount option is read/write, or rw.

To use a mounted filesystem as storage, which option must be enabled?

rw To use a mounted filesystem as storage, the rw (read/write) option must be enabled. The ro (read only) option only allows read access, but no write. The noexec option means that no executables can be run from this filesystem. The auto option means that the filesystem will be mounted automatically.

Which mount options would be appropriate for a filesystem to be used securely as file storage that users may write to, but not run applications from?

rw,noexec,async Use rw,noexec,async. The more secure setting for a storage filesystem that users can write to is noexec, but also requires rw and should be set to async so that multiple users can read and write to the filesystem with the best performance. A noexec setting means that executable programs cannot be run from this filesystem. A read-only filesystem is not useful as a user storage location. The exec setting lowers the security on a filesystem. The user setting also lowers security in that users can mount or unmount a filesystem.

What are the resulting permissions on a new file if a user enters umask 000 just prior to creating the file?

rw- rw- rw- A umask of 000 yields a new file with permissions of rw- rw- rw-, or 666.

Which of the following is known as the stream editor command?

sed Sed is the streams editor command. Vi is the visual editor. Split is a command that splits files into two equal parts. Fmt formats text to a specific width.

Which command allows a user to edit a file without opening the file with an interactive editor program?

sed The sed command is the stream editor and it allows a user to edit files without opening them in an editor. The grep commands only search for strings, but cannot edit.

If a user wants to quickly search for the process ID (PID) of a specific process, for example, mysqld, which command should they use?

pgrep mysqld pgrep mysqld. The quickest method of isolating a PID for a process is to use pgrep and the process name. The other methods work, but they are not quick.

Which of the following is NOT a method for isolating a single process on a system?

ps -e The ps -e command lists every command currently running on the system. It is not a method of isolating a single process.

How does a user display the process table for all users on a system?

ps -ef The ps -ef command displays all processes in full format. This is the standard method of displaying the process table. The ps, ps -a, and ps -af commands show processes triggered only by the user who issues the ps command.

Which Logical Volume Manager (LVM) tool prepares physical volumes to be used in logical volumes?

pvcreate (The pvcreate command prepares physical volumes to be used in logical volumes. The lvcreate command creates and names logical volumes. The vgcreate command creates and names volume groups. The fdisk command prepares the disk for simple partitioning.)

How does a user run multiple commands on a single line, for example, run pwd and then run uname on the same line?

pwd ; uname The proper method of executing multiple separate commands on a single line is: pwd ; uname. Separate the commands using a semicolon. The | operator will not work, because pwd's output is incorrect for uname input and uname accepts no input. Neither the colon nor the comma is a proper command line operator.

If the regular expression to convert lowercase letters to uppercase is: sed 's/./\U&/g' file.txt, then what is the regular expression for converting uppercase letters to lowercase letters using the sed command?

sed 's/./\L&/g' file.txt The sed 's/./\L&/g' file.txt command converts all uppercase letters to lowercase in file.txt. The sed 's/./\u/g' file.txt command converts all lowercase letters to uppercase the same as \U. The other options replace letters with the substitution string.

A user has a list of topics in a file and wants to be sure that all topics begin with capital letters. Which of the following commands can accomplish this task?

sed -re 's/^./\U&/' file.txt The sed -re 's/^./\U&/' file.txt command will convert all first letters to uppercase on each line. The other options attempt to replace the first match with the literal second argument.

Which key does a user type in command mode to overwrite a single character in vi?

r The r key allows a user to type over a character after the command is issued. The R key allows a user to overwrite an unlimited number of characters. The x deletes one character. The d key deletes a line or a character after a navigation key has been pressed.

Which command removes all files and directories under the current directory?

rm -rf * The rm -rf * command removes all files and directories in the current directory. This is an extremely dangerous command to run, especially for the root user, and its effects are irreversible. The rm * and rm *.* commands remove all visible files but not directories or hidden files in the current directory. The rm .* command removes all hidden files in the current directory.

Which of the following commands successfully removes a directory, dir1, and all its contents?

rm -rf dir1 The command rm -rf dir1 recursively removes dir1 and all files contained in it. The -f option is to force without prompting. The rmdir dir1 command will not remove a directory that includes files. The rm dir1 command will not remove a directory, empty or not. RD dir1 is the DOS/Windows command for removing a directory.

How does a user correctly delete the file, file.txt from the user's home directory?

rm file.txt The correct method of deleting a file is rm file.txt. DEL is the DOS/Windows delete command. Copying a file to /dev/null does not delete file.txt, but does send a copy of it to /dev/null. The rm command cannot accept a text stream.

Which of the following rpm commands reinstalls a package (package.rpm)?

rpm -F package.rpm (The rpm -F package.rpm command will reinstall the package.rpm package. The rpm -U command upgrades a package. The rpm -e command removes a package. The rpm -i command installs a package.)

Which of the following commands includes both a pipe and a filter?

sort /etc/passwd |grep 50 The sort /etc/passwd |grep 50 command first filters the command with sort and then pipes it using grep 50. The other three options are redirects. Cat and nl are filter commands.

Which two commands would a user combine into a command to alphabetize a file's contents and then display its last 10 lines of content?

sort and tail Sort and tail. Sort alphabetizes the contents of a file, and tail displays the last 10 lines of content. Uniq removes repeated lines, and head displays the first 10 lines. Sed replaces text in a file, and join combines two files that share a common field. Cat displays a file, and cut filters a column or field.

Which of the following is the correct name for a yum repository configuration file?

sources.repo (The correct yum repository file is named with a .repo suffix and it is placed into the /etc/yum.repos.d directory.)

A system administrator finds what seems to be a stray file (/etc/lynx.lss) on the file system and wants to know which package the file belongs to. Which command does the system administrator run to find which package this file belongs to?

rpm -qf /etc/lynx.lss (The rpm -qf /etc/lynx.lss displays the rpm from which the file came. The rpm -qa /etc/lynx.lss command gives an error, as does yum info /etc/lynx.lss. The command file /etc/lynx.lss identifies which type of file it is, but does not provide information about which package the file came from.)

Which rpm command does a system administrator use to find the installed locations (directories) of files in a package (for example, openssl)?

rpm -ql openssl (The rpm -ql openssl command displays all files in the installed package and their installed locations. The rpm -qc openssl command lists the configuration files for openssl. The rpm -qa openssl command displays the openssl package only. The rpm -qpl openssl command will display an error if the package is installed; if the package is not installed, then the command displays the files in the package.)

Which of the following commands will download and install the lynx package?

yum install lynx (The yum install lynx command will download the lynx package and install it along with any dependency packages.)

How does a system administrator uninstall a package (for example, lynx) from a system that uses RPM Package Manager (RPM)?

yum remove lynx (An administrator uninstalls a package from an RPM-based system using the yum remove {package} command. For this example, yum remove lynx.)

Which of the following yum commands is equivalent to Debian's apt-get upgrade command?

yum update (The Debian apt-get upgrade command matches the yum update command that downloads and installs all available package updates. The yum check-update command only checks which packages have available updates. The yum info command displays a description of the specified package. The yum list command displays details of a specified package or lists the statuses of all packages on the system if a package name is not given.)

Which command combines files in such a way that they are packaged into a single file for convenient archiving purposes?

tar The tar, or tape archive, command collects a defined group of files and places them into a single file that makes it easy to transfer and archive those files. The cat command displays the contents of a file. The file command identifies the type of file. The find command locates a file or files based on search criteria.

Which option allows a user to see only a particular user's processes in top when starting the top program on the command line?

top -u username The top -u username command allows a user to see the processes specified by username. None of the other top command options work with username as a parameter.

Which command unmounts the /dev/sdb2 filesystem from /data?

umount /data The umount command followed by the mounted filesystem or the mount point unmounts the filesystem: umount /data.

Which command does the administrator use to update the mlocate database for the locate command?

updatedb The administrator issues the updatedb command to update the mlocate database. This refreshes the files contained in the database.

Which Logical Volume Manager (LVM) command creates and names volume groups?

vgcreate (The vgcreate command creates and names volume groups. The lvcreate command creates and names logical volumes. The pvcreate command prepares physical volumes to be used in logical volumes. The fdisk command prepares the disk for simple partitioning.)

At the command line, how does a user open multiple files for editing with vi?

vi file1.txt file2.txt file3.txt Execute vi at the command line and all the files to open with it: vi file1.txt file2.txt file3.txt.

In most Linux distributions, instead of the traditional vi editor, which editor are users actually editing files with when they type vi file.txt?

vim In Linux, the traditional vi editor has been replaced with vim (vi improved). Nano, gedit, and emacs are all alternatives to the vi(m) editor.

Which GRand Unified Bootloader (GRUB) timeout value will cause the GRUB boot menu to remain on the screen indefinitely until an administrator manually selects an option?

-1 (To display the GRUB menu indefinitely until a manual entry is made via the keyboard, the timeout value must equal -1.)

Which numeric kill option is SIGKILL?

-9 The SIGKILL signal is -9. As an example, kill -9 6847. It is an immediate termination of a process. -15 is a gentle termination, or SIGTERM. -2 is the SIGINT, which is the same as using Ctrl+C. The -HUP signal means hangup, which is to say, stop and restart immediately.

To copy a directory and its contents to another directory, which option or switch must be used?

-R The -R option is the recursive option, which is required to copy one directory and its contents to another directory. The -p option preserves permissions. The -v option is for verbose output. The -u option is for update, to copy only when the source directory contents are newer than the target's.

Using metacharacters, how would a user isolate text entries that have three random alphanumeric characters with the fourth character being a period (.) within a file from all other text entries? Examples: 123. bob. sally john day.

...\. The metacharacter match for three random characters and the fourth being a period (.) is (...\.). The ..... metacharacter will capture all entries with more than five characters, with no special consideration for the period in the line. The \W metacharacter will match any line with non-alphanumeric characters in it. The .* metacharacter will match everything.

How does a user successfully run this script: file_list.sh, which is in the user's current directory?

./file_list.sh (Use ./file_list.sh. The script must be run with the leading ./ so that the user's path is overridden and the current directory is used. Simply running file_list.sh will fail with a command not found error because the current directory is not in the user's path. The runas command is a Windows command. Sudo -c would not work because the script is in the current directory. )

In which file is the user's command history stored?

.bash_history The hidden file .bash_history stores a running list of previously used commands. The .bashrc file is a hidden file that sets shell variables for the user. The .profile file sets global profile variables for the user. The .ssh/known_hosts file maintains a list of previously used hosts that the user has connected to via ssh, along with the remote system's fingerprint.

When a user compresses an archive using the bzip2 command, which suffix does the bzip2 command give the compressed archive file?

.bz2 The bzip2 command appends the archive file name with the .bz2 suffix (extension), indicating that it has been compressed using the bzip2 command. The .tar suffix is traditionally used for files archived using the tar command. The .gz suffix is appended to an archive by the gzip utility. The .zip suffix is appended to the file name by the WinZip utility for Windows computers.

When a user uses the xz command to compress an archive, which file name suffix does the xz command append to the archive?

.xz The xz compression utility appends the .xz suffix to the archive file name. The .gz suffix is added by the gzip command. The .tar suffix is added by the user traditionally when using the tar command, and then passing the archive through gzip adds the .gz suffix. The .Z suffix is added by the compress command.

Which vi command allows a user to delete 10 lines of text in a file?

10dd 10dd deletes 10 lines in vi. 10x deletes 10 characters. 10A moves the cursor to the end of a line of text in insert mode, but the 10 has no effect. 10d removes lines or characters in the direction of navigation entered after the command.

What is the advisable logical partitions limit per drive?

12 (There is no restriction on the number of logical partitions, but it is advisable to limit it to 12 logical partitions per drive.)

How many partitions can a Globally Unique Identifier (GUID) Partition Table (GPT) disk have?

128 GPT supports up to 128 partitions and makes no distinction as to primary or extended. Master Boot Record (MBR) has a four primary partition limitation.

Identify the method of redirecting standard error (stderr) to standard output (stdout) using a single operator.

2>&1 2>&1 redirects stderr to stdout. The reason a user or an administrator uses this combination operator is that it is an easier method of manually writing results to a file. This is used when the user or administrator wants all output saved to a file, even if the output is an error.

How does a user move two lines of text from one location in a file to another location using vi?

2dd, navigate to the new location, p 2dd, navigate to the new location, p. Delete the two lines from the current location, navigate to the new location, and press p to paste the lines. Using y (yank) copies the files instead of moving them. The u key will undo the deletion of the two lines.

What is the octal value of the Set User ID (SUID)?

4 The octal value of the SUID is 4.

What is the octal value of the read permission?

4 The octal value of the read permission is 4.

Which of the following octal permissions is read only for a file?

444 444 is r-- r-- r--, which is read permission only. 666 is rw- rw- rw-. 777 is rwx rwx rwx. 222 is -w- -w- -w-.

What does the top command display for a user?

A dynamic list of the top resource-consuming processes The top command displays a dynamic process table and some system statistics. The top resource-consuming processes are shown at the top of the list. The amount of free memory on a system is found with the free command. The top command does not provide the list of the largest programs running in memory. The jobs command displays job information, and only for the user who executes it.

What is the primary difference between a pipe and a redirect?

A pipe takes a data stream of output from one command that is input to the next command, and a redirect is a stream of output that is usually directed to a file and not to another command. A pipe takes the output from one command and uses it as input to the next command, and a redirect is a stream of output that is usually directed into a file and not to another command. Pipes are unidirectional, as are redirects. A pipe converts output to input and does not redirect any stream to a file.

When a user works at the command line, what is the user actually working in?

A shell When a user works at a command line, the user is actually working inside a shell, which is a user environment for executing commands and working with the operating system. The command line is not the graphical user interface. A DOS window is a Microsoft command line. The shell is an integral part of Linux and not external to it.

Why is a tebibyte significantly larger than a terabyte?

A terabyte is the decimal version, based on 10, of the binary tebibyte, which is based on 2. The terabyte is based on 10 or decimal, which means that it is one trillion bytes, whereas the tebibyte is one kilobyte (1,024 bytes) multiplied by 1,024 bytes by 1,024 bytes by 1,024 bytes (or 1,099,511,627,776 bytes).

Which results will the following command display? egrep '^[a-e]' file.txt

All lines that begin with a, b, c, d, and e All lines that begin with a, b, c, d, and e. The [] can contain ranges, so [a-e] means all letters from a to e, and the ^ means at the beginning of the line or word. You use $ for the end of a line or word.

Why do scripts spawn subshells when a user executes them?

Because the first line in the script spawns the new shell (Scripts spawn new shells because typically the first line of a script identifies the shell in which the script will run. For example, #!/bin/bash tells the script to run the script's commands in the bash shell. If no designation is made, the script runs in the user's default shell. Commands run interactively on the command line do not run inside a new shell. The new shell is not a function of which user runs the commands. Scripts can run in any shell.)

Why are the vi editor and vim preferred by many Linux administrators?

Because they are efficient and customizable The vi editor and vim are efficient and customizable. The other options are also true, but the editors are preferred because of their efficiency and the capability to be extensively customized.

Which type of file is a shared library?

Binary (A shared library is a binary (compiled) file. Some shared libraries have links, but they are not themselves the libraries. Shared libraries are not normally encrypted, but they are compiled. Libraries are not device files.)

If a system administrator edits the GRand Unified Bootloader (GRUB) menu boot options by entering a space and the number 1 after a standard GRUB entry, what does this entry instruct the boot loader to do?

Boot to runlevel 1 (Placing a space and a 1 after a standard GRUB menu entry boots the system to runlevel 1. There is no option for single disk booting. Booting to the graphical interface is runlevel 5. The number of virtual consoles cannot be manipulated at boot time.) -Grub relates to runlevels

Which of the following is NOT a shell function?

Booting the system The option that is NOT the function of a shell is booting the system. The bootloader's job is to boot the system. No shell is available in the boot process.

If a user edits a file that is hard linked to another file, what happens to its linked file?

Both files are changed. If a user edits a file that is hard linked to another file, both files are edited because they both point to the same inode.

What is the requirement for combining two files using the join command?

Both files must have a common field. The requirement for joining two files is that they share a common field on which to join. The common field is usually numeric, and both must share the same numbers for a proper join. There are no size restrictions.

The lsusb command's output is similar to which of the following?

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 005: ID 0bda:0111 Realtek Semiconductor Corp. Card Reader Bus 002 Device 002: ID 0b38:0010 Gear Head 107-Key Keyboard Bus 002 Device 004: ID 147a:e00d Formosa Industrial Computing, Inc. Bus 002 Device 005: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse (The lsusb command displays information about the system's Universal Serial BUS(USB) buses and attached USB devices. The other choices show output from lsmod, output from lspci, and output from lscpu.) -Don't forget the B in USB means BUS!!!

How does a system administrator resize logical volumes?

By absorbing or ejecting physical volumes (An administrator resizes logical volumes by absorbing physical volumes to enlarge or by ejecting physical volumes to shrink. Using available free space works only in enlarging a volume. Neither of the other two options is a software solution for logical volume management.)

A computer is set up to boot to Linux or to Windows with Windows set as the default selection. How does a user boot into Linux?

By manually selecting Linux at the boot menu (The user would boot into Linux by manually selecting it from the boot menu. Rebooting multiple times will not change which system boots by default. There are no operating system choices in BIOS. The user could change the boot order in Windows, but doing so is unnecessary and risky.)

The export command confuses a new Linux user. How can the user find immediate help for the export command?

By using the Linux man pages Users can always find help through the system's help system, known as man (manual) pages. The user will receive errors when typing google export or export /? at the command line. The export /? is the DOS/Windows method of obtaining system help with a command. If the user enters export with no options or arguments, the command displays a list of currently exported names.

If a user does not want to cd (change directory) to, for example, the /etc directory, how does the user display a list of files from that directory?

By using the absolute path in the command All of the options will work, but the most correct, and the most often used, is to supply the absolute path to the remote directory that the user wants to work with in a command.

If a user wants to execute a command that is not included in their path, how do they execute the command?

By using the full path to the command A user who wants to execute a command that is not in their path must use the full path to the command when executing the command.

How can a user instruct a command to accept a command's output as its input that does not accept another command's output as its input? For example, how can a user instruct the echo command to accept output from ls as input?

By using xargs A user has to use xargs, which essentially adds arguments to the command and then executes it. Echo does not accept piped input or redirected input. The tee command does not work, because echo does not accept redirected output as input.

Other than specifying a size for a partition, which other task can an administrator perform on a partition using the fdisk utility?

Change the partition's type (An administrator can use the fdisk utility to change a partition's type from NTFS to Linux, for example. Partitions do not have geometry, but hard drives do. An administrator cannot perform any logical-volume-related task using fdisk because it is only capable of working with simple volumes.)

What are bracket ([]) expressions?

Characters inside the brackets match any one character. Bracket expressions are characters enclosed in square brackets that match any one character inside the brackets. For example, h[a o u]g can match hag, hog, or hug.

An administrator needs to set quotas for more than one user for a particular resource. What is the most efficient method of setting the quota for the list of users?

Create a group and then edit the quota for the group. The most efficient method of setting up a quota for several users is to edit the quota for a group. Editing the quota for individual users is time consuming and unnecessary. A generic account should never be used for any resource—it is a serious security violation.

Which term has the definition: Packages that a target package requires for its functionality?

Dependencies (Dependencies are the packages that a target package requires for its own functionality. Man, or manual, files are additional files that are often included in packages, but are not required for functionality. Any scripts required are included in the package itself. Shared libraries might be part of the primary or the dependency packages, but are not themselves always separate packages.)

Which of the following editors does the GRand Unified Bootloader (GRUB) menu most resemble in functionality?

Emacs (On the GRUB menu screen, after entering edit mode, the instructions inform the user that "Minimum Emacs-like screen editing is supported." The vi editor is a standard *nix editor, but is not supported for GRUB editing. Pico is an editor supplied with Pine. The nano editor is an independent clone of the Pico editor—neither of which is supported for GRUB editing.) -E snacks on Grubs -Emacsgrubs

Why is the second extended filesystem (ext2) still supported in contemporary Linux filesystems?

Ext2 is supported for backward compatibility. The ext2 filesystem is still supported for backward compatibility. Ext2 is not compatible with VFAT or NTFS.

Which type of disk partition may contain several file systems?

Extended (An extended partition may contain multiple file systems. A primary partition may contain only one file system. There are no converged or hyper-converged partition types on hard drives.)

Which information does the apt-cache show openssl command display?

Extended information about the openssl package (The apt-cache show openssl command displays extended information about the openssl package, including size, file name, version, architecture, maintainer, and much more.)

After editing GRand Unified Bootloader (GRUB) boot options, how does one accept the changes and continue booting the system?

F10 (To resume the boot process after editing GRUB options, the administrator presses the F10 key. Esc would return to the menu, discarding any changes made. Ctrl+Alt+Del would reboot the system, discarding changes. Ctrl+B has no effect.) -Escape would not save changes -Not the same as the VI editor

Which of the following terms may be described as a structured form for data storage that maintains information, such as the date of creation, file size, file type, and file permissions?

File system (A file system is a structured form for data storage that also maintains file information such as creation date, size, type, and permissions. An inode is a data structure that contains information about files and is stored on the file system. A partition is a logical separation structure for hard disks that limits the amount of space within it and may contain a single file system. A sector is a physical storage unit on a hard disk.)

Identify the type of the following command: sort /etc/passwd

Filter The sort command is a filter for the /etc/passwd text stream.

What is the physical location of the master boot record (MBR) on the hard disk?

First physical sector (The MBR occupies the first physical sector on a hard drive.)

The gdisk utility is used to manipulate disk partitions, and its name is short for which of the following?

GPT fdisk The gdisk utility's name is short for GPT fdisk.

What does the acronym GRUB stand for?

GRand Unified Bootloader (The GRUB acronym stands for GRand Unified Bootloader.)

Which of the following is the latest version of the current Linux boot loader?

GRand Unified Bootloader (GRUB) 2

If the grub> prompt appears on boot, what is likely the problem?

GRand Unified Bootloader (GRUB) may be corrupted. (If a system incompletely boots to the grub> prompt, then it is likely that the GRUB installation has been corrupted. If another operating system overwrote or installed over the GRUB boot loader, then the grub> prompt would not appear. GRUB will not stop on the grub> prompt if outdated.)

What does the acronym GPT stand for?

Globally Unique Identifier Partition Table The GPT acronym stands for Globally Unique Identifier (GUID) Partition Table (GPT).

Which of the following is NOT one of the major boot process divisions or sections?

Graphical Interface

Hard links have two significant limitations. What are they?

Hard links cannot cross filesystems or directories. Hard links cannot cross directories or filesystems—they must reside in the same directory on the same filesystem as their linked file. The other options are hard link features.

What does the following command do? chgrp -R users /data

Group ownership of the /data directory has changed to users, recursively. Group ownership of the /data directory is now the users group, and it has been changed recursively. The -R option does not mean 'read'; it means recursive.

What is the name of the graphical version of the vim editor?

Gvim Gvim is the graphical version of the vim editor. Emacs is an alternative to vi for command-line interface (CLI) editing. Gedit and KWrite are both graphical editors.

Which of the following commands moves the cursor to the top of the screen?

H The H command moves the cursor to the first line of the screen. The gg command moves the cursor to the first line of the file. The G command moves the cursor to the last line of the file. L moves the cursor to the bottom of the screen.

Most server systems have which type of hotplug devices

Hard disk drives (Hotplug or hot swappable hard drives are very common in server systems.)

Where are static libraries found on the file system?

In the same locations as shared libraries (Static and shared libraries are found in the same locations, /lib, /usr/lib, and in other locations with individual application libraries. The locations /lib/static, /usr/lib/static, and /stlib do not exist on standard Linux systems.)

Where does a system administrator alter the boot device order?

In the system's Basic Input-Output System (BIOS) (The only location where the boot device order can be altered is in a system's BIOS.) -Because input and output means devices, and the question is asking for device order editing

Identify the correct method of resetting the priority of a process.

In top, press r, enter the process ID (PID) of the process to alter, and enter the nice value. Using the top command, type r for renice, enter the PID, and enter the nice value. The n value is a number of processes to display in top. The nice and renice commands have the incorrect syntaxes for their use.

Which of the following tasks do the Debian package management tools perform?

Install, list, and remove packages (The Debian package management tools install, list, and remove software packages and their dependencies.)

What is the purpose of the Yellowdog Updater, Modified (YUM) component of the RPM Package Manager (RPM)?

It acts as the front-end package installer for RPM. (YUM is the component of the RPM package manager that acts as the front-end package installer.)

Where does the Linux installer place the boot loader?

Into the master boot record (MBR) (The Linux installer places the boot loader—GRand Unified Bootloader (GRUB) 2—into the MBR.) -Can't have boot loader without the MBR, the boot loader is in MBR (probably false but I'm using it for the sake of memorization)

What does the 'auto' option grant or provide when entered into the <options> column in /etc/fstab?

It allows the system to automount the filesystem. The 'auto' option under <options> in /etc/fstab means that the system may automatically mount the filesystem upon boot.

What is the function of the ? key in command mode?

It allows the user to search backward through the document for specific text. The ? allows the user to search backward through a document for a string.

What function does the jobs command perform for a user?

It allows the user to view all processes the user has placed into the background. The jobs command allows the user to view all background processes and their statuses. The jobs command allows users to only view the processes, and it does not bypass security.

What does the 2>> operator do when it is used as part of a command, ls FY2011.txt 2>> files.txt, for example?

It appends any error output to the files.txt file. The 2>> operator will append any information in the files.txt file with its own error information. It will not overwrite anything. The >> is the append redirection operator.

The grep utility is a versatile one in that it can search for strings inside of files, but it can also accept which type of information from other commands?

It can accept input from piped streams. The grep utility can accept input from piped streams. In fact, piping to grep is perhaps the most popular method of using it. Grep cannot accept redirected output, stderr, or interactive information.

When using the xargs command, what is the -d option's function?

It describes a string delimiter. The xargs -d option describes a file's delimiter, which is to say the character that separates lines or items in a file.

Describe the result of the following command: cat newfile.txt

It displays the contents of newfile.txt to the screen. The cat newfile.txt command displays the contents of the newfile.txt file to the screen. Newfile.txt is not being redirected to any location or to any command. Cat does concatenate, but without options, it only displays the contents of a file.

What is the function of the :num command?

It displays the line number of the cursor position and the text. The :num command displays the line number at the cursor's position in the file and displays the line of text.

If an administrator issues the set command with no options or arguments, what does the command display?

It displays the names and values of all shell variables and functions. The set command with no options or arguments displays a list of shell variables, their values, and functions.

What information is displayed with the command ldconfig -V?

It displays the version information for ldconfig. (The ldconfig -V command displays version information for the ldconfig utility. The ldconfig -v command displays current version number, the name of each directory as it is scanned, and any links that are created. The ldconfig -p command displays lists of directories and candidate libraries stored in the current cache. The ldconfig -? command displays usage information.)

What does the following typical administrative find command do? find / -atime +90 -print

It finds all files that have not been accessed in the last 90 days. The command finds all files that have not been accessed in the last 90 days. The -atime option is accessed time, and +90 is 90 days.

For which purpose is the aptitude program used?

It has the same functionality as apt-get. (Aptitude has the same functionality as the apt-get program. It does not update Debian mirror repositories. It can remove software, but that is not its only function. It is not a repair or recovery tool.)

What is the purpose of the -i option for the egrep command?

It ignores case. The egrep -i option means to ignore case in the same way that grep -i does.

What does the following command do? rpm -i openssl-1.0.0-27.el6.x86_64.rpm

It installs the openssl package. (The rpm -i package-name.rpm command installs the file. The -i switch is the install switch for the rpm command.)

What is a mount point?

It is a directory upon which a device or a filesystem is accessed. The mount point is a directory location where users are able to access a device or a filesystem.

What is the jobs table?

It is a list of jobs running in the background. The jobs table is a list of all jobs running in the background. The jobs command displays only current background jobs and their statuses.

What is the Logical Volume Manager (LVM)?

It is a software tool used to manage disk storage. (The LVM is a software tool used to manage disk storage on a computer system.)

What is a regular expression?

It is a string of characters that form a pattern in order to match an alphanumeric string or range of strings. All of the options are possible using regular expressions, but regular expressions themselves are strings of characters that form a pattern in order to match an alphanumeric string or range of strings.

What is the process table?

It is a summary of processes currently running on a system. The process table is a summary of currently running processes on a system. The list of jobs is the jobs table. A list of processes owned by the root user is part of the process table. No table of programs that can run in memory exists on a system by default.

In Linux, what is the command line?

It is a text-based interface. The Linux command line is a text-based interface in which users can interactively work with the system through a series of commands and scripts. A DOS window and a CMD prompt are both Microsoft command line interfaces. An xterm window is a graphical command line shell used within the graphical user interface.

Which of the following is NOT a feature of the fourth extended filesystem (ext4)?

It is compatible with New Technology File System (NTFS). The correct answer is that it is NOT compatible with NTFS.

What does the 1> operator do in the command ls 1> files.txt?

It is standard output (stdout) and the same as >. The 1> operator is the same as the >, standard output (stdout), operator. Standard error is 2>. There is no operator other than < for input.

What part does the kernel play in the Linux operating system?

It is the core of the operating system. (The kernel is the core of the operating system. It contains system-level commands. It manages file system access, memory, processes, devices, and all resource allocation.)

What is a disk quota?

It is the disk space allotted to a user for file storage. A disk quota is the disk space that is allotted to a user for file storage on a computer. There are no minimum numbers or maximums for types of files per user.

In the /etc/fstab file, what does the <type> category or heading mean?

It is the filesystem type. The <type> heading refers to the filesystem type, such as second extended filesystem (ext2), third extended filesystem (ext3), etc.

In the mount /dev/sda3 /test command, what is /test?

It is the mount point. In the mount /dev/sda3 /test command, the /test directory is the mount point. The mount point is always a local directory upon which some filesystem, local or remote, is mounted.

When using the dd command, what is the purpose of the 'of' option?

It is the output file option. The 'of' option defines the outfile for the dd command. The input file option is 'if'. There are no overflow or octal format options.

What is the importance of the root (/) file system?

It is the parent directory for all other directories. (The root (/) file system is the parent of all other file systems—it lies at the root level. It is not dynamically expandable under simple partitioning. It has the same general permission restrictions as other directories. It is often the smallest of all directories because system administrators historically have stated that nothing needs to be written to the / directory for any reason.)

What does the < operator do for a user?

It sends the contents of a file to a command as input. The < operator sends the contents of a file to a command as input for that command. Typing words at the prompt is writing standard input to standard output. Redirecting errors to /dev/null or anywhere else requires the standard error, 2>, operator.

In a display from ps -ef, what is the column header PPID?

It is the parent process ID (PID) for the process. PPID is the parent process ID of the process. The parent process is the process that spawned the process.

What is the nice value of a process?

It is the processes' priority in using shared system resources. The nice number refers to the priority a process has on the system. Because all resources have to be shared, if a process has a high priority, it is not as nice as one with a normal priority.

What is the LD_LIBRARY_PATH variable typically used for?

It is used in development and testing. (The LD_LIBRARY_PATH is used for development and testing, but not in normal use.)

What does the following command, issued by the root user, do to the test.sh (PID 6547) script issued by user bsmith? renice 5 6547 -u bsmith

It lowers the priority to 5. The renice command lowers the priority to a value of 5. Remember that a negative number raises or increases the priority, while a positive number lowers or decreases the priority.

An administrator creates a script and then issues the following command: chmod a+x. What does this command do to the script?

It makes the script executable for everyone. The chmod a+x command makes the file executable for everyone, because the '+' adds permissions, the 'x' is executable, and the 'a' means all users or everyone.

If a user's shell is set to /bin/false, what does this mean to the user?

It means that the user cannot log in to the system. The /bin/false designation means that the user account cannot log in to a shell on that system. This usually means that the user account is a daemon or service account and it would be a security problem if this user could log in. For an account with /bin/false, it just means that there's no interactive shell available, but the account has not been deleted or disabled. It has nothing to do with a security violation, such as hacking attempts.

What is meant by the term, file globbing?

It means using wildcard characters as a pattern match. File globbing means to use wildcards to specify a large number of files to be processed or to gather a set of files based on some pattern. Globbing can be used for any of the other options, but the options themselves are not globbing.

What does the mount -a command do when issued by the root user?

It mounts all unmounted filesystems specified in /etc/fstab. The mount -a command mounts all unmounted filesystems specified in /etc/fstab.

What does the j key do in vi?

It navigates down in the file one line at a time. The j key navigates downward in a file one line at a time. The k key navigates up one line at a time. To navigate right, use the l key. The x key deletes one character at a time.

In using the grep utility, what does the -v option do?

It omits the specified string following it. The -v option omits the string following it.

Administrators often add the following redirection to shell scripts: 2>/dev/null What does the redirection do for the administrator who uses it?

It redirects all standard error (stderr) to /dev/null, essentially discarding it. This command sends all stderr to /dev/null, which discards it from the system. It is a method of suppressing errors. There is no further processing available after a redirect to /dev/null. A redirect to a tape archive would be a pipe rather than a redirect. To send all stderr to stdout, use 2>&1.

During the boot process, what does the kernel do after mounting the root partition?

It releases unused memory. (After the kernel mounts the root file system, it releases unused memory. It then executes the init program to initiate the appropriate user environment, which might or might not include the graphical user interface, depending on the runlevel. It does not create a rescue volume or recompile itself—recompiling is a manual task performed by the root user.) -After choosing a space [the partition] it leaves the rest available for other use

What does the following rpm command do? rpm -e lynx

It removes the lynx rpm package. (The rpm -e lynx command removes the lynx package. The rpm -U command would upgrade lynx. The rpm -F command reinstalls lynx. The rpm --test lynx command simulates an installation. Lynx is a text-based browser that is used at the command line. It is very fast, but somewhat limited in use.)

What function does the . command have in vi?

It repeats the last text edit. The . command repeats the last text edit.

Which operation does the following command perform for a user who has a file containing a list of words? sed -re 's/^(B|b)/C/' file.txt

It replaces all occurrences of words beginning with the letters B or b in a file with the letter C. The command replaces all occurrences of words beginning with the letters B or b in a file with the letter C, but only replaces the first letter because of the ^ metacharacter. The pipe character is the regular expression for or.

Piping a command to the grep utility is a very common practice in Linux. What does grep do for a Linux user?

It searches for a string inside a file. The grep utility searches for a string within a file or a group of files. The split utility splits files into equally sized parts. The pr utility is one that prepares a file for printing. There are several archive utilities, such as tar, compress, and bzip2.

What does the apt-cache search openssl command do?

It searches the cached package list for a particular regular expression (regex) pattern (openssl). (The apt-cache command searches through the local cache for a regex pattern, such as openssl.)

Which of the following is a major feature of the Virtual File Allocation Table (VFAT) filesystem compared to the File Allocation Table (FAT) filesystem?

It supports long file names. The VFAT filesystem is a 32-bit filesystem that was introduced with Windows 95, and it supports long file names. It is not compatible with ext2, nor does it compare favorably with XFS.

What other function does a package manager perform other than allowing the administrator to search for, install, upgrade, and remove packages?

It tracks the files that are provided with each package. (The package manager tracks the files that are provided with each package. The package manager does not assume package security responsibility, handle file permissions, or cover BIOS patching.)

What does the following xz command do? xz -dq files.tar.xz

It uncompresses the compressed archives and suppresses errors. The xz -dq files.tar.xz command uncompresses the compressed archive and suppresses errors. The -q option is for -quiet (suppress errors), not quit. The -d means decompress. The -t option is used to perform an integrity check.

What does the following command do? # grub2-mkconfig -o /boot/grub2/grub.cfg

It updates the GRand Unified Bootloader (GRUB) 2 configuration file. (The grub2-mkconfig -o /boot/grub2/grub.cfg updates the GRUB 2 configuration file after editing it.)

What does the Debian package manager apt-get update command do for a system administrator?

It updates the list of new packages available. (The apt-get update command updates the local list of packages that are available to the system from which the command was run. The apt-get upgrade command updates the system with new software. There is no Debian command that updates the repository list. There is no Debian repository for local package restore points.)

What is unique about the /var directory?

Its contents change often. The /var directory's contents change often. The /var directory is typically set up as its own filesystem because of this feature and sometimes has its own very fast disk because of its ever-changing contents requirement of writing to files.

Which of the following is a feature of using symbolic links, but is not possible with hard links?

Linking files across different filesystems Symbolic links can link across different filesystems, but hard links cannot. Hard links can link to more than one file, have persistent links to files that change names, and share inodes—symbolic links do none of those.

Which Linux feature allows programs to run in the background?

Multitasking Linux's multitasking capability allows processes to run in the background. The command line interface is a standard feature, but is not responsible for running processes in background. Pseudoterminals are software devices that emulate physical terminals. Symmetric multiprocessing refers to the hardware and software design of central processing units (CPUs).

Which of the following is not an example of a Linux boot loader?

NT Loader (NTLDR) (The NTLDR is the legacy Windows NT boot loader for systems up to and including Windows XP and Windows Server 2003.) -Only one not having to do with Linux -Actually windows instead

What are regular expression elements known as when used in a search string formed by wildcards, numbers, and characters?

Notational elements A regular expression with notational elements is a search string formed by combining wildcards, numbers, and characters.

How many file systems per partition may a Linux system have?

One (A partition may have only one file system.)

To use pkill properly, what does a user need to know about a process?

Only part of its name For pkill to work, the user needs to know only part of the name of the in-memory process. The kill command requires the PID. The killall command requires the exact command name. The full path to the executable is not required for any kill command.

Which user is allowed to launch a program with a higher priority?

Only the root user Only the root user is allowed to launch a program with a higher priority.

What information does the apt-cache search openssl display?

Package name and short description (The apt-cache search openssl command displays all cached software packages that match the regular expression (regex) openssl. What is displayed is the package name, with no version information, and a short description of the package. The package name can be used to install the package.)

Which directory in the Red Hat Linux distribution contains the RPM Package Manager (RPM) packages?

Packages (The distribution packages are under the Packages directory on the digital video disc (DVD) image.)

Using the cat /proc/partitions command provides you with a quick look at which information?

Partitions and sizes (Displaying the contents of /proc/partitions provides you with a quick look at partitions and their sizes.)

Which of the following is NOT a good option for recovering a corrupt boot sector?

Reinstall the system from an original distribution compact disc (CD)/digital video disc (DVD) (Reinstalling the entire system because of a corrupted boot sector is a waste of time and will result in the loss of data.)

Which filesystem is faster than either second extended filesystem (ext2) or third extended filesystem (ext3)?

ReiserFS ReiserFS is faster than either ext2 or ext3. ISO9660 is a compact disc/digital video disc (CD/DVD) filesystem and is not fast. Both VFAT and FAT32 filesystems have roughly the same speed benchmarks as ext2.

Onto which of the following drives can a user NOT install Linux?

Tape drive (A user cannot install Linux onto a tape drive. Tape is not bootable in Linux and therefore cannot sustain an operating system. Tape drives are far too slow to support any kind of usable system.)

Which of the following ps command fields has possible values of R (running), T (stopped), D (asleep and uninterruptible), S (asleep), Z (zombie), or N (positive nice value)?

STAT The STAT, or status, field displays the status of a process as R, T, D, S, Z, or N. PRI is the priority of a process. NI is the nice value for a process. SHARE is the amount of shared memory consumed by a process.

What does the "so" in a shared library file name (for example, libproc-3.2.8.so) mean?

Shared object (The "so" part of a shared library file stands for shared object.)

Which task must a system administrator perform in order to replace a coldplug device?

Shut down and power off the system (To replace a coldplug device, the system must be shut down and powered off.)

How many major field categories or headings are there in the /etc/fstab file?

Six There are six categories or headings in the /etc/fstab file: file system, mount point, type, options, dump, and pass.

Why is it important to have a standard location for files on Linux systems?

So that administrators and software vendors can have consistency among Linux distributions The primary reasons are that administrators often have to work with multiple distributions and some consistency among distributions is essential to prevent mistakes and misconfigurations. Software vendors also need to have consistent locations in which to install software and to gain access to libraries. New user consideration, Windows users, and mergers are not seriously considered for this standard.

What is another name for a symbolic link?

Soft link Soft link is another name for symbolic link.

Data entered via the keyboard is which type of stream?

Standard input The keyboard is standard input. Standard output is data that is sent to the screen. There are no streams identified as transfer or entry.

In the command wc < blah.txt, which type of stream does the < operator represent?

Standard input (stdin) The < symbol represents standard input from the blah.txt file into the wc command. Standard output is the > operator. Standard error is 2>. There is no standard stream.

A user types 'ls' at the command line and receives the following information displayed on the screen: list.txt processes.txt blah.txt Which type of stream is the response from the ls command?

Standard output (stdout) The output from the ls command is stdout, or a screen display. There is no standard input to the ls command. The file list is the output from the ls command. There are no errors, so there is no stderr.

Which situation makes ReiserFS more efficient than either second extended filesystem (ext2) or third extended filesystem (ext3)?

Storing data files that are smaller than 1 kilobyte (KB) in size The ReiserFS is more efficient than ext2 or ext3 at storing small files (< 1 KB). ReiserFS is not more efficient at storing very large files. The type of file (binary, text) doesn't matter to the filesystem. No file requires more maintenance than any other.

Boot loaders interact with which part of the computer system in order to load the operating system?

The Basic Input-Output System (BIOS) (Boot loaders interact with BIOS and utilize subroutines to load the operating system. This process occurs prior to the kernel addressing a file system or launching the init process. The boot loader does not interact with the disk controller.)

Where should a system administrator look to begin troubleshooting problems that appear to be hardware related?

The Basic Input-Output System (BIOS) (The first location a system administrator should look in when troubleshooting hardware problems is the system BIOS. In the BIOS, the administrator can selectively enable and disable on-board hardware, change the boot order, and perform a factory reset on all settings.) -Input and output relate to hardware and computer interaction; the mediator

Other than Internet sites, where else can system administrators install Debian software packages from using the apt-get command?

The Debian distribution digital video disc (DVD) (The Debian distribution DVD is the best answer here. Apt-get will install from DVD if the DVD is set up in the /etc/apt/sources.list file. A Debian mirror is an Internet site. You cannot install Red Hat packages onto a Debian system using the apt-get command. Not just any NFS-mounted Debian directory will allow an administrator to install software—DEB packages have to exist on the mounted directory, and that source has to be set up in the /etc/apt/sources.list file.)

What is the name of the collaborative document that specifies a set of guidelines for the names of files and directories and their locations?

The Filesystem Hierarchy Standard (FHS) The Filesystem Hierarchy Standard is the collaborative document that specifies a set of guidelines for the names of files and directories and their locations.

A user attempts to compile and create an executable in their home directory, but it doesn't work. What has the administrator done to prevent this user action?

The administrator has set the noexec option for the filesystem in /etc/fstab. The administrator has mounted the /home filesystem with the noexec option.

An administrator issued the following command on a system. What is the administrator looking for by using this command? find / -size +10M -print

The administrator is looking for all files larger than 10 megabytes on the entire system. The administrator is searching for files larger than 10 megabytes on the entire system, from the root (/) directory. If the administrator wanted to find files by last accessed time, they would use the -atime option. To find files smaller than 10 megabytes, the administrator would use -10M. To find files in the administrator's home directory, they would search from /root, or . if they were in the home directory.

If the gdisk utility supports only one command line option, how can a system administrator use gdisik to manipulate partitions?

The administrator manipulates partitions through an interactive gdisik dialog at the command line. The administrator uses gdisk at the command line in an interactive session, much like fdisk.

When would a system administrator mount a filesystem and prevent its entry into /etc/fstab?

The administrator mounts a filesystem without allowing the entry to be added to /etc/fstab when /etc/ is on a read-only filesystem. The primary reason that an administrator prevents an entry into /etc/mtab is because /etc is mounted on a read-only filesystem.

If a system administrator installs a Linux system that will provide file storage services for approximately 200 users, how should the administrator configure the disk for easy management?

The administrator should set up logical volumes in order to grow the volumes as needed. (For 200 users, who will use the file server to store large amounts of data, the administrator should set up logical volumes in order to grow the volumes as needed. A simple disk partitioning scheme is not as enterprise-friendly in that simple partitioning will require downtime for the services and the system during expansion. Limiting users to 10 MB of space is not a good practice, because 10 MB will be consumed too quickly by every user.)

How does a system administrator allow a user to mount a filesystem?

The administrator specifies 'user' under the <options> heading in /etc/fstab. The administrator adds the 'user' option under the <options> heading in /etc/fstab. The administrator would never grant temporary root or sudo access to a regular user for any reason. The administrator would also never change permissions on an entire filesystem to 777.

In vi, the letters hjkl are equivalent to which other keys on the keyboard?

The arrow keys The navigation keys, hjkl, are equivalent to the arrow keys on a keyboard.

What happens if a user issues the bash command while using the bash shell?

The bash command opens another instance inside the current bash shell. The new bash shell opens within the current shell and looks identical to the original.

What happens if a user enters !6 on the command line?

The command at offset 6 will execute from the user's shell history. The command at offset position 6 will execute from the user's shell history. To execute the command from six lines back in the user's shell history, the user enters !-6.

What does the following command do for the user who executed it? touch newfile.txt ; mv newfile.txt /tmp

The command creates the newfile.txt file and then moves it to the /tmp directory. The command creates the newfile.txt file and then moves it to the /tmp directory. The cat command displays a file's contents, and a user cannot rename a file to /tmp because it is a system directory name. The file command displays the type of file.

What is the result of the root user issuing the command ldd /usr/bin/tee?

The command displays the shared libraries in use by /usr/bin/tee. (The ldd /usr/bin/tee command displays the shared libraries in use by /usr/bin/tee.)

What function does the following command have for the user Bob Smith? edquota -u bsmith

The command edits a quota for the user. The edquota -u bsmith command edits a quota for the user.

What is the expected output from the following command? find . -name "*.txt" -print

The command searches the current directory and displays a list of all files with a .txt ending. The find command lists all files in the current directory with a .txt ending. The -print option means print to the screen or stdout. The "*.txt" is a wildcard that gathers all files regardless of name or name length, as long as they have the .txt ending. The (.) after find means to search the current directory, which includes all subdirectories (a recursive search by default) of the current directory.

What happens if the following command is executed, but the destination directory (dir2) does not exist? cp -R dir1 dir2

The copy command creates the dir2 directory and recursively copies the contents of dir1 to it. The cp -R dir1 dir2 command copies dir1 and its contents to dir2. If dir2 does not exist, the copy command creates it.

What does the following locate command send to the screen as output? locate filename.txt -n 10

The first 10 search results for filename.txt The locate command with the -n 10 option displays the first 10 results of a locate search. None of the other options listed exist for the locate command.

Other than the 2 terabyte (TB) disk size limitation, which other Master Boot Record (MBR) limitation does Globally Unique Identifier (GUID) Partition Table (GPT) overcome?

The four primary partition limitation GPT overcomes the MBR limitation of four primary partitions. The other options are not MBR limitations.

If the runlevel is set to 5 in the inittab file, what happens?

The graphical user interface launches. (Runlevel 5 is the runlevel for the graphical mode, and the user's chosen desktop manager launches. Runlevel 6 reboots the system. Runlevels 2 and 3 launch the command line interface.)

Which of the following statements about GRand Unified Bootloader (GRUB) 2 is FALSE?

The grub.cfg file is directly editable. (The grub.cfg is NOT directly editable. The menu.lst in GRUB Legacy was directly editable.) -Most of the time you shouldn't directly edit critical files that contain the command name in it (but that's just a guess to help learn the answer)

If an administrator wants to set specific limits on the number of files or the amount of space users can consume on a filesystem, which parameter must the administrator set?

The hard limit The administrator must set the hard limit. The soft limit can be exceeded, but the hard limit cannot. There are no filesystem maximum limits, nor do filesystem permissions limit space or file storage.

What is the result of the following command: echo Hello > hello.txt?

The hello.txt file is created and the word Hello is added to it. echo Hello > hello.txt creates the hello.txt file and copies Hello into it.

How does a Linux system identify the init or systemd process?

The init or systemd process' process ID (PID) is always 1. The init or systemd process always has a PID of 1. The root user runs the init or systemd process and runs under root's UID and GID.

What happens if a user changes the name of a file that has a symbolic link pointing to it? file1.txt -> testfile.txt mv testfile.txt newfile.txt

The link from file1.txt to testfile.txt is broken. The symbolic link is broken because testfile.txt no longer exists and symbolic links do not update.

A system administrator issues the ldconfig -p command. What does this command display?

The lists of directories and candidate libraries stored in current cache. (The ldconfig -p command displays the lists of directories and candidate libraries stored in cache.)

A user searched their home directory for a file named history.doc using the locate command, but locate returned several files matching history.doc as if the user had used a wildcard, such as "*history.doc*" in the search. Why did locate return so many matches?

The locate command automatically wildcards all searches. The locate command uses wildcards at the beginning and at the end of a string. For example, a locate search for the file name of history results in a wildcard search as *history*.

In the GRand Unified Bootloader (GRUB) (Legacy or 2) menu file, what does the hd0,0 specify to the boot loader?

The location of the master boot record (MBR) (The hd0,0 GRUB menu entry specifies the location of the master boot record (MBR).)

What is the result of a user issuing the following command? ls -lR | tee list1.txt list2.txt list3.txt

The ls command's output displays to the screen and is written to all three files in its entirety. The ls command's output is shown on the screen and is copied, in its entirety, to each of the three files. The output is not split. Users can specify as many files as they want for the tee command and it will write to each of them.

Which user on a system has the privilege or permission to issue the reboot or the shutdown command?

The root user only (Only the root user has the permission or privilege to issue a reboot or a shutdown on a system.)

What is shared in shared libraries?

The routines stored in the libraries are shared among multiple applications. (The shared part of shared libraries is that these libraries contain routines that are common to and shared by many different applications. Libraries are mainly located in /lib, but that is for organizational purposes and has nothing to do with their sharing. No libraries are loaded by default to /opt unless they are application specific and therefore not shared. The kernel does not share libraries.)

Which of the following is equivalent to stdout?

The screen (Standard output or stdout is the screen. The keyboard is standard input. The mouse is part of standard input. The /dev/null designation is not a stream but a null device, kind of like a trash bin.)

What happens after the disk quota grace period expires?

The soft limit becomes the hard limit. After the grace period, the disk quota soft limit becomes the hard limit and the user cannot exceed this limit. No files are deleted and no account restrictions are incurred.

What does the following ls -l listing tell you about the directory shown? drwxr-xr-t 2 bsmith bsmith 4096 2015-05-03 19:34 files

The sticky bit has been set on the files folder. The sticky bit, t, has been set on the files folder. SUID = drwsr-xr-x. GUID = drwxr-sr-x. SUID and GUID = drwsr-sr-x.

What happens if a system administrator presses the c key at the GRand Unified Bootloader (GRUB) menu?

The system drops to a command prompt. (If an administrator presses the 'c' key at the GRUB menu, the system will open or drop to a command prompt. The command prompt allows the administrator to enter commands prior to booting the system.)

Other than current time, running time, and currently logged on users, what information appears in uptime?

The system load average The uptime command also reports the load average for the system. The three numbers present the last 1 minute, 5 minutes, and 15 minutes load averages.

What happens after a system administrator issues the shutdown -r now command?

The system reboots after a warning to all users. (The shutdown -r now command warns all users that the system is going down for reboot and then begins the reboot process. To send the warning to all users, but not shut down, use the -k switch. There are no shutdown options for disconnecting users without shutdown or for a restart in recovery mode.)

If a system administrator issues the reboot command as the root user, what happens?

The system reboots. (When the root user issues the reboot command, the system immediately begins shutting down for reboot. There are no prompts and no warnings to other users.)

What happens when the root user issues the halt -p command?

The system shuts down and powers off. (The halt -p command means that the system will shut down and power off immediately, without prompting any user.)

What happens if a user has no soft inode limit and an inode hard limit of 100 is met, but a lot of space is still available for saving files?

The user cannot save new files. If the user's inode limit has been met, then the user cannot save new files.

What information is displayed by issuing the pwd command?

The user's current working directory The pwd command stands for print working directory and displays the user's current working directory. Documents in the print queue are listed with the lpq command. The who command lists the users logged in to a system. The uptime command displays how long the system has run since the last reboot.

A user issues the following command: ls 2> files.txt. What information displays to the screen if the user then issues: cat files.txt?

There is no information to display to the screen. The ls 2> files.txt redirects errors to the files.txt file, but there are no errors, so there is nothing to display. The files.txt file is empty.

What is the common attribute of the following directories: /tmp, /var, /opt, /home?

They are all subdirectories of the root (/) directory. (The common attribute for the /tmp, /var, /opt, and /home directories is that they are all subdirectories of the root (/) directory. Their sizes are based on multiple factors, but only the /home directory's size is based on the number of users. Only the /home directory holds personal user data.)

What is the main purpose of Debian's package management tool suite?

To make Debian more user friendly (The main purpose of the Debian package management tool suite is to make Debian more user friendly. All Linux systems have some type of package management system. Software management typically does not require rebooting of the system. A package management system does not make a distribution more or less proprietary.)

What is the purpose of the 'g' in the following sed command? sed -e 's/b/B/g' file.txt

To make the substitution globally The 'g' means replace globally, or every occurrence of the letter b in the file with B, regardless of where in the line or in the word that it occurs.

Users and administrators both use regular expressions for which purpose?

To match strings based on a pattern While there are many different applications of regular expressions, the primary purpose of them is to match strings based on a pattern. Regular expressions often use wildcard characters, but that is not their overall purpose.

What is the primary purpose of so-called mass storage devices?

To provide fast access to large amounts of data in a small, reliable package (The primary purpose of mass storage devices is to provide fast access to large amounts of data in a small, reliable package. Mass storage is not disposable. Archiving is one purpose, but not the primary purpose. Some mass storage is green, but providing green technology is not the primary purpose.)

What is the function of the :! command in vi?

To run an external command and see the results while in vi The :! command allows a user to issue an external command while in vi and display the command's results.

What is the function of the :w! command?

To write (save) the file and overwrite the permissions if the user has privileges to do so The :w! command writes or saves the file and overwrites the permissions if the user has privileges to do so.

Which of the following is NOT determined by the command: cat /proc/cpuinfo?

Total system memory (The /proc/cpuinfo file contains information about the system's CPU(s). It does not contain information about the system's memory.)

At a minimum, how many partitions can a Linux system have?

Two (The minimum number of partitions a Linux system should have is two, the root (/) partition and a swap partition.)

As a junior level system administrator prepares to install a print server system for approximately 10 users in a small office, the junior administrator asks the lead administrator which type of disk partitioning to use. What is the lead administrator's response?

Use simple partitioning (Simple partitioning with no home directory partitioning is a good choice for this particular business application. There is no need to use logical volumes due to the small number of users and the fact that the system is a print server. And there is no need for home directory encryption because users will not store data on the system; it is a print server and probably will have a very small disk.)

How does a user search for a particular word or string in vi?

Use the / key, type the word, and press ENTER Use the / key, type in the word, and press ENTER. Typing jj will move the cursor down two lines, but not allow a search. The \n combination has no effect, because the \ is invalid in vi. The :e! command reverts to the last saved version of a file without closing the file.

A user finds that they have repeated the same five commands in performing a housekeeping task. How can they use their command history to repeat the commands in the most efficient manner?

Use the Up Arrow key to find the command, and press ENTER when the desired command is found (Use the Up Arrow key on the keyboard to cycle through the last 1,000 commands issued at the command line, beginning with the most recent first. The history 5 command shows the last five commands used, but does not execute them. The echo history 5 command will display the words history 5. The tail -5 .bash_history command will display the last five commands, but will not execute them.)

How does a user or an administrator start a long-running task that might take longer than the automatic logout time limit for a system?

Use the nohup command and the & to place the task into the background The user or administrator uses the nohup command with a trailing &. The other options will not continue to run the task after the automatic logout, which is the point of the exercise. Using nohup plus the & will run the task to completion without user intervention.

Other than using the nohup command, which other method exists to allow running commands after a user logs out of a system?

Using the screen command The screen command allows a user to run a process that might require multiple hours to complete, but still log out of the system. Using bg and fg will not allow a user to log out of a system and leave a process running. Using & will not allow a user to log out while running a process. Once a user logs out of a system, all shells and child shells die.

Vi is not an acronym, but it is a short form of which term?

Visual Vi is known as the visual editor.

Under which circumstances would a boot loader located in the master boot record (MBR) load a boot loader in a partition boot record (a process known as chain loading)?

When GRand Unified Bootloader (GRUB) boots a Windows partition (When GRUB boots a Windows partition. GRUB can load other operating systems on other partitions for dual or multi-boot configurations. If the primary boot loader (GRUB) fails, the system does not boot. Multiple disks do not matter to GRUB, because it addresses them as partitions. There is no secondary MBR.)

Which of the following filesystems CANNOT be created using the mke2fs utility?

XFS The mke2fs utility CANNOT create XFS filesystems. It can create ext2, ext3, and ext4 filesystems only.

Which of the following filesystems handles large files efficiently?

XFS XFS handles large files efficiently. ReiserFS handles small files efficiently. The ext3 and ext4 filesystems are filesystems that attempt to handle files of varying sizes efficiently, but are not optimized for small files or for large files.

How does a user navigate to the beginning of the current line in vi without entering insert mode?

^ The ^, or caret, moves the cursor to the beginning of the current line without entering insert mode. The d key deletes text using navigation keys. The h key moves the cursor left one character. The p key pastes the buffer below the current line.

Which regular expression metacharacter denotes the beginning of a line or word when applied to a bracketed value, but as an exclusion when applied inside the bracket?

^ The caret (^) denotes a string at the beginning of a search pattern. For example, the first letter in a word or the first character of a line of code. The caret (^) when used inside the [] means that the user wishes to exclude that information from the match. For example, ^[^a] means do not match the letter a at the beginning of a word or a line.

Which keyboard shortcut writes (saves) the current file and then quits vi?

ZZ ZZ writes and then quits vi. The dd command deletes a line. The yy command yanks (copies) a line. The gg command moves the cursor to the first line of the file.

What does the regular expression '.*' mean?

Zero or more of any number of characters in a row The .* regular expression means zero or more of any number of characters in a row.

Which of the following regular expressions is equivalent to the \w metacharacter in its scope of pattern matches?

[a-zA-Z0-9_] The \w metacharacter is equivalent to [a-zA-Z0-9_] because of its range of matching all letters, both lower- and uppercase, 0 through 9 and the underscore character. The [a-zA-Z] is a subset of \w. The [*.*] matches everything. The [....] only matches lines with more than three characters.

A user needs to extract information that includes a period (.) from text files, but has had no success thus far. Which regular expression metacharacter will help the user collect the information required?

\. The \. metacharacter matches lines with periods or dots in them. The ./ is not a metacharacter, but how one launches a script or executable that is in the same directory. The *.* metacharacter means everything and is no different than simply using cat to view the contents of a file. The .* metacharacter means capture all.

A user notices that when using string matching with \w, no lines with spaces or special characters display in the results, although the user knows those types of lines exist. Which metacharacter matches lines with those types of characters?

\W The \W metacharacter will only match lines containing special characters and spaces. The \d metacharacter matches digits. The \s metacharacter matches lines only containing whitespace. The [w] is not a metacharacter, but a bracket expression that only matches lines containing a w.

A user wants to search the /etc/passwd file for a particular username, Bob Jones. Which command performs the search correctly?

cat /etc/passwd | grep "Bob Jones" cat /etc/passwd | grep "Bob Jones" is the correct option. First, the /etc/passwd is passed through cat to create a text stream and then piped into grep, which searches for the string, "Bob Jones". Grep cannot have output redirected into it. The ls command will not expose the contents of the file to grep.

An administrator wants to know how many users on a particular system use the C shell (csh) as their default shell. Which command produces the desired result as a single number?

cat /etc/passwd | grep csh | wc -l The cat /etc/passwd |grep csh | wc -l command is the correct answer. The grep csh /etc/passwd command will not count the number of entries. Neither file nor ls will expose the contents of the /etc/passwd file.

Which command would a system administrator run to display the IRQs used on a system?

cat /proc/interrupts (The cat /proc/interrupts command displays a system's interrupts (IRQs) and their associated resources. The /proc/meminfo file shows system memory information. /proc/resources and /proc/irqs do not exist.)

Which of the following is the INCORRECT method of using the sort command?

cat file.txt > sort The sort command cannot have input redirected to it. The cat file.txt > sort command will copy the contents of the file.txt file into a new file named sort.

Which of the following is the proper use of the grep command using regular expressions to isolate words at the end of a line or on a single line that have the 'arch' ending in their names?

cat file.txt | grep 'arch$' The cat file.txt | grep 'arch$' command is the correct one to isolate lines or words with the arch ending in their names or words that end in 'arch' that occur at the end of a line. The cat file.txt | grep [arch] command will return any file with one of the letters a, r, c, or h in it. The cat file.txt | grep arch command is a standard grep for a string that returns any line with the 'arch' pattern anywhere in the line. The cat file.txt |grep \arch command returns any line with the 'arch' pattern in it.

Which of the following commands displays the contents of a file (file.txt) as output and then uses that output as input for a command that searches for a pattern (one) in that file and outputs the result?

cat file.txt | grep one (The correct command is: cat file.txt |grep one.)

Which of the following grep commands performs a case insensitive search for the string alpha?

cat file.txt |grep -i alpha The cat file.txt |grep -i alpha command is the correct choice. The ls command does not expose file contents to grep. The grep -v option finds every string except alpha. The grep -c option will only return the number of times the string alpha occurs in the file.

Which of the following commands copies all files named with a .txt into the /tmp directory?

cp *.txt /tmp cp *.txt /tmp is the correct command to copy all files named with a .txt into the /tmp directory. A user cannot use the > or | with the cp command. The cp .txt /tmp command only copies a file named .txt to the /tmp directory.

Which of the following is the correct syntax to duplicate a file in the same directory?

cp file1.txt file2.txt The cp file1.txt file2.txt command is the correct command to duplicate a file. COPY is the DOS/Windows command line copy command. The file command describes the type of file. The mv command in this example renames the file.

Which of the following is NOT a correct method of using cpio?

cpio -ov > /opt/bkup/backup_Monday.cpio The cpio -ov > /opt/bkup/backup_Monday.cpio command is the incorrect choice. The cpio command must have input piped to it when creating an archive. The command cpio -idv < /opt/bkup/backup_Monday.cpio is correct because this command extracts files from the archive.

Which of the following commands does an administrator use with the ps -ef command to extract only the user account names running processes on a system?

cut The cut command using the output from ps -ef as input is used to isolate columns and fields of data. The split command splits files into two equal parts. The uniq command filters repeated instances or lines in a file or stream. The pr command converts a text file into a printable format.

Which command deletes the current line and the line above it in vi?

d- The d- command deletes the current line and the line above it. The dd command deletes the current line. 2dd deletes the current and the next line. The d$ command deletes from the cursor to the end of the line.

Which command deletes from the current cursor position to the end of the file in vi?

dG The dG command deletes from the current cursor position to the end of the file. The d$ command deletes from the cursor to the end of the line. The d) command deletes to the end of the sentence. The d- command deletes the current and previous lines.

Which Linux system services auto-mount compact disc/digital video disc read-only memory (CD/DVD-ROM) disks and Universal Serial Bus (USB) hardware?

dbus (The Desktop Bus, or dbus, system is responsible auto-mounting CD/DVD-ROM disks and USB hardware. The umount command unmounts mounted devices. The udev device manager manages the automatic detection and configuration, but not the mounting, of devices. The /dev directory contains device drivers for hardware.) -The Desktop Bus, or dbus, is an interprocess communication (IPC) system designed to standardize service provided by Linux desktop environments. -standardize, set automatic, set auto -NOT AUTO DETECTION

Which command does a system administrator use to list the contents of a package (for example, the openssl package)?

dpkg -L openssl (The dpkg -L openssl command lists the openssl package's contents. The dpkg -l openssl command views the installation status of the openssl package. The dpkg -p openssl command displays the version, dependencies, and integrity of the package. The dpkg openssl command displays the help information for dpkg.)

Which of the following is the correct command to install a downloaded software package (openssl.deb) onto a Debian system?

dpkg -i openssl.deb (The dpkg -i openssl.deb command installs the openssl.deb package from a local directory. The dpkg -L openssl.deb command fails because specifying the DEB file name fails the command. The rpm -i command has the correct syntax, but not for a Debian package file. Yum does not install Debian files; it is a Red Hat Linux command.)

Which dpkg command displays the version, dependencies, and integrity of a software package (for example, openssl)?

dpkg -p openssl (The dpkg -p openssl command displays the version, dependencies, and integrity of the openssl package. The dpkg openssl command, without any switches, displays the dpkg help information. The dpkg -l command views the installation status. The dpkg -S command searches and displays packages that contain the name specified on the command line (openssl in this example).)

Which Debian package management utility is the archive manipulation tool?

dpkg-deb (The archive manipulation tool is dpkg-deb. The dpkg tool is the main package management program. Deb is not a command, but a package type—Debian packages are named with the .deb suffix. RPM is the Red Hat package manager query utility.)

Which of the following utilities does the system administrator of a Debian system use to extract DEB package contents and to display package information?

dpkg-deb (The dpkg-deb utility is used to extract DEB packages and to display package information. The dpkg utility is the main package management program. Dselect is a menu-driven front end for the dpkg utility. The dpkg-split utility splits packages up into smaller pieces so that they can fit onto limited-size media such as floppy disks.)

Which Debian package utility allows a system administrator to alter installed packages and specify options for those alterations?

dpkg-reconfigure (The dpkg-reconfigure utility allows an administrator to reconfigure packages once they are installed and allows the administrator to specify certain options during reconfiguration. The dpkg utility is the main Debian package management program. The dpkg-split utility breaks packages up into smaller chunks for easy storage on small-capacity media. The dpkg-deb utility is the archive manipulation tool for the Debian package management system.)

A user created a document, but is unsure what they named it. They think the name is either "Heritage" or "heritage," but they also do not remember the extension or if it had one. Which command will find the file?

find . -name "[H,h]eritage*" -print The correct command to use is find. -name "[H,h]eritage*" -print. The find . -name "H-heritage*" -print command will find files named only H-heritage plus any suffix. The locate command uses regex filters, but only with the --regex option. The locate heritage command will only find the file heritage if it is named with a lowercase h.

How does a user locate and display all directories within their home directory?

find . -type d -print The find command that lists all directories within a user's home directory is: find . -type d -print. The find . -dir * -print command gives an error because there is no -dir option. The ls -la command shows all files at the current level, including hidden files and directories, but no subdirectories. The ls -lR |grep drwx command will show all non-hidden directories and subdirectories.

Which find command would an administrator use to find every file on the system from /?

find / The find / command will find every file on the system. There is no -all option for find. The find /*.* command will return an error that no such file as *.* exists. The find ~/ command finds every file under the root user's home directory, /root.

How does an administrator find all files owned by user bsmith?

find / -user bsmith The administrator uses find / -user bsmith. This command finds all files owned by bsmith. Locate will find files named bsmith only. Whereis bsmith attempts to find binaries, source, and man pages for a command. Which searches for executables in the PATH or in a specified directory.

Which of the following commands is the equivalent of the gunzip files.tar.gz command?

gzip -d files.tar.gz The gunzip files.tar.gz command uncompresses the files.tar.gz file and renames it as files.tar. The equivalent command is gzip -d files.tar.gz. The gzip command compresses and uncompresses. It uncompresses with the -d (decompress) option. The tar command, tar zxvf files.tar.gz, will uncompress and untar (unarchive) the files back to the original files before archiving. The find command will locate the files.tar.gz file. The ls | cpio command will create a cpio archive named files.tar.gz; however, it cannot be uncompressed using gzip/gunzip because it is not the correct format.

Identify the match for the regular expression: 'g$'

hag The 'g$' regular expression will match any word that ends with the letter g. $ is the end of the word or line regular expression character.

If /dev/sda1 is the bootable partition, how does GRand Unified Bootloader (GRUB) (Legacy or 2) identify the disk /dev/sda?

hd0 (GRUB Legacy and GRUB 2 identify /dev/sda as hd0. This is found in the /boot/grub2/device.map or the /boot/grub/device.map file.)

Which of the following GRand Unified Bootloader (GRUB) Legacy entries corresponds to the bootable partition /dev/sda1?

hd0,0 (The /dev/sda1 is the first partition of the first disk and is assumed to be bootable. It corresponds to hd0,0. The hd0 entry is the first hard disk (0) and the partition number (0) is the first partition.)

Which command allows a user to view the first 10 lines of a file?

head The head command displays, by default, the first 10 lines of a file. Tail displays the last 10 lines of a file. The uniq command filters out repeated lines in a file. The cat command displays the entire contents of a file.

How does a user remove all command history?

history -c To successfully remove all command history, the user issues the history -c command. Using echo > .bash_history and rm .bash_history removes the history file's contents and the file respectively, but all the command history in memory is written to the file upon logout, including the attempts to remove the file and its contents. The history -d * has no effect, because the history command has no wildcard offset.

Which file does the init program search for during boot?

inittab (The init program searches for the inittab file during boot. The initrd is the initial ramdisk for loading a temporary root file system into memory. The initctl is the init process control tool. The init-checkconf is a tool for checking upstart scripts for errors.) -keeping tab during boot -tab is during boot

An administrator can limit the number of files a user can store on a system using quotas by changing which parameter?

inodes By limiting the number of inodes, the administrator also limits the number of files a user can store because for every file, there is one inode. Blocks limits the amount of space the user can consume. The hard and soft limits have to do with reaching space limits.

A user has three jobs running in the background. From the jobs table, how does the user terminate the xclock process? [1] Running xclock & [2]- Running firefox & [3]+ Running xterm &

kill %1 The kill %1 command will terminate the xclock process. There is no terminate command. The kill xclock command will not work, because the user has not specified a process ID (PID) or job number. Ctrl+C terminates foreground processes only.

Which command properly stops a particular process with a process ID (PID) of 1234?

kill -15 1234 (The kill -15 1234 command and kill -SIGTERM command are gentle kills in that they allow the process to terminate normally without losing or corrupting data. The kill -9 and kill -SIGKILL commands are both harsh kill command signals and should be used only when other kill commands do not work. The kill -HUP command is a hangup or restart command and does not terminate the process except momentarily to restart it.)

Which command allows a user to name the command to terminate rather than using a process ID (PID)?

killall The killall command allows a user to use the command name rather than the PID to terminate a process. The kill command requires a PID. The nohup command is the opposite of kill, as it keeps a command running even after a user has logged out. The free command reports the amount of free memory.

Which of the following is NOT a method for halting a system?

killall -9 (The killall -9 command will NOT shut down a system.)

How does a user kill a process, for example, firefox, with the killall command?

killall firefox killall firefox. For killall to work correctly, all a user needs is to issue killall and the name of the process. The killall command cannot use the process ID.

A system administrator installed a new program on a system. After installation, the program worked, but after a recent reboot, it did not. Which task did the system administrator forget to run to update the library cache?

ldconfig (The administrator forgot to run the ldconfig utility. The ldd command displays linked shared libraries for a command. The libvirtd program is a system daemon for the virtualization management system. The libtool utility is a generic library support script.)

Which command, used for testing, does a system administrator run to process the library locations on the command line but not update the cache, and without processing the default library locations?

ldconfig -n (The ldconfig -n command will process the library locations on the command line without updating the cache or processing the default library locations. This method is used for testing new libraries without providing default support through already existing libraries. The ldd commands do nothing. The ldconfig -p command displays the lists of directories and candidate libraries stored in cache.)

Which of the following commands allows a system administrator to search for a specific library entry related to openssl in cache?

ldconfig -p | grep openssl (The ldconfig -p | grep openssl command searches through the shared library cache and prints those libraries whose names contain openssl in them. The rpm command lists all installed rpm packages named openssl. The which command displays the location of the executable file. The ldd command displays a list of all loaded shared libraries associated with the executable file.)

When a user searches for a command, ls for example, using whereis, which of the following is the response from the system?

ls: /bin/ls /usr/share/man/man1p/ls.1p.gz /usr/share/man/man1/ls.1.gz The whereis command returns: ls: /bin/ls /usr/share/man/man1p/ls.1p.gz /usr/share/man/man1/ls.1.gz. It returns the command location and the man page locations for the command.

What information is in the files.txt file if a user issues the following command and the files do not exist? ls FY2014.txt 2> files.txt ; ls FY2015.txt 2> files.txt ; ls FY2016.txt 2> files.txt

ls: cannot access FY2016.txt: No such file or directory. The only entry in the files.txt file is: ls: cannot access FY2016.txt: No such file or directory. The reason is that the user used 2>, which overwrites the files.txt file every time the user issues the command.

What information is in the files.txt file if a user issues the following command and the files do not exist? ls FY2014.txt 2> files.txt ; ls FY2015.txt 2>> files.txt ; ls FY2016.txt 2>> files.txt

ls: cannot access FY2016.txt: No such file or directory. ls: cannot access FY2015.txt: No such file or directory. ls: cannot access FY2014.txt: No such file or directory. The correct answer is: ls: cannot access FY2016.txt: No such file or directory. ls: cannot access FY2015.txt: No such file or directory. ls: cannot access FY2014.txt: No such file or directory. All three ls command error outputs are sent to the files.txt file because the initial ls used 2>, which creates or overwrites the files.txt file, and the subsequent ls commands use 2>>, which appends their error output to the files.txt file.

A user attempts to list the file FiscalYear2015.txt with the command ls FiscalYear2015.txt 2> files.txt. The user receives no output on the screen. What information is in the files.txt file?

ls: cannot access FiscalYear2015.txt: No such file or directory. The output from standard error (stderr), ls: cannot access FiscalYear2015.txt: No such file or directory, was redirected into the files.txt file by the command. The file does not exist and therefore there is no standard output (stdout) to display.

Which command would a system administrator use to display information about a system's central processing unit (CPU)?

lscpu (The lscpu command displays a report of all CPUs and features. The lsmod command lists loaded modules. The lsdev command lists installed hardware components. The lsusb command lists all Universal Serial Bus (USB) devices. previous)

Which command produces output similar to the following?: 0:00.0 RAM memory: NVIDIA Corporation MCP61 Memory Controller (rev a1) 00:01.0 ISA bridge: NVIDIA Corporation MCP61 LPC Bridge (rev a2) 00:01.1 SMBus: NVIDIA Corporation MCP61 SMBus (rev a2) 00:01.2 RAM memory: NVIDIA Corporation MCP61 Memory Controller (rev a2) 00:02.0 USB controller: NVIDIA Corporation MCP61 USB 1.1 Controller (rev a3) 00:02.1 USB controller: NVIDIA Corporation MCP61 USB 2.0 Controller (rev a3) 00:04.0 PCI bridge: NVIDIA Corporation MCP61 PCI bridge (rev a1)

lspci (The lspci command produces output related to the system's Peripheral Component Interconnect (PCI) buses and the devices attached the PCI buses. The lscpu command produces output related to the system's central processing units (CPUs). The lsmod command displays a list of loaded modules. The lsusb command displays a list of all Universal Serial Bus (USB) devices.) -Random hardware stuff (or whatever Peripheral Component Interconnect means)

Which Logical Volume Manager (LVM) tool creates and names logical volumes?

lvcreate (The lvcreate command creates and names logical volumes. The vgcreate command creates and names volume groups. The pvcreate command prepares physical volumes to be used in logical volumes. The fdiisk command prepares the disk for simple partitioning.)

How does a user execute a command that is in the user's path, for example the /usr/bin/lynx command?

lynx The user enters the lynx command without any pathing. The ./lynx command will not work, because lynx is not in the user's current directory. The man lynx command opens the man page for lynx, but will not execute the lynx application. The echo lynx command will only display the word lynx.

A user wants to mail themselves the contents of a file they created on their Linux system. Which of the following commands accomplishes this task?

mail [email protected] < file.txt To mail the contents of any text file on the system that the user has access to, use: mail [email protected] < file.txt.

Which apt-cache command option displays overall statistics about the cache?

stats (The stats option displays an extensive listing of statistics about the cache. The show option displays extensive information about a package. The showpkg option displays dependency information about a package. The pkgnames option displays all package names that begin with the word provided.)

Which debugfs option displays filesystem information?

stats The debugfs stats option displays filesystem information. The open option opens the filesystem for interactive debugging. The close option closes the interactive debug session. The ffb option finds a free block during the interactive debug session.

Which command allows a system administrator to view running services, manage (enable/disable) services to run at boot or in the current session, determine the status of these services, and manage the system runlevel?

systemctl (The systemctl command allows a system administrator to change runlevels, list installed unit files and their statuses, and manage services. Systemd is a replacement for SysVinit and Upstart in some Linux distributions. It allows for greater concurrency (starting programs at the same time for quicker boot) and reduces shell overhead. The runlevel command displays the current runlevel. Sysinit is a coding feature and not a command.)

Which of the following systemd commands changes the current runlevel to use the graphical user interface?

systemctl isolate graphical.target (The correct command syntax is systemctl isolate graphical.target to set the current runlevel to graphical user interface mode.)

Which of the following commands sets the default runlevel to multi-user mode with no graphical interface for a Linux distribution that uses systemd init?

systemctl set-default multi-user.target (The correct syntax to set the default runlevel to multi-user with no graphical interface is systemctl set-default multi-user.target.)

Which command do system administrators use to dynamically change the runlevel, for example from runlevel 2 to runlevel 3?

telinit (The telinit command is used to change runlevels dynamically (without rebooting). The kill command stops processes, but cannot change a runlevel. The runlevel command displays the current runlevel. The telnet command is a deprecated method of connecting to remote systems.)

Which command syntax does a system administrator use to reboot a system using the telinit command?

telinit 6 (The telinit 6 syntax reboots a system, whereas telinit 0 halts a system, telinit 1 places the system into single user mode, and telinit 5 places the system into graphical user mode.)

Which of the following is NOT a method to terminate or kill a process?

terminate <PID> There is no terminate command in Linux.

Identify the match for the regular expression: '^t'

testing The word testing is the only match for '^t', because the caret character (^) matches the character or string at the beginning of the word or line.

How are runlevels tracked in systems that use Upstart init?

By telinit or shutdown (Runlevels are tracked by the runlevel event generated by telinit or shutdown.)

How does a user know if two files are hard linked to each other?

They both have the same inode. Hard linked files both have the same inode. There are no negatively numbered inodes.

Which keyboard key combination does a user press to suspend a running job?

Ctrl+Z Ctrl+Z suspends or stops a job. Ctrl+C kills a job. There are no other key combinations that work with processes for job scheduling.

In which directory is the Yellowdog Updater, Modified (YUM) configuration file found?

/etc (As with most system configuration files, the yum.conf file is found in the /etc directory.)

Which find command -name option wildcard pattern would a user use to locate all files with five-character names named with any suffix?

"?????.*" The correct option is: "?????.*". The ? is a search for any single character. The * searches for any string regardless of length. The "*5.*" option will find all files with the number 5 positioned before the dot (.) in the file name. The "*****.*" pattern will find every file, because * is a generic wildcard for any string and any length. The "*****.?" pattern will match any file that has a single character suffix.

Which find command option does an administrator use to find all files accessed within the last 10 days in the /home directory?

-atime The find command option to define last accessed time is -atime. The -mtime option is modification time, which is different from accessed time. A user can cat a file (accessed) without making modifications. The -name option is for searching for a particular file name or multiple file names using a wildcard. The -type option searches for files, directories, and other file types.

Which find option should an administrator use if they want to find a list of files that have been modified within the last 10 days?

-mtime The find command option that lists files by modification time is -mtime. This option tells the administrator which files have been modified or changed within the specified time period. The access time (-atime) option only tells the administrator if a user has looked at a file, but the file might not have been modified. The -perm option offers the administrator a list of files by permissions. The -type option filters a search by file type.

Which find option does an administrator use if they are looking for all files with permissions of 777?

-perm The -perm option allows an administrator to search through files and locate which ones have a particular permission set. There is no -mod option. The -type option searches for a particular file type, such as block, character, and device. The -iname option matches by name, ignoring case.

A user issues the following command and receives expected results. ls -l -rw-rw-r-- 1 user user 323 Feb 2 20:18 file1.txt -rw-rw-r-- 1 user user 323 Feb 2 20:18 file2.txt -rw-rw-r-- 1 user user 323 Feb 2 20:18 file3.txt How do the displayed results change if the user pipes the command to xargs?

-rw-rw-r-- 1 user user 323 Feb 2 20:18 file1.txt -rw-rw-r-- 1 user user 323 Feb 2 20:18 file2.txt -rw-rw-r-- 1 user user 323 Feb 2 20:18 file3.txt Piping the output to the xargs command with no options results in the following output on a single line: -rw-rw-r-- 1 user user 323 Feb 2 20:18 file1.txt -rw-rw-r-- 1 user user 323 Feb 2 20:18 file2.txt -rw-rw-r-- 1 user user 323 Feb 2 20:18 file3.txt

Into which file does the administrator enter persistent mount information?

/etc/fstab The administrator enters persistent mount information into the /etc/fstab file. The /etc/mtab file contains currently mounted filesystem information. The /etc/motd file is the message of the day file. The /etc/exports file contains a list of Network File System (NFS) exported filesystems.

Which file must be edited in order to set up a GRand Unified Bootloader (GRUB) password?

/etc/grub.d/40_custom (The system administrator must manually edit the /etc/grub.d/40_custom file in order to set up a GRUB password.)

Which file does a system administrator edit to change the default runlevel of a system that uses the Upstart init system?

/etc/init/rc-sysinit.conf (The system administrator edits the /etc/init/rc-sysinit.conf file to set the default system runlevel.)

Which file does the system read when an administrator uses the mount command to see currently mounted filesystems?

/etc/mtab The mount command reads the /etc/mtab file. The /etc/fstab file contains a list of persistently mounted filesystem information. The /etc/motd file is the message of the day file. The /etc/exports file contains a list of Network File System (NFS) exported filesystems.

If an administrator mounts /dev/sdb2 onto /mnt, which file reflects that change?

/etc/mtab The mount is entered into the /etc/mtab file. The /etc/fstab file contains persistently mounted filesystem information and does not change for temporary mounts. The /etc/motd file is the message of the day file. The /etc/exports file contains a list of Network File System (NFS) exported filesystems.

A user needs to execute the following command: /opt/mw/vcompare. The command is not in the user's path. What do they enter on the command line to execute this command?

/opt/mw/vcompare The user has to provide the full path to the command, /opt/mw/vcompare, to execute the command. The ./vcompare command will work if the user is in the /opt/mw directory, because that is how a user would execute a command in the current directory. Issuing vcompare will not work if /opt/mw is not in the path. The pwd vcompare command will not work, because pwd displays the working directory and ignores any arguments.

Which of the following is NOT a standard Linux directory?

/swap (The /swap is not a standard Linux directory. The swap partition exists, but is not mounted as /swap.)

Which file system size must be altered to accommodate multiple applications running on an application server?

/var (The /var file system must be enlarged from the default recommendation of 250 MB to accommodate the space required for an application server. The /home directory would need to be altered to accommodate the number of users on a system. The /tmp directory size generally does not need to be changed. The /usr directory may need to be enlarged depending on the types of applications and to accommodate space requirements if it is set up as a separate file system.)

What is the default nice value of all processes in Linux?

0 The default nice value of all processes in Linux is 0. The range of possible values is from -20 for the highest priority to 19 at the lowest priority.

What is the init daemon's process ID (PID)?

1 (The init process always has a PID of 1.) -Init daemon is one of the 1st things to start up, hence the 1

How many inodes are there associated with a file?

1 Every file has one inode.

What is the minimum recommended size for the root (/) partition?

1 GB (The recommended size is 1 GB.)

Why does the command ls 2> files.txt display a list of files to the screen, but nothing to the files.txt file?

2> is standard error (stderr) and there were no errors, and standard output (stdout) was not redirected, so it displays on the screen. The ls 2> files.txt command shows a list of files because the stdout was not redirected, and there is nothing in the files.txt file because no errors were redirected to it via 2>. There are no errors to display or to redirect. No options are required for the ls command.

Which command copies the contents of another file into the current one while in vi?

:r file.txt The :r file.txt command reads in the named file into the current file. The :w file.txt command writes (saves) to the file.txt file. The :q command will quit and ignore the file.txt info. The :n file.txt command opens file.txt for editing.

Which term is described by: A collection of classes, functions, or procedures that can be imported as a unit?

A package (A package is a collection of classes, functions, or procedures that can be imported as a unit. An application is a computer program designed to perform a task or function, often in response to user input or manipulation. A file system is a structural unit or collection of units that allows for the organization and storage of directories and files. A repository is a collection of software packages specific to a particular Linux distribution.)

Which term is described by an instance of a running program that performs a data processing task?

A process A process is an instance of a running program that performs a data processing task. A file can be a program, but the file itself is not running or processing data. Standard input is data from the keyboard or redirected from a file. The kernel is the heart of the operating system and is responsible for managing processes.

Which of the following is uniquely assigned to each running process?

A process ID (PID) A PID is uniquely assigned to each process. A dynamically-linked library is not assigned nor required for a process. A file system is not assigned to a process; the process runs in memory.

Bracket expressions are handy for identifying characters to match, but what else can a user place inside brackets to extend and strengthen string matches?

A range of options A user can extend matches by placing ranges inside brackets, such as [0-9] or [a-z], which captures all numbers from 0 to 9 and all letters from a to z. The other options do not extend matches and are standard narrow match options.

Which of the following is Debian's package management tool?

Advanced Package Tool (APT) (Debian's package management tool is APT. Yum is the primary update and install command used with the Red Hat package management system. YaST is the package management tool for SUSE Linux. RPM is the package management system for Red Hat Linux.)

When is the boot process complete?

After the user logs in to the system and drops to a prompt (The boot process is complete after the user logs in to the system and is dropped to a prompt. At this point, the boot process has completed and the system is ready for user input. The login screen is near the end, but the user's profile and start scripts still have yet to run. After the components have displayed on the screen, then the system starts the configured runlevel. The boot menu appears very early in the boot process, prior to choosing an operating system to boot into.) -Cuz it may not be graphical, but there has to be some user interaction

How does a user set a new shell variable, BLAH, to the value test?

BLAH=test BLAH=test. It is simple to set a variable to a value using the form: VAR=value.

Which of the following is NOT an advantage of placing a program into the background?

Background tasks use less memory than foreground ones do. Tasks that have been placed into the background use the same memory as they would if run in the foreground.

Explain why the command mv dir1 dir2 completes successfully, but the command cp dir1 dir2 fails.

Because mv is recursive by default and cp is not The mv command is recursive by default and cp is not. The equivalent cp command requires the -R option. Any user can execute the mv command. Both mv and cp work well with directories and regular files.

Which of the following is another term for a boot loader?

Boot Manager (The boot loader is also sometimes referred to as the boot manager. The boot menu is the GRand Unified Bootloader (GRUB) menu. The kernel is the operating system core. The master boot record is where the boot loader is copied.)

What are the two major features of the Logical Volume Manager (LVM)?

Creating logical volume snapshots and resizing logical volumes (The two major features of LVM are creating logical volume snapshots and resizing logical volumes.)

What is the default Linux shell?

Bourne-again shell (bash) Bash is the default Linux shell. Other shells may be used either as a subshell in scripting or interactively, or the root user can reset a user's default shell to any available system shell.

Predict the output of the tr command and the input that follows. tr a-z A-Z comptia test (input) (output)

COMPTIA TEST The output is COMPTIA TEST because the tr, or translate, command takes a pattern and interprets the input according to that pattern. In the example, a-z A-Z translates the input, comptia test, into the uppercase result.

Which of the following is NOT a stage in the Debian archive package installation process?

Check file system permissions (Check file system permissions is NOT a stage in the Debian archive package installation process.)

Which systemd feature provides better isolation for processes?

Control Groups (The systemd feature that provides better process isolation is Control Groups that track processes instead of process IDs (PIDs). Concurrency and parallelization are the same feature, meaning to start processes simultaneously or in parallel, rather than sequentially. Quick boot is the result of concurrency.) -You use CONTROL GROUPS in an experiment to isolate the variable and results

A shared library is also known as what kind of library?

Dynamically linked (Shared libraries are dynamically linked to programs that use them. Conversely, statically linked libraries are actually part of the program that uses them.)

Simple partitions work fine for desktop computers and in some limited-scope environments, but for which type of business application are simple partitions not appropriate?

Enterprise-level business (Enterprise-level business. Using the Logical Volume Manager (LVM), an administrator has great control over disk management and can group disks or partitions together into manageable chunks that are more enterprise-capable than simple partitions.)

Which type of drive usually connects to a computer system via a Universal Serial Bus (USB) port?

Flash drive (Flash drives connect via USB ports. These drives are typically small in physical size, but may have large storage capacities, sometimes exceeding that of the system's internal hard drive.)

Which type of drive is typically NO LONGER FOUND in Linux systems?

Floppy drive (Floppy drives are legacy technology and are no longer found in contemporary systems. They are too small to hold enough data to satisfy contemporary computers, plus they were very slow forms of storage.)

Which of the following is another term for creating a filesystem?

Formatting Creating a filesystem is more commonly referred to as formatting a filesystem. Debugging is attempting to correct errors. Integrity checking locates and repairs errors. There is no superblocking action.

When using the locate command, where does the locate search take place for a file?

In the mlocate database The locate command uses the mlocate database file that keeps a list of all files on the file system. It is more efficient to search through a single file database rather than searching through an entire file system. The list of files on most systems is too large to keep cached in memory. The system.map file is a file used by the Linux kernel to look up symbol names and their addresses in memory.

Which task should a system administrator perform if they find that the GRand Unified Bootloader (GRUB) installation has become corrupted?

Install GRUB again in rescue mode (If the system administrator finds that GRUB has become corrupt, they should reinstall GRUB in rescue mode. There is no need to run fsck on the root file system if GRUB is the only casualty of the corruption. The /etc/fstab needs to be fixed only if one or more file systems fail to mount on boot. There is no need to replace GRUB with LILO in any instance.)

What does the following command do? cp dir1 ../

It copies dir1 to the directory one level above the current directory. The ../ designation means one level above the current directory. If the user has permission to write to that directory, the command proceeds. A user's home directory is specified by the ~/ designation.

In the following command, what is the bs=1M designation? dd if=/dev/zero of=/tmp/fileout bs=1M count-1024

The number of bytes written to the output file. The bs=1M designation in this command refers to the number of bytes written to the output file during the command's execution. The other options are not part of the dd command or its options.

What is LD_LIBRARY_PATH?

It is an environment variable that supplies a search path for libraries. (The LD_LIBRARY_PATH is an environment variable set in order to have the system search for libraries before standard directory paths are searched.)

A user attempts to list the file FiscalYear2015.txt with the command ls FiscalYear2015.txt 2> files.txt. The user receives no output on the screen. What does no output to standard output (stdout) mean?

It means that the file does not exist in that directory. The ls command, ls FiscalYear2015.txt 2> files.txt means that the file does not exist because the user redirected standard error (stderr) (2>) only and that the error information is contained in the files.txt file.

What is the advantage of enabling all integrated peripherals compatible with Linux?

It reduces the cost of purchasing and adding new components (The advantage of onboard, integrated peripherals is that it saves the user money by not requiring the purchase of new hardware. If the integrated peripherals are supported by Linux, there's no reason to purchase additional components. There is no advantage in installation in terms of speed or efficiency to use onboard, integrated peripherals or to use installed ones. Integrated peripherals might require non-free drivers to support them.)

When troubleshooting boot problems, where should a system administrator look during the analysis phase of troubleshooting?

Log files (System administrators know to look at log files to search for clues to a problem. None of the other locations will help troubleshoot a boot problem.) -Log files keep track of issues -Check the log for clues -Especially with a boot problem

Which action should a system administrator take if the GRand Unified Bootloader (GRUB) boot loader screen does not appear on boot?

Reinstall GRUB in rescue mode (The system administrator should reinstall GRUB from rescue mode. Installing a new kernel will not fix a corrupted or overwritten boot loader. Running the fsck command will not repair a damaged boot loader. Reinstalling the operating system will only waste time and potentially lose data.)

It is possible to install Linux without certain external peripherals attached. For example, installing Linux in "headless" mode means installing Linux without which peripheral connected?

Monitor (Headless means without a connected monitor. This is a standard method of installing Linux server systems. Linux systems require some sort of media for installation such as a hard disk, a Universal Serial Bus (USB) drive, or a digital video disc (DVD) drive.)

What are symbols such as <, >, =, >>, 2> known as when used as part of a command?

Operators These symbols, when used as part of a command sequence, are operators. Some of the symbols are redirects (>, <, >>, 2>). Pipes always have the pipe symbol (|) in the command. Variables are assigned using the = operator.

Why do system administrators like to use package managers for installing software?

Package managers allow system administrators to quickly and easily install software and all dependencies. (System administrators like package managers because they allow quick and easy software installation. Package manager software is not necessarily more or less secure. Package managers do not create restore points, although sometimes the package will back up or not overwrite local configurations. For the most part, package-manager-installed software is not customized. There are a few parameters that can be altered, but for full control, source code compiles are preferable.)

What is the major problem with statically linked programs, i.e., programs that use static libraries?

Statically linked programs are very large. (The major problem with statically linked programs is that they are generally very large in comparison to those that used shared libraries, because the static libraries are part of the executable program. Statically linked programs require no additional code at runtime because they contain all the additional code that they require. They need no special permissions to run, nor do they contain malware by design.)

Escaping a string of text or a single character involves doing what to the text or character?

Placing a \ in front of the text or character Escaping text or a character means that you have to place a leading \ so that the processing program will ignore it. For example, \Clever becomes lever, because the \ tells the program to ignore the next letter, which is C.

When using top, how does the root user filter the results to show only a single user's processes in the list?

Press the 'u' key and then enter the user name The root user presses the 'u' key and then enters the user name. The 'p' key has no effect. The 'I' key turns off Irix mode. The 'd' key changes the refresh delay from three seconds to a manually entered number.

Which of the following is NOT typically a cause of filesystem errors?

Removing unnecessary files from /tmp Removing unnecessary files from /tmp is NOT a cause of filesystem errors.

Which term describes the redefining of a processes' priority?

Renice The task of changing the priority of a process is to renice the priority.

Section 5

Section 5

Section 6

Section 6

The /etc/systemd directory contains which type of files?

Service configuration files (The /etc/system directory contains service configuration files.)

Which method should a system administrator use to secure the GRand Unified Bootloader (GRUB) installation?

Set up and use a GRUB password (To secure a GRUB installation, the system administrator should set up a GRUB password.)

How do shared libraries become shared?

Shared libraries are libraries that are loaded by programs when they start. (Shared libraries are loaded into memory by programs when they start. All programs that start afterwards use the shared libraries. The location of the libraries does not matter. Libraries are not loaded or shared by any user.)

For application developers, what is the advantage of setting and using the LD_LIBRARY_PATH variable?

So that the developers can test their own shared libraries. (Developers who set and use the LD_LIBRARY_PATH variable do so to test their own shared libraries, because the libraries listed in that variable are searched before standard file system locations. The practice of using LD_LIBRARY_PATH has nothing to do with security or bypassing security—it is used for testing. Its use does not help in clearing any conflicts in standard libraries.)

Which of the following is not a type of stream?

Standard transfer Standard transfer is NOT a stream type.

Although most Linux systems no longer have them, which mass storage devices use a streaming media type?

Tape drives (Tape drives use streaming tape to store and to retrieve data for the system. Tape drives were once installed in almost every system. Today, they're used only for archival backups, but are quickly becoming extinct like the once ubiquitous floppy drive.) -Floppy drive (pretty much extinct) -DVD (endangered) -tape drives (pretty rare) and streaming

An administrator creates a new script inside the /opt/patches folder and then issues ls -l and observes the following: rwxr-xr-x 1 root patch 2048 2015-05-02 14:21 setup.sh Why does the new file have the patch Group ID, when it should have root as the Group ID?

The /opt/patches folder has the Globally Unique Identifier (GUID) set for the patch group. The /opt/patches folder has the GUID set and therefore, when the root user created the file, it has patch group ownership.

What can an administrator determine from looking at the system load average?

The administrator can determine how busy a system is. The load average gives the administrator a snapshot of performance and how busy a system is. No other information can be inferred from the load average numbers.

Three weeks ago, a user requested for a digital video disc (DVD) to be mounted on a shared system, but noticed that the DVD is no longer mounted and the system has an uptime of two days. What happened?

The administrator did not make the mount persistent. The administrator did not make the DVD mount persistent. It is possible, but not likely, that the administrator unmounted the DVD. A user typically cannot unmount a filesystem. The DVD was not damaged during a reboot.

During the boot process, the system displays a list of available operating systems to boot. If the user does not respond to the prompt, what happens?

The default operating system loads. (If a user does nothing, the default operating system loads.)

What does the .gz file extension in a file name mean to a user?

The file has been compressed with gzip. The .gz extension means that the file has been compressed with gzip. Using tar copies files to a single file archive, but provides no extension. Files processed with dd have no particular extension. Files extracted with gunzip have the .gz extension removed from their names.

What does the count option refer to when using the dd command?

The number of blocks written to the input or to the output file. The count, for example count=1024, is the number of blocks to be written to the output file or from the input file. There is no maximum output file size. The number of bytes transferred is specified by the bs parameter.

A user issues the command ls > files.txt, but sees no output on the screen. What happened to the output?

The output was redirected to the files.txt file. A simple redirect operation redirects the output to a file and not to the screen. The > operator is correct, and no errors were thrown because there were no errors to display.

There are two locations in which the GRand Unified Bootloader (GRUB) boot loader can reside: the master boot record (MBR) and where else?

The partition boot record of an active partition (The GRUB boot loader may reside in the MBR or in the partition boot record of an active partition. These are the only locations allowed for a primary boot loader.)

While running top, a user presses the 'k' key on the keyboard. The entry pauses the dynamic update and it also prompts the user for information. For which information does top prompt the user?

The process ID (PID) to kill The 'k' prompts the user for 'PID to kill'. There are no options for sending processes to the background, to log out a user, or to restart a process.

What is the result of executing the following command? df -h | tee diskspace.txt

The result of the df command displays on the screen and is copied to the diskspace.txt file. The tee command displays its input to the screen and to the file specified in the command following it. This command is a pipe and not a redirect. Tee does not filter text. Tee takes the output from almost any command as input for itself and displays it on the screen and copies it into a specified file.

How many different components does a boot loader use to systematically load the operating system in stages? How many different main components does a boot loader use to systematically load the operating system in stages?

Three (There are three main components that work together to load the operating system in stages: The boot sector program, the second stage boot loader, and the boot loader installer.)

What is the primary function of the gzip command?

To compress archive files so that they consume less disk space The gzip command compresses files so that they consume less disk space. Files with the .gz suffix are already compressed. The tar command both archives and unarchives files. The tar command traditionally is used to send files to streaming tape for backup.

Why do system administrators run the ldconfig command?

To update shared library locations to the /etc/ld.so.cache (Running ldconfig updates the shared library locations to the /etc/ld.so.cache file. The /etc/ld.so.conf file is automatically updated by the installation of new libraries. The ldd command is used to display a list of loaded shared libraries for a specific command. If an administrator needs to interactively edit the /etc/ld.so.conf file, the vi editor is used.)

How many components comprise the Master Boot Record (MBR)?

Two The Master Boot Record is composed of two main components: The Master Partition Table and the Master Boot Code.

Which Linux distribution currently uses the Upstart init daemon?

Ubuntu (The Ubuntu distribution uses the Upstart init daemon. All others listed use systemd.) -Up Ub great for dyslexia -UbuntuUpstart

The ELILO boot loader is a boot loader for which type of computer?

Unified Extensible Firmware Interface (UEFI) (The ELILO boot loader is for computers that use UEFI, instead of CSM, EFI, or BIOS.) -Elilo uefi: sounds like another language

What is the primary difference between Upstart and the traditional SysVinit system?

Upstart is event-based rather than runlevel-based. (Upstart is event-based rather than runlevel-based. It is more of an automated system, does not track runlevels, and is not dependency-based.) -Ups only when an event is started -UpeventStart

Which of the following commands functions exactly like d$ in vi?

c$ The d$ and the c$ command have the same functions in vi. They both delete to the end of a line without deleting the line. The y$ has no significance in vi; it reads as a y. $ sends the cursor to the end of the line. The s substitutes one character under the cursor.

How does a user match all lines that end with a period using grep with no options?

\\.$ \\.$ is the correct answer, as in: grep \\.$ file.txt. The first \ escapes the second one and greps for a period at the end of the line ($). The \.$, .$, and . are all the same to grep and yield all lines from the file. In this case, egrep would be a better choice for differentiating among the choices.

Which command provides a list of all available packages from cache?

apt-cache pkgnames (The apt-cache pkgnames command displays a list of all available packages from cache. The apt-cache show command gives an error. The apt-cache pkgnames * command searches for package names that begin with *. The apt-cache show all command reports no packages found.)

A user wants to copy the contents of two files to a third file. Which command performs the task correctly?

cat one.txt two.txt > three.txt The cat one.txt two.txt > three.txt command will perform the desired task correctly. The file command reports the type of file that follows it. The cut command gives an error because it expects input to operate on.

Which cp command copies the /etc/passwd file to a backup location (/opt/bkup) only if the source is newer than the backup?

cp -u /etc/passwd /opt/bkup The cp -u /etc/passwd /opt/bkup command will copy the passwd file to /opt/bkup, but will not do so again until the original /etc/passwd file has been changed, regardless of how many times it is run. The cp /etc/passwd /opt/bkup command copies and overwrites the /opt/bkup/passwd file each time it is run. For this example, the -R option performs the same function as no option because there are no files or directories other than the passwd file to copy. The cp -b command creates a backup of the passwd file in each directory specified—in this example, the cp -b command creates /etc/passwd~ and /opt/bkup/passwd~.

Which utility opens an interactive shell allowing an administrator to examine and modify an extended filesystem?

debugfs The debugfs utility allows an administrator to examine and modify an extended (extX) filesystem. The tune2fs utility tunes a filesystem. The e2fsck utility performs a filesystem integrity check on extended filesystems. The dumpe2fs utility dumps the status of an extended filesystem to standard output (stdout).

Which command deletes from the cursor position to the first occurrence of the letter 'b' in vi?

dfb The dfb command deletes all characters from the current cursor position to the first occurrence of the letter b in a sentence. This command works for any letter (dfc, dfd, dfe, etc.). The d$b command deletes to the end of the line; the b is ignored. The db command deletes the previous word. The dw command deletes the current word.

Which command parses the dmesg file?

dmesg (The dmesg command parses the dmesg file. The err_reader and msg_note commands do not exist. The last command parses the lastlog file.)

Which of the following commands is Debian's main package management program used to install and remove Debian packages?

dpkg (The dpkg command is Debian's main package management command for installing and removing software packages. APT is the name of the Debian package management tool. RPM is the Red Hat package manager tool used for querying the software database. Yum is the primary RPM utility for installing and removing software on Red Hat Linux.)

How does a system administrator find packages selected for installation, but which for some reason have not been installed on a Debian system?

dpkg --yet-to-unpack (The dpkg --yet-to-unpack command searches for and finds packages that for some reason have not been installed. The dpkg --clear-selections command tells the system to set the requested state of every non-essential package to deinstall. The dpkg --compare-versions command compares version numbers of packages. The dpkg --set-selections command sets the package state on the command line.)

Which of the Debian package management utilities would be the easiest to use for a new or junior-level system administrator for installing, configuring, and removing software packages?

dselect (The dselect utility is a command line, text-based menu system and is appropriate for new and junior-level system administrators. The dpkg, dpkg-deb, and dpkg-reconfigure utilities are all command line utilities that require switches and parameters to be passed to them and are not intuitive to use.)

How can a user find how many shell commands are kept in .bash_history?

echo $HISTSIZE echo $HISTSIZE. The HISTSIZE environment variable holds the value for the number of commands that are kept in history. The history command displays all the commands in history. The echo .bash_history command will display the word .bash_history, and echo history will display the word history.

Which command does a user run to view the current PATH variable?

echo $PATH (The correct method to show just the PATH variable is to use echo $PATH. $PATH by itself is not a command. The echo PATH command will echo only the word PATH. There is no show command in Linux.)

Using the echo command, how can a user find which shell is currently in use?

echo $SHELL To find the current shell, use the echo $SHELL command. $SHELL is the environment shell variable. By itself, the echo command echoes a blank line. The echo /etc/passwd command echoes /etc/passwd, and the echo bash command echoes bash on the command line, but neither shows the shell.

Which of the following utilities allows an administrator to alter the partition type from Linux to New Technology File System (NTFS)?

fdisk The fdisk utility allows an administrator to alter the partition type from Linux to NTFS. The mkfs and the mkfs.ntfs utilities create filesystems, but cannot alter a partition type. VFAT is a filesystem type.

How does a user bring a background job (process) to the foreground?

fg %# A user brings a process to the foreground by issuing the fg %# command, where # is the job number found from issuing the jobs command. Ctrl+Z suspends a job. Ctrl+C kills a job. Using bg %# will send a job to the background.

Which of the grep commands would find the line containing pa$$word in a file using pa$ as the expression to match?

fgrep The fgrep command will find the word pa$$word in a file using pa$ as the pattern to match because it ignores regular expressions and uses the text as typed to match. The grep and egrep commands would only find a match if a word ended in pa$. The pgrep command is for processes, not files.

A user remembers that they created a file with a four-character name with the .txt suffix. How can they search for files named with only four characters plus the .txt suffix?

find . -name "????.txt" -print The find command that lists only those files that have four-character names plus the .txt suffix is: find. -name "????.txt" -print. The wildcard *.txt command finds all files with the name pattern of .txt as the suffix. The command -size 4.txt gives an error for using an invalid size type. The search for "4.txt" yields files only named 4.txt.

Which of the following is the correct method for running the firefox application in the background?

firefox & firefox &. The correct method for running a command in the background is to issue the command with an & following it. Issuing the command with no & places the command into the foreground. Using the exec firefox command would start firefox, but kill the user shell. Using sleep prior to a command delays the start of the command by a number of seconds, but does not place the command into the background unless the command is followed by an &.

Which command and option does a user issue to display the amount of free memory on a system continuously and refresh after a specific number of seconds (five)?

free -s 5 The free -s 5 command displays the amount of free memory updated every five seconds. None of the other options use the numeric input.

Which of the following utilities do administrators use to check the integrity of a filesystem?

fsck The fsck, or filesystem check utility, is used to check filesystem integrity. The mkfs utility creates filesystems. Parted is the utility that sets up partitions. Gdisk is a special utility for setting up and working with Globally Unique Identifier (GUID) Partition Table (GPT) partitions.

The egrep command is equivalent to which other command?

grep -E The egrep command is extended grep, which is equivalent to grep -E. The fgrep command is equivalent to grep -F. The pgrep command is used to grep for process IDs (PIDs) from running processes. The grep -R command is a recursive grep.

What is the full name for an inode?

index node The term inode means index node.

If a process with a process ID (PID) of 6543 is hung and cannot be terminated normally, which command should a system administrator issue to kill the process?

kill -9 6543 (The correct method to kill this hung process is to issue the kill -9 6543 command or the kill -SIGKILL command. These commands do no save data. The kill -15 and kill -SIGTERM commands are both gentle termination commands and often will not work on a hung process. Using killall -9 6543 is not correct syntax for the killall command—killall requires the process name and not the PID.)

Which of the following is an example of the correct format for a shared library file name?

libc.so.6 (The libc.so.6 file is an actual shared library file found on Linux systems. The tty20 file is a special device file for a terminal connection. The sda5 file is a special device file that refers to a partition on a hard disk. The twain_32.dll file is a Windows dynamically linked library file that is analogous to a Linux shared library file.)

Which man command option formats a man page so that it enables printing?

man -t The man -t option formats a man page so that it looks correct when printed. The man -p option specifies the sequence of preprocessors to run. The man -d option displays debugging information. There is no -lpd option for man pages.

Which utility would a user use to quickly find a file if they cannot remember the entire file name?

locate The locate command is very fast, but it searches on strings only. If a user wants to see all possibilities for a file of which they cannot remember the entire name, locate is a good choice. There are no mlocate or retrieve commands. The ls -lR is one method, but it is not fast and it has to search through every mounted filesystem, which can cause performance problems with other applications.

Which of the following ls commands allows a user to display all files, even hidden ones?

ls -a The ls -a command displays all files in the specified directory, even hidden ones. The ls command with no options shows all files except hidden ones. The ls -r command displays the file list in reverse alphabetical order. The ls -s command displays files by file size and displays the file size.

Which file in GRand Unified Bootloader (GRUB) Legacy corresponds to the grub.cfg file in GRUB 2?

menu.lst (The GRUB Legacy menu.lst file corresponds to the GRUB 2 grub.cfg file for boot menu entries.) -GRUB needs a menu with the LIST of menu choices

Which command allows an administrator to view the mounted filesystems and their modes (rw, ro)?

mount The mount command with no options reads the /etc/mtab file, which displays all mounted filesystems and their respective options and modes. The mount -a option mounts all filesystems listed in /etc/fstab. The mount -V command displays the mount version. The mount auto command would have no effect on the system, and it would return an error.

Which of the following ps commands provides all user processes, user names, start times, and processes without a terminal associated with them? Hint: This is a very common ps command with options on all Linux and UNIX-like operating systems.

ps aux The ps aux command is a comprehensive ps command with options that provide for all user processes, user names, start times, and processes without a terminal. The ps -ef command lists all processes with full format details. The ps -T command excludes processes that were started by any terminal other than the current one. The ps -u command lists processes with the current user and start times.

Which of the following commands performs a new quota scan and then saves the report to disk?

quotacheck -c The quotacheck -c command performs a new scan and then saves it to disk. The setquota -u bsmith command sets quotas for the specified user. The quota -uv bsmith command displays a verbose quota report for the specified user. The repquota -a command displays reports for all filesystems indicated as read/write in the /etc/mtab file.

The poweroff command is not a command at all, but is a link to which command?r

reboot (The poweroff command is a link to the reboot command. The halt command is also a link to the reboot command. The shutdown command will halt the system, but is not a link from poweroff. The stop command is a symbolic link to the initctl command.)

Which command does an administrator use to change the priority of a running process?

renice The renice command changes the priority of a process. The ps command lists processes. The chage command changes a user's password expiration. The nice command alters the priority of a program at launch, but not while it is running.

Which command does a system administrator issue to list all packages installed on a Red Hat or Red Hat-based system?

rpm -qa (The rpm -qa command (with no arguments) lists all installed packages. The rpm -qc command without arguments yields no results, but with a package name, it lists that package's configuration files. Issuing the rpm command by itself displays the rpm command's help information. The rpm -qp command with no arguments yields no results, but supplying a package name or partial package name displays all packages that start with the provided text.)

How does a system administrator list all files contained in an installed package (for example, openssl) on an RPM Package Manager (RPM)-based system?

rpm -ql openssl (The rpm -ql openssl command lists all files in a package. The rpm -qa openssl command displays the openssl package that is installed. The rpm -qR openssl command lists the package's dependencies. The rpm -qc openssl command lists the package's configuration files.)

Which command on an Upstart init system allows the root user to start and stop system services?

service (The service command is used to stop, start, and restart services. There is no Linux action command or script. The rcp command is remote copy. The runas [{/Link}]command is a Windows command used to elevate privileges.)

Which command will break the file processes.txt, containing 182 lines of text, into four files?

split -l 50 processes.txt The split -l 50 processes.txt command will split the processes.txt file into four files, splitting at 50 lines. The -l option tells the split command how many lines maximum should be in each file split. Three files will have 50 lines, and the fourth file will have 42 lines. The -l 4 option will split the file into 46 files, the -l 25 option will split the file into eight files, and the -l 91 option splits the file into two files. previous

Which init daemon replaced SysVinit for Red Hat-based distributions?

systemd (The systemd init daemon replaced the SysVinit init daemon for all Red Hat and Red Hat-based distributions. Upstart is the init daemon for Ubuntu systems. SysV-style init is the same as SysVinit. The telinit command changes the current runlevel for a system.)

An administrator wants to find the most recent errors in a log file. Which command allows the administrator to do this?

tail The tail command shows the most recent additions to a file that are always appended at the end of the file. The head command shows the first (oldest) entries in a file, which does not help the administrator identify the most recent errors. The wc command is a word count command and does not display the lines themselves. The od, or octal dump, file displays the contents of a file after it has been converted to octal format, which is not helpful to the administrator.

Which of the following is NOT a method of finding the number of lines in a file, list.txt?

tail list.txt The tail list.txt command displays the last 10 lines of the file, but does not give the user any indication of the number of lines in the file.

A user receives a file named documents.tar.gz and asks a system administrator to help open the file to extract the individual documents from it. Which command does the administrator use to do this?

tar zxvf documents.tar.gz For documents.tar.gz, which is gzipped and tarred, use tar zxvf documents.tar.gz to extract the documents from the compressed archive. The gunzip command only uncompresses the file, but does not extract the documents from it. The expand and unexpand commands are for removing and adding TABs in a file and will not extract files from an archive.

Which of the following commands creates an empty file with the name file.txt?

touch file.txt The touch file.txt command creates the empty file.txt file. The mkdir file.txt command creates a directory named file.txt. The file file.txt command identifies the type of file that file.txt is, if it exists. The cp file.txt command gives an error because there is no target.

How does a user undo a mistyped entry in the vi editor?

u The lowercase u command is undo for the last action. The dd command removes a line of text. The :w command writes the current contents to the file. The x deletes a single character.

Which of the following handles the automatic detection and configuration of hardware devices such as sound cards and Universal Serial Bus (USB) drives?

udev (The device manager udev manages the automatic detection and configuration of hardware devices. The dev and sys elements are actually part of the Linux directory structure, where /dev contains hardware and software device drivers and /sys contains information about hotplug hardware devices. The Desktop Bus, or dbus, is an interprocess communication (IPC) system designed to standardize service provided by Linux desktop environments.)

How does a system administrator find the central processing unit (CPU) type for a running system?

uname -a (The uname command prints system information based on a variety of options. The -a option prints all information, including the processor type, operating system, kernel name, and other information. The -p option would also print the processor type. The uname -r command will display the kernel release. No $CPUTYPE or $PLATFORM variables exist.)

How does an administrator display the kernel version on a running system?

uname -r The uname -r command displays the kernel version. There is no kernel or version command. The whoami command displays the username of the currently logged on user.

A user used the expand command on a file to convert tabs to spaces, but an administrator wants to reverse this action on the file. Which command provides this capability?

unexpand The unexpand command reverses the action of the expand command. The expand command has no option for reversing its action. The uniq command filters repeated lines of text in a file. The nl command applies line numbers to lines of text in a file.

How does a user clear a local variable, for example the variable $BLAH, from memory?

unset BLAH The command to clear a local variable is unset BLAH, using the general form: unset VAR. Do not use the variable $BLAH; it will not unset the variable. The kill command is for ending processes. The unalias command is to clear an alias. The unlink command removes a file.

How does a user change the value of the variable FOO from blah to blah2?

unset FOO ; FOO=blah2 The proper method of changing the variable FOO from blah to blah2 is: unset FOO ; FOO=blah2. The command rm is for removing files, not variables. Neither of the other options is a working command.

Which command displays the length of time a system has been running since the last reboot?

uptime The uptime command provides the length of time a system has been running since the last reboot. The free command displays free memory. The ps aux command displays a process table. Screen is a utility that multiplexes between several processes.

Which of the following commands allows a user to navigate to the first letter of the next word in a sentence?

w The w command moves to the beginning of the next word. The b command moves to the beginning of the previous word. The r command replaces a character of text. The ^ moves to the beginning of the current line.

The yumdownloader utility is part of which package?

yum-utils (The yumdownloader utility is part of the yum-utils package. The yum command is part of the yum package. The RPM Package Manager suite (RPM) also includes the rpm command. The rpmfind utility locates and downloads non-Red Hat rpm packages.)

Which command line operator accepts the output from one command and pipes it into the next command as input?

| The | (or pipe) takes output from one command and pipes it into the next command as input. For example, cat file.txt | wc -l. This command first displays the contents of file.txt and pipes that content into the wc (word count) command as input. The -l option gives the number of lines in the file.txt file.


Conjuntos de estudio relacionados

Chapter 14-The Federal Reserve System

View Set

NU471 Week 3 EAQ #2 Evolve Elsevier: Quality Improvement - 30 Questions

View Set

Dosage Calculations Assignment Quiz

View Set