LXPrtce

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

Which vi command-line mode commands can be used to save changes to the current file being edited and close the vi editor? (Choose two.) A. :exit B. :wq C. :q D. :q!E. :e! Hint: Both commands perform a write operation before quitting

A and B are correct. Both the :exit and :wq commands will save any changes to the current file and then close the vi editor. C, D, and E are incorrect. The :q command will close the current file and exit the editor without saving changes. The :q! command will discard any changes made to the current file, close it, and then exit the editor. The :e! command discards any changes made to the current file since the last write operation.

Which environment variables are used to manage command history within the bash shell? (Choose two.) A. HISTSIZE B. HISTCONTROL C. SHELL D. OLDPWDE. DISPLAY Hint: You can use one of these command history environment variables to specify that duplicate entries be deleted

A and B are correct. HISTSIZE configures the size of your history file. On most distributions, this is set to 1000 entries. HISTCONTROL controls how your command history is stored. You can set this variable to a value of ignoredups, ignorespace, ignoreboth, or erasedups. C, D, and E are incorrect. SHELL specifies the path to your default shell executable. OLDPWD contains the directory path that was previously the current directory. DISPLAY specifies where output from the X server should be sent.

You need to see a list of all running processes on your Linux system, not just those associated with the current shell session. Which options can you use with the ps command to do this? (Choose two.) A. -e B. -l C. -A D. -T E. -f Hint: Recall the syntax for using the ps command

A and C are correct. The -e and -A options (and the -a option to an extent) will cause ps to display a listing of all processes running on the system, not just those associated with the current terminal session. B, D, and E are incorrect. The -l and -f options are used to specify extended information in the output of the command. The -T option causes ps to select all processes associated with the current terminal.

You want to install the gftp-2.0.19-7.1.x86_64.rpm package on your Linux system. During the installation, you want a progress bar to be displayed. Which commands can be used to do this? (Choose two.) A. rpm -ihv gftp-2.0.19-7.1.x86_64.rpm B. rpm -i gftp-2.0.19-7.1.x86_64.rpm C. rpm -Uhv gftp-2.0.19-7.1.x86_64.rpm D. rpm -e gftp-2.0.19-7.1.x86_64.rpm E. rpm -qi gftp-2.0.19-7.1.x86_64.rpmHint: Remember that the update function of RPM can also be used to install a previously uninstalled package

A and C are correct. You can use either the -i or -U option to install a package. The - h and -v options are used to display a progress indicator while the package is installed. B, D, and E are incorrect. Response A installs the package, but it doesn't display a progress bar. Response D uninstalls the package. Response E only displays summary information about the package.

You need to change the mode of the contacts.odt file to rw-rw-r- -. Which commands will do this (assuming contacts.odt is in the current directory)? (Choose two.) A. chmod u=rw,g=rw,o=r contacts.odt B. chmod 551 contacts.odt C. chmod u=rwx,g=rwx,o=r contacts.odt D. chmod g-rw contacts.odt E. chmod 664 contacts.odt Hint: Remember the syntax for using chmod and how to represent a file's mode numerically

A and E are correct. Both commands set the mode of the contacts.odt file to rw-rw- r- -. B, C, and D are incorrect. Response B sets the file's mode to r-xr-x- -x. Response C sets the file's mode to rwxrwxr- -. Response D removes Read and Write permissions from the owning group

Which interrupts on an x86 architecture PC are hard-wired to specific system devices and can't be allocated to add-in devices? (Choose two.) A. 1 B. 3 C. 4 D. 6 E. 8 Hint: The keyboard and the real-time clock use hard-wired IRQs

A and E are correct. IRQ 1 is hard-wired for the keyboard, while IRQ 8 is hard-wired for the real-time clock. Accordingly, you can't assign these IRQs to any other devices. B, C, and D are incorrect. IRQs 3 and 4 are used for COM ports by default. However, if the COM ports are disabled in the BIOS, then their interrupts can be used for other devices. IRQ 6 is used for the floppy drive by default. If your system doesn't have a floppy drive, then you can use IRQ 6 for other devices as well.

You want to configure your menu.lst file such that users must enter a password when they select a GRUB menu item. Which elements must be added to the file to accomplish this? (Choose two.) A. password B. gfxmenuC. grub-md5-crypt D. chainloader E. lock Hint: One of the elements can be specified once under global options; the other must be specified under each title element to restrict access to the associated menu item

A and E are correct. The password element is used to specify a password and can be specified once under global options. The lock element is included within each title element to restrict access to that menu item. B, C, and D are incorrect. The gfxmenu element is used to specify the graphical menu displayed by GRUB at boot. The grub-md5-crypt command is a shell command used to create an encrypted password for the GRUB menu. The chainloader element is used to tell GRUB to pass the control of the boot sequence to another bootloader (such as a Windows bootloader).

The /shared directory in your Linux file system has the Execute (x) permission assigned to the owning group. Which of the following is true of this directory? A. Users who are members of the owning group are allowed to enter the directory. B. Users who are members of the owning group are allowed to list the contents of the directory. C. Users who are members of the owning group are allowed to add or delete files from the directory. D. Users who are members of the owning group are allowed to run executable files in the directory. Hint: Remember the difference between assigning the Execute permission to a file and to a directory

A is correct. Assigning the Execute permission to a directory allows the associated user(s) to enter the directory. B, C, and D are incorrect. The Read permission allows users to list the contents of the directory. The Write permission allows users to add or delete files from the directory. The ability to run an executable is controlled by the Execute permission assigned to the file itself.

You need to run the updatedb command with higher priority on the system. When run normally, the updatedb process runs with a nice value of 0 and a priority of 80. You want it to run with a priority of around 65. Which command will do this? A. nice -n -15 updatedb B. nice -n 65 updatedb C. nice -n 80 updatedb D. nice -n 0 updatedb Hint: Recall the relationship between nice value and priority

A is correct. In this response, the nice value is reduced to a negative number, which will increase the process' priority on the system. B, C, and D are incorrect. Each of these responses sets the nice value to the same value or higher than the default, which will reduce the process' priority on the system (or at least leave it the same).

Where are init scripts for services stored on a system that uses System V init scripts? A. /etc/rc.d/init.d B. /etc/init.d C. /etc/init.d/rc.d D. /etc/xinet.d Hint: Within this directory are a series of subdirectories named rc0.d through rc6.d. Each of these directories is associated with a particular runlevel

A is correct. Linux distributions that use System V init scripts store them in the /etc/rc.d/init.d directory. B, C, and D are incorrect. Response B is used to store init scripts on BSD-type systems. Response C uses an invalid directory and is a distracter. Response D contains configuration files for daemons managed by the xinetd daemon.

You recently installed the 3dchess_0.8.1-16_i386.deb on your Ubuntu Linux system. You want to view information about this package. Which command option can you use with dpkg command to do this? A. -p B. -I C. -r D. -L Hint: Remember that the option used to view information about an installed package is different than the one used to view information about a package that has not been installed

A is correct. The -p option is used with the dpkg command to display information about an installed package. B, C, and D are incorrect. The -I option displays information about a package that isn't currently installed. The -r option uninstalls the package without removing its configuration files. The -L option simply lists all files that were installed by the package on the system.

Which file can be used to determine what happens when a user presses CTRL - ALT - DEL ? A. /etc/inittab B. /etc/fstab C. /etc/mtabD. /etc/sysconfig/shutdown Hint: The behavior of the CTRL - ALT - DEL key sequence is defined in the same configuration file where your runlevels are configured

A is correct. The /etc/inittab file is used to determine what happens when a user presses CTRL - ALT - DEL . B, C, and D are incorrect. The /etc/fstab and /etc/mtab file contain file system mount information. The /etc/sysconfig/shutdown file specifies how the system will behave during the shutdown process.

According to the Filesystem Hierarchy Standard, which directory contains print queues for your printers? A. /var/spool B. /var/queues C. /var/lib D. /var/logHint: Users' crontab files and mail queues are also stored in this directory

A is correct. The /var/spool directory contains print queues. B, C, and D are incorrect. The /var/queues directory isn't specified in the FHS. The /var/lib directory contains library files created by various services and applications running on the system. The /var/log directory contains your system log files.

Which component provides applications running on the system with information about the hardware (both hotplug and coldplug) available in the system?A. hald B. dbus C. sysfs D. udev Hint: Recall the process Linux uses to recognize and load modules for hotplug devices

A is correct. The Hardware Abstraction Layer (HAL) daemon (hald) is run automatically at startup. Its job is to provide applications running on the system with information about the hardware (both hotplug and coldplug) available in the system. B, C, and D are incorrect. The role of dbus daemon is to notify the system when a new hotplug device is connected to the system. The sysfs component provides the /sys virtual file system. The udev daemon creates a virtual file system that is mounted at /dev.

Which locale environment variable specifies the default character type and encoding for your Linux system? A. LC_CTYPE B. LC_MESSAGES C. LC_NUMERIC D. LC_IDENTIFICATION Hint: The syntax for specifying the default character encoding is <language>_<territory>.<codeset>

A is correct. The LC_CTYPE environment variable specifies the default character type and encoding for your Linux system. The syntax for specifying the default character encoding is <language>_<territory>.<codeset>. B, C, and D are incorrect. LC_MESSAGES configures natural language messages. LC_NUMERIC configures your number format. LC_IDENTIFICATION contains metadata about the locale information.

Which permission allows a user to open and view a file, but does not allow a file to be modified or saved? A. Read B. Write C. Execute D. Sticky Bit Hint: Think about what level of access would be required to open a file and view its contents

A is correct. The Read permission allows the entity it is assigned to (Owner, Group, or Others) to open and view a file, but does not allow a file to be modified or saved. B, C, and D are incorrect. The Write permission allows a file to be modified and the changes saved. The Execute permission allows an executable file to be run. The Sticky Bit permission is not typically used with files.

You want to use apt-get to download and install the mysql-server package on your Linux system. Which command can you use to do this? A. apt-get install mysql-server B. apt-get update mysql-server C. apt-get upgrade mysql-server D. apt-get check mysql-server Hint: This command will download the requested Debian package from one of the configured repositories along with all of its dependencies and install them

A is correct. The apt-get install mysql-server command will download the requested Debian package from one of the configured repositories along with all of its dependencies and install them. B, C, and D are incorrect. The apt-get update command is used to resynchronize the package index files from their sources. The apt-get upgrade command is used to install the newest versions of installed packages from the sources identified in /etc/apt/sources.list. The apt-get check command updates the package cache and checks for broken dependencies.

You've just downloaded the gftp-2.0.19-7.1.x86_64.rpm RPM package file to the current directory. Which command will check the digital signature of the downloaded file to verify that it hasn't been tampered with? A. rpm --checksig gftp-2.0.19-7.1.x86_64.rpm B. rpm --verify gftp-2.0.19-7.1.x86_64.rpm C. rpm -tamperproof gftp-2.0.19-7.1.x86_64.rpm D. rpm --signature gftp-2.0.19-7.1.x86_64.rpm Hint: This command will query the package for its digital signing key. If anyone altered the package at some point, the key will become invalid

A is correct. The rpm --checksig gftp-2.0.19-7.1.x86_64.rpm command will query the package for its digital signing key. B, C, and D are incorrect. Response B is used to verify a package that has already been installed. Responses C and D use invalid rpm options and are distracters.

You've installed an RPM package file named gftp-2.0.19-7.1.x86_64.rpm on your Linux system. What command would you use to uninstall this package? A. rpm -e gftp-2.0.19-7.1.x86_64.rpm B. rpm -i gftp-2.0.19-7.1.x86_64.rpm C. rpm -U gftp-2.0.19-7.1.x86_64.rpm D. rpm -F gftp-2.0.19-7.1.x86_64.rpm Hint: This command erases the package and its configuration files from the system

A is correct. The rpm -e command uninstalls a package from the system. B, C, and D are incorrect. The rpm -i command installs a new package. The rpm -U installs a package if it isn't installed or updates it if it is. The -F option freshens (upgrades) an installed package.

You've just downloaded the gftp-2.0.19-7.1.x86_64.rpm package file to the current directory. Which command could you use to check the package for dependencies? A. rpm -i --test gftp-2.0.19-7.1.x86_64.rpm B. rpm -V gftp-2.0.19-7.1.x86_64.rpm C. rpm --deps gftp-2.0.19-7.1.x86_64.rpm D. rpm --checkdeps gftp-2.0.19-7.1.x86_64.rpmHint: Dependencies are software packages that must be installed for the package being installed to run

A is correct. The rpm -i --test command will check the package for dependencies. B, C, and D are incorrect. The rpm -V command verifies an installed package. The -- deps and the --checkdeps options aren't valid options with the rpm command and are distracters.

Which shell command can be used to display information about your Linux system, such as the kernel version number, processor type, and system hostname? A. uname B. netstat C. whoami D. top E. exec

A is correct. The uname command returns information about your Linux system. B, C, D, and E are incorrect. The netstat command displays the status of the network. The whoami command displays the username of the currently logged-in user. The top command displays a list of all applications and processes currently running on the system. The exec command is used to run other shell commands with the new process created running alongside the original shell process.

Which user-specific bash configuration file has the highest precedence when configuring a new login shell session? A. ~/.bash_profile B. ~/.bash_login C. ~/.profile D. ~/.bash_logout Hint: Recall the order in which the bash shell executable searches for user-specific configuration files when initializing a new login session

A is correct. When a login shell is run, the bash shell program searches for configuration files in the following order: ~/.bash_profile, ~/.bash_login, ~/.profile. B, C, and D are incorrect. When a login shell is run, the bash shell program searches for configuration files in the following order: ~/.bash_profile, ~/.bash_login, ~/.profile. The first file found is the one that is used. Any others are ignored.

Which Linux runlevel puts the system in multiuser mode with networking disabled and a command-line interface? A. 1 B. 2 C. 3 D. 5 Hint: Recall which runlevels put the system in single-user mode and which put the system in multiuser mode

B is correct. Runlevel 2 puts Linux in multiuser mode with networking disabled. The command-line interface is used. A, C, and D are incorrect. Runlevel 1 uses a command-line interface but puts the system in single-user mode. Runlevel 3 also uses a command-line interface and runs in multiuser mode; however, it also enables networking. Runlevel 5 runs Linux in multiuser mode with networking enabled and a graphical user interface.

Prior to loading a kernel module, which command can you run to build the modules.dep file to identify dependencies between modules? A. depmod B. lsmod C. modinfo D. insmod E. modprobe Hint: Recall which commands are used to view information about modules and which commands are used to actually load modules

A is correct. The depmod command is used to build a file named modules.dep that is stored in /lib/modules/<kernel_version>/. Within this file, depmod lists the dependencies between modules. This helps other kernel module management utilities ensure that dependent modules are loaded whenever you load a module. B, C, D, and E are incorrect. The lsmod command is used to view all currently loaded kernel modules. The modinfo command is used to view information about a loaded module. The insmod and modprobe commands are used to load modules.

Which command will display the default shell used by your user account? A. echo $SHELL B. echo $ENV C. echo $HOST D. echo $PWD Hint: Recall what data is contained by your system's environment variables

A is correct. The echo $SHELL command will display the value of the SHELL environment variable, which contains the default shell executable used by your user account. B, C, and D are incorrect. The ENV variable specifies the name of the shell configuration file used to configure the session. The HOST variable specifies the hostname of the system. The PWD directory contains the current directory path.

Which text processing command prints lines from each of two specified input files that have identical join fields? A. join B. sort C. expand D. cut Hint: Recall which command can use two files as input

A is correct. The join command prints a line from each of two specified input files that have identical join fields. The first field is the default join field, delimited by white space. B, C, and D are incorrect. The sort command sorts the lines of a text file alphabetically. The expand command is used to process a text stream and remove all instances of the Tab character and replace them with the specified number of spaces. The cut command is used to print columns or fields that you specify from a file to the standard output.

Prior to using the locate command to find a file, you decide to manually refresh the index of files in your Linux file system. Which shell command will do this? A. updatedb B. locatedb C. locate -i D. locate -SHint: The command updates the locate database file

A is correct. The locate database file (locatedb) will be automatically updated every day with the latest changes to the file system. You can manually update the index using the updatedb command from the shell prompt. B, C, and D are incorrect. Response B is the name of the locate database file. The locate -i command ignores case when matching filenames. The locate -S command displays statistics about the locate database instead of searching for files.

Which option can you use with the ls command to view the mode of the directories and files within the directory being listed? A. -l B. -a C. -R D. -m Hint: The file or directory mode consists of the file's owner as well as the permissions assigned to owner, group, and others

A is correct. The ls -l command displays the mode of the directories and files within the directory being listed. B, C, and D are incorrect. The -a option displays all files directories (including hidden files and directories). The -R option displays directory contents recursively. The -m option fills the width of the screen with a comma separated list of entries.

Which directive in the /boot/grub/menu.lst file specifies the initrd image that should be used by GRUB to create the initial ramdisk image during boot? A. root B. initrd C. kernel D. default Hint: This is not a global option. It is specified individually for each menu item in the GRUB menu

B is correct. The initrd directive specifies the initrd image that should be used by GRUB to create the initial ramdisk image during boot.A, C, and D are incorrect. The root directive specifies the location of the partition that is to be mounted as the GRUB root. The kernel directive specifies the location of the Linux kernel. The default directive specifies the menu item that will be booted automatically if the user doesn't make a manual selection.

Which shell command displays information about USB devices connected to your Linux system? A. hdparm B. lsusb C. sginfo D. lspci Hint: Think about the command you use to list files and directories in the file system

B is correct. The lsusb command can be used to display information about USB devices connected to your Linux system. A, C, and D are incorrect. The hdparm command displays information about your hard drive. The sginfo command lists all connected SCSI devices. The lspci command lists all PCI devices installed in the system.

You've just downloaded gftp-2.0.19-7.1.x86_64.rpm file to your home directory. Which command would you use to generate a checksum value? A. checksum ~/gftp-2.0.19-7.1.x86_64.rpm B. sum ~/gftp-2.0.19-7.1.x86_64.rpm C. verify ~/gftp-2.0.19-7.1.x86_64.rpmD. rpm -V ~/gftp-2.0.19-7.1.x86_64.rpm Hint: The command generates an MD5 checksum of the file

B is correct. The sum ~/gftp-2.0.19-7.1.x86_64.rpm command can be used to generate a checksum value of the file. A, C, and D are incorrect. Response A and C use invalid Linux commands and are distracters. Response D is used to verify a package that has already been installed.

You need to install the Network Time Protocol daemon (ntp) on your system. Which yum command will do this? A. yum ntp B. yum install ntp C. yum update ntp D. yum upgrade ntp Hint: This command checks the requested package's dependencies, downloads the package and its dependencies, and then installs them

B is correct. The yum install ntp command checks the requested package's dependencies, downloads the package and its dependencies, and then installs them. A, C, and D are incorrect. Response A fails to supply an action to be completed to the yum command. Response C and D require that the package already be installed before it is updated with a new version of the package.

Which special permission, when assigned to an executable file, causes the user who runs the file to temporarily become a member of the file's owning group? A. SUID B. SGID C. Sticky Bit D. Execute Hint: Recall what each special permission does and what each can be applied to (files or directories)

B is correct. When a user runs an executable file with SGID set, the user temporarily becomes a member of the file's owning group. A, C, and D are incorrect. When an executable file with the SUID set is run, the user who ran the file temporarily becomes the file's owner. The Sticky Bit permission isn't typically assigned to a file.

Which component in the Linux boot process is a small ramdisk in memory to which a temporary root file system is copied? A. bootloader B. initrd image C. vmlinuz-<version>.gz file D. linuxrc executable Hint: This process occurs shortly after the BIOS relinquishes control of the boot process

B is correct. With later Linux kernels, the bootloader creates a temporary ramdisk in memory during the boot process called an initrd image. This image contains a basic file system that can be used to complete a variety of startup tasks. A, C, and D are incorrect. The bootloader is responsible for creating the initrd image in memory during the boot process. The vmlinuz-version.gz file is the compressed Linux kernel file. The linuxrc file is a script that is run from the initrd file system to set up the system.

You need to change the owning group of the contracts.doc file from the users group to the purchasing group. Assuming the file is in the current directory, which commands can be used to do this? (Choose two.) A. chgrp users contracts.doc B. chown g=purchasing contracts.doc C. chown .purchasing contracts.doc D. chgrp users.purchasing contracts.doc E. chgrp purchasing contracts.doc Hint: Recall which commands can be used to change ownership and the appropriate syntax for using them

C and E are correct. Both the chown .purchasing contracts.doc command and the chgrp purchasing contracts.doc command will change the owning group of the contracts.doc file from users to purchasing. A, B, and D are incorrect. Response A specifies the wrong group name. Response B uses the incorrect syntax for the chown command. Response D uses the incorrect syntax for the chgrp command.

Which vi command-mode command can be used to delete text from the insertion point to the end of the line? A. dw B. de C. d$ D. dd Hint: The deleted text is saved in a memory buffer and can be pasted elsewhere in the file

C is correct. The d$ command deletes from the insertion point to the end of the line. The text is saved in a memory buffer. A, B, and D are incorrect. The dw command deletes the word that comes immediately after the cursor, including the space following the word. The de command deletes theword that comes immediately after the cursor, not including the space. The dd command deletes the entire current line.

You want to upgrade your Linux system with a larger hard disk drive. You've installed a second SATA hard disk drive in your system. Which command will clone the contents of the first SATA hard disk to the new second hard disk? A. dd if=/dev/sdb1 of=/dev/sda1 B. dd if=/dev/sda1 of=/dev/sdb1 C. dd if=/dev/sda of=/dev/sdb D. dd if=/dev/sdb of=/dev/sda Hint: Look closely at the input and output file parameters in the command

C is correct. The dd if=/dev/sda of=/dev/sdb command will clone the first SATA hard disk to the second SATA hard disk in the system. A, B, and D are incorrect. Response A references partitions instead of entire hard disks. It also reverses the input and output file locations. Response B also references partitions instead of entire hard disks. Response D reverses the input and output file locations.

You've just made several changes to the /etc/inittab file on a Linux server. You need to apply the changes without rebooting the system. Which command can you use to do this? A. init --reload B. init S C. init q D. init 6 Hint: The init process needs to be told to re-read its configuration file

C is correct. The init q command will tell init that changes have been made to /etc/inittab and that it needs to re-read its configuration. A, B, and D are incorrect. Response A uses incorrect syntax for the init command. Response B puts the system into single-user mode. Response D is partially correct. The init 6 command will cause the inittab file to be re-read, but it requires the system to be rebooted to do so, which violates the conditions of the scenario.

Which directive in the modprobe.conf file can be used to specify the IRQ and I/O address used by a non-PnP expansion board? A. install B. alias C. options D. resources Hint: The syntax used by this directive is io= and irq=

C is correct. The options directive in modprobe.conf gives modprobe a list of options, such as irq= or io=, that should be used when a particular kernel module loads. A, B, and D are incorrect. The install directive in modprobe.conf tells modprobe to load a specified module. The alias directive gives a kernel module an alias that can be used to reference it from the shell prompt. The resources directive doesn't exist in modprobe.conf and is a distracter.

Which command is used to scan your Linux file system for disk usage and to create your quota files? A. repquota B. quotaon C. quotacheck D. edquota Hint: Recall the sequence for establishing quotas in the Linux file system

C is correct. The quotacheck command is used to scan the file system for disk usages as well as your create quota files. The -amvug options are typically used with quotacheck to check all mounted file systems, check users, and check groups. A, B, and D are incorrect. The repquota command is used to view current disk space used by each user. The quotaon command is used to enable quotas on the file system. The edquota command is used to create disk quotas for each user.

Which regular expression would match Myfile1, Myfile2, and Myfiles but would not match Myfiles23? A. Myfile* B. Myfile$ C. Myfile. D. Myfile1 | Myfile2 Hint: Recall the regular expression that matches exactly one character

C is correct. The regular expression Myfile. matches exactly one character. Therefore, it would match Myfile1, Myfile2, and Myfiles but would not match Myfiles23.A, B, and D are incorrect. The * character in a regular expression matches any number of characters. The $ character matches an expression only if it appears at the end of a line. The Myfile1 | Myfile2 regular expression matches either Myfile1 or Myfile2, but would not match Myfiles or Myfiles23.

Which bash shell file descriptor is represented by the number 2? A. stdin B. stdout C. stderr D. stdpipe Hint: Recall the names of the three bash file descriptors

C is correct. The stderr bash shell file descriptor is represented by the number 2. A, B, and D are incorrect. The stdin descriptor is assigned the number 3, while the stdout descriptor is assigned the number 1. Response D is not a valid bash shell file descriptor and is a distracter.

Which options can be used to switch your Linux system into single-user mode? (Choose two.) A. Select Computer | Shutdown | Restart | Single User. B. Select System | Shutdown | Restart | Single User. C. Press CTRL - ALT - INS . D. Enter S in the Boot Options field of the GRUB menu. E. Enter init S at the shell prompt. Hint: Single-user mode is defined in your /etc/inittab file

D and E are correct. Entering S in the Boot Options field of the GRUB menu or entering init S at the shell prompt will switch the system to single-user mode. A, B, and C are incorrect. Menu options for switching to single-user mode are not provided by default in the GNOME or KDE desktop environments. The CTRL - ALT - INSkey combination has no effect on the Linux system (unless it's being run within a VMware virtual machine).

Where is the command history for your user account stored by the bash shell? A. /etc/bash_completion.d B. ~/.profile C. ~/.bashrc D. ~/.bash_history Hint: Recall where user-specific bash shell configuration files are stored

D is correct. Every time you enter a command at the shell prompt, that command is saved in the ~/.bash_history file in your home directory. A, B, and C are incorrect. Response A is used to configure bash shell command completion. Responses B and C are used to configure bash shell sessions.

You need to change ownership of the /tmp/schedule.txt file from your user account (tuxpenguin) to the ksanders user. Assuming you are currently logged in as tuxpenguin, which command can be used to do this? A. chown tuxpenguin /tmp/schedule.txt B. chown -u=tuxpenguin /tmp/schedule.txt C. chown ksanders /tmp/schedule.txt D. This can't be done. Only root can change ownership. Hint: Remember who is allowed to change ownership of files and directories

D is correct. Only root can change which user account owns a file. To change the owning group, you can be logged in as root or as the user who currently owns the file. A, B, and C are incorrect. Response A retains ownership of the file by tuxpenguin. Response B uses incorrect syntax for the chown command. Response C uses correct syntax and would work if it were run by root instead of tuxpenguin.

You need to create a symbolic link between a file named myapp in the bin subdirectory of your user's home directory and an executable file named myapp located in /var/opt. Which command will do this? A. ln ~/bin/myapp /var/opt/myapp B. ln /var/opt/myapp ~/bin/myapp C. ln -s ~/bin/myapp /var/opt/myapp D. ln -s /var/opt/myapp ~/bin/myapp Hint: Remember the correct order of the link file and its target file in the syntax of the ln command

D is correct. The -s option tells ln to create a symbolic link. The syntax of ln requires that the file being pointed to by the link be specified first, followed by the name of the link file to be created. A, B, and C are incorrect. Response A omits the -s option required for a symbolic link. It also reverses the order of the link file and the target file in the syntax of ln.Response B also omits the -s option. Response C also reverses the order of the link file and the target file in the syntax of ln.

Which kill signal tells the process to terminate immediately and allows the process to clean up after itself before exiting? A. SIGHUP B. SIGINT C. SIGKILL D. SIGTERM Hint: Recall which signal is a brute-force kill signal and which signal allows the process to exit cleanly

D is correct. The SIGTERM kill signal tells the process to terminate immediately and allows the process to clean up after itself before exiting. A, B, and C are incorrect. The SIGHUP signal restarts the process with exactly the same PID that it had before. The SIGINT signal sends a CTRL - C key sequence to the process. The SIGKILL signal is a brute-force signal that kills the process without allowing it to clean up after itself before exiting.

The updatedb process is currently running in the background on your Linux system with a PID of 4588 and a job ID of 1. You want to move the updatedb process from the background to the foreground. Which command will do this? A. fg 4588 B. fg 4558 -j1 C. bg 1 D. fg 1 E. bg updatedb Hint: Recall which command sends processes to the background and which brings them to the foreground

D is correct. The fg 1 command moves the background process with a job ID of 1 to the foreground. A, B, C, and E are incorrect. Responses A and B use the PID with the fg command, which is incorrect. Responses C and E use the bg command, which is used to move traced processes from the foreground to the background.

A coworker just sent you a file named project_schedule. You would like to determine what type of file this is before you try to open it. Assuming the file resides in the current directory, which command can you use to do this? A. cat project_schedule B. ls -la project_schedule C. type project_schedule D. file project_schedule Hint: Recall which command can be used to analyze a file's type

D is correct. The file project_schedule command will display the file's type. A, B, and C are incorrect. The cat command will attempt to display the file; it won't tell you what type of file it is. The ls -la command will show you extended information about the file, including its mode and ownership, but it won't display the type of file it is. The type command likewise does not display a file's type.

Which directive in /etc named lilo.conf file specifies the path to the boot image of a Linux kernel? A. root B. initrd C. boot D. image Hint: This directive is not a global option

D is correct. The image directive in the /etc directory named lilo.conf file specifies the path to the boot image of a Linux kernel. A, B, and C are incorrect. The root directive specifies the device that should be mounted as root. The initrd directive specifies the initial ramdisk image to be loaded with the kernel. The boot directive specifies the device that contains the boot sector.

Which command is used to rebuild the library cache manually? A. ldcache B. sln C. ldd D. ldconfig Hint: This command is useful in situations where you add a new dynamic library directory to the /etc/ld.so.conf file and need to update the library cache with the new information

D is correct. The ldconfig command can be used to rebuild the library cache manually. A, B, and C are incorrect. Response A is an invalid Linux command and is a distracter. Response B is used to make symbolic links to dynamic libraries if the dynamic linking system isn't working for some reason. Response C is used to view the shared libraries required by a specific application.

You need to view the shared libraries required by the vi text editor. Which command will do this? A. ldconfig -N /usr/bin/vi B. ldd -u /usr/bin/vi C. ldconfig -p /usr/bin/vi D. ldd -v /usr/bin/vi Hint: Recall which command is used to view shared libraries required by an executable

D is correct. The ldd -v /usr/bin/vi command will display the shared libraries required by the vi text editor. A, B, and C are incorrect. The ldconfig command is used to manage links to shared libraries. The -u option causes ldd to display a list of unused direct dependencies.

You want to write the stdout from the ps command to a file named myprocesses in your home directory without overwriting the existing contents of that file. Which command will do this? A. ps 3 > ~/myprocesses B. ps 1 > ~/myprocesses C. ps 2 >> ~/myprocesses D. ps 1 >> ~/myprocesses Hint: Recall which number is assigned to the stdout bash shell file descriptor

D is correct. The ps 1 >> ~/myprocesses command writes the stdout from the ps command to a file named myprocesses in your home directory without overwriting the existing contents of that file. A, B, and C are incorrect. Response A tries to use the stdin file descriptor for redirecting output, which can't be done. It also overwrites the contents of the file. Response B redirects the stdout, but it also overwrites the contents of the file. Response C redirects the stderr to the file.

You want to create a backup of the /home directory named backup.tar on an external USB hard drive mounted in /media/usb. Which command will do this? A. tar -c /media/usb/backup.tar /home B. tar -xvf /media/usb/backup.tar /home C. tar -cvf /home /media/usb/backup.tar D. tar -cvf /media/usb/backup.tar /home Hint: Remember the syntax for creating an archive with tar

D is correct. The tar -cvf /media/usb/backup.tar /home command will create a backup of the /home directory named backup.tar on an external USB hard drive mounted in /media/usb. A, B, and C are incorrect. Response A omits the -f option. Response B uses the -x option (extract) instead of the -c option (create). Response C reverses the name of the archive file and the name of the path to be archived.

Which file system does not use journaling? A. ReiserFS B. Ext2 C. Ext3 D. XFS

Hint: Newer Linux file systems use journaling Reference: Chapter 10: Managing Linux File Systems Objective: 104.1 Create partitions and file systems: Use various mkfs commands to set up partitions and create various file systems, such as ext2, ext3, xfs, reiserfs v3, vfat B is correct. The Ext2 file system does not use journaling. However, you can use the mke2fs command with the -j option to add a journal to an existing Ext2 file system, effectively making it an Ext3 file system. A, C, and D are incorrect. Reiser, Ext3, and XFS all use journaling to protect the file system.

You need to edit the /etc/samba/smb.conf file with a text editor. Which commands will do this? (Choose two.) A. sed /etc/samba/smb.conf B. cat /etc/samba/smb.conf C. vim /etc/samba/smb.conf D. fedit /etc/samba/smb.conf E. vi /etc/samba/smb.conf

Hint: Recall the Linux utility you can use to edit text files Reference: Chapter 3: Using the vi Editor Objective: 103.8 Perform basic file editing operations using viC and E are correct. You can use either the vim or vi command to edit text files. In fact, the /usr/bin/vi file is actually a symbolic link to the /bin/vim executable. A, B, and D are incorrect. The sed editor is a stream editor and can be used to edit a text file by sending it to the input of the command. However, it's not the best choice in this scenario. The cat command only displays content on the screen. It can't be used to edit a file. There is no shell utility named fedit.

You're working from the shell prompt on a Linux system and the current directory is /var/opt. Which commands can be used to switch to the /var/log directory? (Choose two.) A. cd log B. cd /var/log C. cd ./log D. cd ..log E. cd ../log

Hint: Remember the difference between absolute and relative path names Reference: Chapter 4: Managing Linux Files and Directories Objective: 103.3 Perform basic file management B and E are correct. The cd /var/log command uses an absolute path to change to the directory. The cd ../log command uses a relative path to change to the directory. A, C, and D are incorrect. Each of these responses uses an invalid relative path.

You're installing a new Linux workstation. Assuming you want to use POSIX users and permissions, which file systems can you select from during the installation? (Choose two.) A. NTFS B. FAT32 C. ReiserFS D. FAT16 E. Ext4

Hint: Remember the file system types used on Linux systems Reference: Chapter 10: Managing Linux File Systems Objective: 104.1 Create partitions and file systems: Use various mkfs commands to set up partitions and create various file systems, such as ext2, ext3, xfs, reiserfs v3, vfat C and E are correct. Reiser and Ext4 both support standard POSIX users and permissions.A, B, and D are incorrect. While many Linux distributions may allow you to select these file systems during installation, support and functionality will be typically limited. Specifically, they do not support POSIX users and permissions.

You've opened the /tmp/settings.txt file in the vi editor. You need to enter new text into the file. Which keys will switch you to Insert mode? (Choose two.) A. INSERT B. ESC C. CTRL - E D. I E. ALT - R

Hint: Remember the keyboard commands used with vi Reference: Chapter 3: Using the vi Editor Objective: 103.8 Perform basic file editing operations using vi A and D are correct. You can press INSERT , I , or S to enter Insert mode in the vi editor. B, C, and E are incorrect. The ESC key is used to return to Normal mode from Insert mode in the vi editor. The CTRL - E and ALT - R keystrokes aren't used by the vi editor.

Which command displays a listing of the contents of the current directory in the file system, including hidden files? A. ls -h B. ls -R C. ls -l D. ls -a E. ls

Hint: Remember the options that can be used with the ls command Reference: Chapter 4: Managing Linux Files and Directories Objective: 103.3 Perform basic file management. D is correct. The -a option causes the ls command to display normal and hidden files and directories. A, B, C, and E are incorrect. The -h option causes ls to display file sizes in human- readable format. The -R option causes ls to list subdirectories recursively. The -l option causes ls to use a long listing format. The ls command alone only displays normal (non-hidden) files.

You need to create a new directory in your user's home directory named MyFiles. Which command can be used to do this? A. mkdir ~/myfiles B. mkdir ~/MyFiles C. md ~/myfiles D. mkdir ~MyFiles E. md ~/MyFiles

Hint: Remember the proper syntax for creating a new directory Reference: Chapter 4: Managing Linux Files and Directories Objective: 103.3 Perform basic file management B is correct. The mkdir command is used to create new directories in the file system (in this case ~/MyFiles). A, C, D, and E are incorrect. Response A uses the wrong case for the directory name. Responses C and E use the incorrect command for creating new directories (md). Response D omits the (/) character after the tilde.

Which manual section contains man pages for administrative utilities used by the root user? A. 1 B. 3 C. 5 D. 8

Hint: Remember what section contains what type of documentation Reference: Chapter 2: Working with the Linux Shell Objective: 103.1 Work on the command line D is correct. Section 8 of the manual contains documentation for administrative utilities used by the root user. A, B, and C are incorrect. Section 1 contains documentation for shell commands that can be used by any user. Section 3 contains documentation for library functions. Section 5 contains file format descriptions and conventions.

You are designing the implementation of a new Linux server in your company's network. This server will function as an internal web server for your organization. This web server will provide a web-enabled database application that employees will use to manage their vacation and sick leave time. What daemons must be included in your specifications? (Choose two.) A. Apache B. MySQL C. Samba D. Telnet E. Pure-FTP

Hint: The daemons you install and configure should be related to the function of the system Reference: Chapter 5: Installing Linux Objective: 102.1 Design hard disk layout: Tailor the design to the intended use of the system A and B are correct. The Apache web server is frequently implemented on Linux in conjunction with the MySQL database server to develop web-based applications. C, D, and E are incorrect. While these are useful services, they are not typically used to provide web-based applications.

Which bash shell environment variable is used to configure the characters displayed in the shell prompt? A. DISPLAY B. SHELL C. ENV D. PS1

Hint: The environment variable used to configure the shell prompt doesn't contain directory paths by default D is correct. The PS1 environment variable specifies the characters used to create the shell prompt. A, B, and C are incorrect. The DISPLAY environment variable specifies the location where output from your X display should be sent. SHELL specifies the full path to the shell executable. ENV specifies the name of the file the bash shell reads to configure its environment.

Which environment variable specifies the location of the man pages on a Linux system? A. PATH B. MANPATH C. SHELL D. HOST

Hint: The variable must point to a directory in the file system Reference: Chapter 2: Working with the Linux ShellObjective: 103.1 Work on the command line B is correct. On many Linux distributions, the MANPATH environment variable is used to specify the location of the man page files. Other Linux distributions may use the MANPATH directive in the /etc/man_db.conf file to specify where man pages are stored.

Which statement is true regarding a hard link? A. The link file and the target file share the same inode. B. The link file and the target file each have their own inode. C. The link file and the target file can be easily determined. D. Hard links can only be created within the /sbin, /bin/, and /usr directories. E. The link file and the target files can have different modes. Hint: Recall the critical attribute that differentiates a hard link from a symbolic link

A is correct. With a hard link, the link file and the target file share the same inode. B, C, D, and E are incorrect. With a hard link, the link file and the target file share the same inode. Because of this, it can be difficult to tell the difference between the link file and the target file. Hard links can be created in most directories in the file system. Because the two files share the same inode, they have the same mode.

You need to rename a file in the current directory named myfile.txt to myfile.old. Which command will do this? A. mv myfile.txt myfile.old B. ren myfile.txt myfile.old C. rendir myfile.txt myfile.old D. rename myfile.txt myfile.old E. cp myfile.txt myfile.old

A is correct. You can use the mv command to rename a file. The new file specified is created while the original file is deleted. B, C, D, and E are incorrect. The ren, rendir, and rename commands are not valid Linux shell commands. The cp command will create a new file using the filename specified; however, the original file remains intact.

You've just downloaded an RPM package file named gftp-2.0.19-7.1.x86_64.rpm to the current directory. Which commands could you use to install the package on your system? (Choose two.) A. rpm -e gftp-2.0.19-7.1.x86_64.rpm B. rpm -i gftp-2.0.19-7.1.x86_64.rpm C. rpm -U gftp-2.0.19-7.1.x86_64.rpm D. rpm -V gftp-2.0.19-7.1.x86_64.rpm E. rpm -qi gftp-2.0.19-7.1.x86_64.rpm Hint: One of these commands will install the package if it isn't installed or upgrade it if it is

B and C are correct. Either the -i or the -U option can be used to install a package with rpm. A, D, and E are incorrect. The -e option causes rpm to uninstall a package. The -V option verifies an installed package. The -qi option queries a package for detailed information.

Which bash configuration files are used for non-login bash shell sessions? (Choose two.) A. /etc/profile B. /etc/bashrc C. ~/.bashrc D. ~/.profile E. ~/.bash_profile Hint: System-wide and user-specific bash configuration files are used to configure non-login shells

B and C are correct. The /etc/bashrc and ~/.bashrc files are used to configure non- login shell sessions, although other files may be used on some distributions. A, D, and E are incorrect. The /etc/profile, ~/.profile, and ~/.bash_profile files are used to configure login shell sessions.

You want your Linux system to automatically run the rsync command every time the system boots to synchronize files. Which file should you enter the appropriate command in to accomplish this (depending upon your distribution)? (Choose two.) A. rc B. boot.local C. rc.local D. rc.sysinit E. boot Hint: One file is used by System V-type systems, while the other is used by BSD- type systems

B and C are correct. The boot.local file is a script that is run by init at startup on BSD-type systems, while rc.local is run by init on startup on System V-type systems. If you want to run a particular command automatically at startup, you can insert the command into the appropriate file with a text editor. A, D, and E are incorrect. The rc script is used to switch between runlevels while the system is running. The rc.sysinit and boot scripts are used to set the path, check the file system for errors, set the system clock, and so on. These scripts may be rewritten during a system update, so you shouldn't put your own commands in either of these files.

You need to download and install the gcc package using yum. Which commands will do this? (Choose two.) A. yumdownloader gcc B. yum update gcc C. yum install gcc D. yum list available E. yum localinstall gcc Hint: Remember the yum commands and syntax

B and C are correct. The yum install gcc command will download the gcc package file from the configured software repository and install it on the system. The yum update gcc command will also download and install the gcc package if it determines that the package hasn't been installed.A, D, and E are incorrect. The yumdownloader gcc command will download the package, but it won't install it. The yum update gcc command uses incorrect yum syntax. The yum list available command displays a list of all packages available for installation in the configured repositories. The yum localinstall command is used to install a package that has already been downloaded.

Which shell commands will shut down and power off the Linux system? (Choose two.) A. shutdown -c B. shutdown +10 -h Please save your work and log out. C. shutdown +10 -r Please save your work and log out. D. init 0 E. init 6 Hint: Recall the commands that can be used to halt a system

B and D are correct. The shutdown +10 -h Please save your work and log out. command will halt the system after ten minutes and will prompt users with the warning message specified. A, C, and E are incorrect. Response A cancels an impending shutdown. Response C will reboot the system after ten minutes. Response E will reboot the system immediately.

Which shell commands can be used to reboot your Linux system? (Choose two.)A. halt B. shutdown C. init 0 D. init 6 E. exit Hint: Recall that some commands can be used to either power off or reboot the system, depending upon which option you use

B and D are correct. The shutdown -r command can be used to reboot the system, as can the init 6 command. A, C, and E are incorrect. The halt and init 0 commands are used to halt the system. The exit command is used to end a shell session.

Which commands can be used to display the version number and release number of your Linux kernel? (Choose two.) A. uname -s B. uname -rv C. uname -p D. uname -o E. uname -a Hint: Some uname options display additional system information details

B and E are correct. The uname -rv command displays the version number and release number of your Linux kernel. The uname -a command displays information from all uname options, including -r and -v. A, C, and D are incorrect. The uname -s option displays the system hostname. The -p option displays processor information, while the -o option displays the operating system.

Which hard disk drive geometry parameter refers to the concentric parallel tracks on all sides of all platters in the drive? A. Heads B. Cylinders C. Sectors D. Landing Zone Hint: Imagine looking at the hard disk platters from the top view

B is correct. Cylinders refer to the concentric parallel tracks on all sides of all platters in the hard disk drive. Imagine a hollow cylinder that penetrates down through all of the platters in a hard drive. A, C, and D are incorrect. Heads refer to the number of read/write heads in the drive. Sectors refer to the number of wedges the platters have been divided into. A Landing Zone is an area of the platter near its inner diameter where no data are stored.

To set the time zone, some Linux distributions use a symbolic link to the appropriate time zone file in /usr/share/zoneinfo. What is the filename of this symbolic link? A. /etc/timezone B. /etc/localtime C. /etc/sysconfig/clock D. /etc/TZ Hint: To change time zones on these distributions, all you have to do is update the file to which this symbolic link points. In fact, the tzconfig utility does just this

B is correct. Some Linux distributions use the/etc/localtime symbolic link to the appropriate time zone file in /usr/share/zoneinfo to set the time zone. A, C, and D are incorrect. The /etc/timezone file is used by some distributions to set the time zone, but it's a text file, not a symbolic link. Likewise, the /etc/sysconfig/clock file is used by some distributions to set the time zone, but it's a text file, not a symbolic link. The TZ environment variable is also used by some distributions to set the time zone, but it isn't a file as implied in Response D.

Where are the start and kill symbolic links stored that are used to start and stop services when the system enters runlevel 3 on a system that uses BSD-type init scripts? A. /etc/rc3.d B. /etc/init.d/rc3.d C. /etc/xinet.d D. /etc/rc3.d/init.d Hint: Recall where System V- and BSD-type systems store their start and kill symbolic link files

B is correct. The /etc/init.d/rc3.d directory contains the start and kill symbolic links used to start and stop services when the system enters runlevel 3 on a system that uses BSD-type init scripts. A, C, and D are incorrect. Response A is used on systems that use System V-type init scripts. Response C contains configuration files for daemons managed by the xinetd daemon. Response D uses an invalid directory and is a distracter.

Your Linux system uses BSD-type init scripts. Some of symbolic link files in your /etc/init.d/rc3.d directory include S05cifs, S11cron, S08ntp, and S07alsasound. When your system enters runlevel 3, what order will the services be started in? A. S07alsasound, S08ntp, S11cron, S05cifs B. S05cifs, S07alsasound, S08ntp, S11cron C. S11cron, S08ntp, S07alsasound, S05cifs D. S07alsasound, S05cifs, S11cron, S08ntp E. Depends on the configuration specified in the /etc/inittab file Hint: Recall the parameter used to determine the startup order

B is correct. The Sx part of the symbolic link filename specifies the order in which services should be started. Lower-numbered services are started before higher- numbered services. A, C, D, and E are incorrect. The Sx part of the symbolic link filename specifies the order in which services should be started. Lower-numbered services are started before higher-numbered services. The /etc/inittab file specifies runlevel configuration information, but it doesn't specify the order in which services are started.

You need to change every instance of the word "fs1" to "fs2" in the /etc/hosts.allow file. The output should be written to a new file named /etc/hosts.allow.new. Which of the following commands will do this? A. sed s/fs1/fs2/ 1> /etc/hosts.allow.new B. cat /etc/hosts.allow | sed s/fs1/fs2/ 1> /etc/hosts.allow.new C. cat /etc/hosts.allow | sed s/fs1/fs2/D. cat /etc/hosts.allow | sed /fs1/fs2/ 1>/etc/hosts.allow.new Hint: Remember the three different file descriptors and how to redirect output

B is correct. The cat /etc/hosts.allow | sed s/fs1/fs2/ 1> /etc/hosts.allow.new command will change every instance of the word "fs1" to "fs2" in the /etc/hosts.allow file and redirect the output to a new file named /etc/hosts.allow.new. A, C, and D are incorrect. Response A doesn't provide any means to send the contents of the hosts.allow file to the input of sed. Response C fails to redirect the output to the new file. Response D omits the s option in the sed command.

The value of umask on your Linux system is set to 0023. You create a new file in your home directory named schedule.odt. What is this file's default mode after you create it? A. rw-rw-rw- B. rw-r--r- - C. rw-r- -r-x D. rw-rw-rwx Hint: Remember that umask subtracts permissions from the default mode

B is correct. The default mode for new files on Linux is rw-rw-rw-. A mask of 0023 subtracts no permissions from Owner, Write (2) from Group, and Write (2) and Execute (1) from Others. The result is a mode of rw-r- -r- -. A, C, and D are incorrect. Response A would require a mask of 0000. Response C and D are incorrect because Execute for Others is not included in the default file mode.

Which command can be used to monitor inode usage in your Linux file systems? A. du -h B. df -iC. df -hT D. du -a Hint: Remember which utility can be used to monitor inode usage

B is correct. The df -i command can be used to view inode usage on each of your mounted file systems. A, C, and D are incorrect. The du command can't be used to monitor inode usage. The df -hT command is used to monitor free space instead of free inodes.

You want to display a list of partitions configured on the first SATA hard disk drive in your Linux system. Which shell command will do this? A. fdisk /dev/hda -l B. fdisk /dev/sda -l C. fdisk /dev/sdb D. partprobe /dev/sda

B is correct. The fdisk /dev/sda -l command will display a listing of partitions on the first hard SATA hard drive in the system.A, C, and D are incorrect. Response A would only work on older versions of the Linux kernel with older PATA hard drives. Response C would open fdisk for the second SATA hard drive in the system. Response D uses the incorrect syntax for the partprobe command. Including the -s option with partprobe would display the partition table for /dev/sda.

You need to find all of the files on your system with the string "log" in their filenames that are owned by the tux user. Which command will do this? A. find ~/ -name "*log*" -user tux B. find / -name "*log*" -user tux C. find / -name "*.log" -u tux D. find /var -name "*log*" -u tux Hint: Be sure the command locates files with the string "log" anywhere in the filename

B is correct. The find / -name "*log*" -user tux command finds all of the files on your system with the string "log" in their filenames that are owned by the tux user. A, C, and D are incorrect. Response A only searches the current user's home directory. Response C only finds files with an extension of *.log. It also uses an incorrect option (-u) for specifying the file owner. Response D only searches the /var directory. It also uses an incorrect option (-u) for specifying the file owner.

You need to generate a listing of files in the /etc directory that have the text string "eth0" within them. Which command can you use to do this? A. grep -n eth0 /etc/* B. grep -l eth0 /etc/*C. grep -i eth0 /etc/* D. grep -v eth0 /etc/* Hint: Recall the grep option that displays files that contain the matching text string, not the text string itself

B is correct. The grep -l eth0 /etc/* command will generate a listing of files in the /etc directory that have the text string "eth0" within them. A, C, and D are incorrect. The -n option causes grep to display matching line numbers. The -i option causes grep to ignore case when searching for the search string. The -v option displays all lines that do not contain the search string.

Which term refers to a process that has finished executing and exited, but whose parent process didn't get notified that it was finished and hasn't released the child process' PID? A. Sleeping B. Uninterruptibly Sleeping C. Zombied D. Traced Hint: The process in this situation is gone, but the parent thinks it's still running

C is correct. A zombied process is one where the process has finished executing and exited, but the process' parent didn't get notified that it was finished and hasn't released the child process' PID. A zombied process may eventually clear up on its own. If it doesn't, you may need to manually kill the parent process. A, B, and D are incorrect. A sleeping process has entered a not-runnable state but is still loaded. A process that is uninterruptibly sleeping is also still loaded, but in a sleep state that won't allow it to respond immediately to a signal. A traced process is simply a stopped process.

The myapp.sh file is an executable script. Its mode is 650. The ksanders user is the file's owner. The owning group is the users group, of which ksanders is a member of. What can the ksanders user do with the file?A. She can open the file and view its contents, but she can't save any changes to the file nor can she execute it. B. She can open the file, view its contents, and execute the file; but she can't save any changes to the file. C. She can open the file, view its contents, save changes to the file, and execute the file. D. She can execute the file, but she can't open it or modify the file. Hint: Recall how the permissions in the mode are applied and how they are represented numerically

C is correct. Permissions are additive. Because ksanders is both the file owner and a member of the owning group, she receives permissions assigned to both owner (Read, Write) and group (Read, Execute). A, B, and D are incorrect. Because ksanders is both the file owner and a member of the owning group, she receives Read, Write, and Execute permissions.

You are defining partitions for a new Linux implementation. The system will be a server system with 2GB of RAM, so you define the swap partition to be about 1GB in size (cylinders 0-144). You also define the root partition to be about 22GB in size (cylinders 145-3132). You also define a partition for /boot that is about 1GB in size (cylinders 3133-3277). You also define a partition for /srv that is about 20GB in size (cylinders 3278-6178). What is wrong with this partitioning setup? A. The swap partition on a server should be twice the size of the installed RAM. B. The root partition should be at least 40GB in size. C. The /boot partition should be within the first 1024 cylinders. D. You shouldn't create a separate partition for the /srv directory. Hint: Recall the recommended directories for separate partitions

C is correct. Some hardware architectures and storage buses require the /boot partition to reside within the first 1024 cylinders of the hard disk. A, B, and D are incorrect. Because this is a server system, a large swap partition isn't required. 22GB for the root partition, while somewhat small, is still sufficient for the installation. It is perfectly acceptable to create a separate partition for the /srv directory.

Which GRUB stage presents a graphical menu on the screen that allows the user to select the kernel image that should be loaded? A. Stage 1B. Stage 1.5 C. Stage 2 D. Stage 3 Hint: Recall how the three GRUB stages interact

C is correct. Stage 2 presents a graphical menu on the screen that allows the user to select the kernel image that should be loaded. A, B, and D are incorrect. Stage 1 points to the location of Stage 1.5 or Stage 2. Stage 1.5 contains any drivers needed to load Stage 2. GRUB does not implement a Stage 3. This response is a distracter.

Which Linux configuration file specifies the default runlevel that the system will boot into on startup? E. /etc/boot F. /etc/bash.bashrc G. /etc/inittab H. /etc/mtab Hint: The syntax used in the configuration file to specify the default runlevel is id:<runlevel>:initdefault:

C is correct. The /etc/inittab is used to specify the default system runlevel. The syntax is id:<runlevel>:initdefault:. A, B, and D are incorrect. The /etc/boot file is a script that is run when the system first starts, but it doesn't configure the runlevel. The /etc/bash.bashrc file is used to configure global bash shell options. The /etc/mtab file contains a list of mounted file systems.

According to the Filesystem Hierarchy Standard, which directory contains code libraries used by programs in /bin and /sbin? A. /opt B. /sbin C. /lib D. /usr/share Hint: Your kernel modules are also stored in the modules subdirectory of this directory

C is correct. The /lib directory contains libraries used by programs in /bin and /sbin. A, B, and D are incorrect. The /opt directory contains files installed by some Linux applications. The /sbin directory contains important system management and administration files, such as fdisk, fsck, ifconfig, init, mkfs, shutdown, and halt. The /usr/share directory contains static files such as documentation files.

Which directory in the Linux file system is actually a pseudo-file system that is dynamically created whenever it is accessed?A. /opt B. /sbin C. /proc D. /srv E. /tmp Hint: This directory is used to access process and other system information from the Linux kernel

C is correct. The /proc directory is a little different in that it doesn't actually exist in the file system. Instead, it's a pseudo-file system that is dynamically created whenever it is accessed. It's used to access process and other system information from the Linux kernel. Within /proc are a number of different subdirectories, each identified with a number instead of a name. These numbers correspond to the process ID (PID) number of the associated process running on the system. A, B, D, and E are incorrect. The /opt directory contains files for some programs you install on the system. The /sbin directory contains important system management and administration files. The /srv directory contains subdirectories where some services running on the system save their files. The /tmp directory contains temporary files.

Which option in field 4 of a mount entry in the /etc/fstab file causes file system changes to be cached and then written later when the system isn't busy? A. rw B. sync C. async D. atime Hint: This option should be used when mounting non-removable storage devices, such as internal hard disks

C is correct. The async option Enables asynchronous I/O. Changes are cached and then written when the system isn't busy. A, B, and D are incorrect. The rw option mounts a file system in read/write mode. The sync option enables synchronous I/O where changes are written immediately. (This can be used for removable devices such as floppy disks.) The atime option specifies that the file access time is updated in a file's inode.

You need to send the contents of the ~/troubleshooting.txt file to the grep command and identify any lines containing the text FAILED. Which commands will do this? (Choose two.) A. grep FAILED | ~/troubleshooting.txt B. cat ~/troubleshooting.txt < grep FAILED C. cat ~/troubleshooting.txt > grep FAILED D. cat ~/troubleshooting.txt | grep FAILED E. grep <~/troubleshooting.txt FAILED

Hint: Recall the characters that can be used within a shell command to pipe output and redirect input D and E are correct. Response D pipes the output of the cat command to the input of the grep command. Response E redirects the troubleshooting.txt file to the input of the grep command. A, B, and C are incorrect. Response A attempts to pipe the output of the grep command to a text file, which is an invalid operation. Response B tries to redirect the grep command to the input of the cat command, which is also an invalid operation. Response C attempts to redirect the output of the cat command to another command instead of to a file.

When installing a Linux system, which directory must you create a separate disk partition for? A. /home B. / C. /var D. /usr

Hint: Recall the directories for which separate partitions are optional Reference: Chapter 5: Installing Linux Objective: 102.1 Design hard disk layout: Allocate file systems and swap space to separate partitions or disks B is correct. You must create a minimum of two partitions on any Linux deployment; one for the root directory (/) and one swap partition. A, C, and D are incorrect. While it is a good idea to create separate partitions for these directories in the file system, you are not required to do so.

You need more information on the chgrp command. Which commands can be used to learn how to use this utility? (Choose two.) A. man chgrp B. help chgrp C. chgrp /help D. info chgrp E. chgrp -man

Hint: Recall the sources of documentation on a Linux system Reference: Chapter 2: Working with the Linux Shell Objective: 103.1 Work on the command line A and D are correct. The man and info utilities can be used to view documentation on the chgrp command. B, C, and E are incorrect. There is no help shell command in Linux. The /help and - man options are not valid with the chgrp command. However, you could use the -- help option with chgrp to view a summary of how to use the command.

Which utilities can be used to view the contents of a text file from the shell prompt? (Choose two.) A. headB. less C. type D. touch E. print

Hint: Recall the utilities that can be used to view text files Reference: Chapter 4: Managing Linux Files and Directories Objective: 103.3 Perform basic file management A and B are correct. The head command displays the first few lines of a text file on the screen. The less command displays the entire text file on the screen a few lines at time. C, D, and E are incorrect. The print command isn't a valid Linux shell command. The type command returns what type of command is executed when you enter it. The touch command is used to create new files.

You need to create a new text file named /home/ksanders/orders.txt. Which command will do this? (Choose two.) A. vi /home/ksanders/orders.txt B. newfile /home/ksanders/orders.txt C. mkfile /home/ksanders/orders.txt D. fedit /home/ksanders/orders.txt E. touch /home/ksanders/orders.txt

Hint: Recall utilities that can be used to create new files Reference: Chapter 3: Using the vi Editor Objective: 103.8 Perform basic file editing operations using vi A and E are correct. You can use the vi command to create a new file and open it in a text editor. However, the file won't actually be created until you write to the file in the editor. You can also use the touch command to create a new, empty file in the file system.B, C, and D are incorrect. The newfile, mkfile, and fedit shell commands don't exist on Linux.

You need to capture new entries as they are added at the end of the /var/log/messages file to the troubleshooting.txt file in your home directory. Which command will do this? A. tail /var/log/messages > ~/troubleshooting.txt B. tail -f /var/log/messages > ~/troubleshooting.txt C. tail -f /var/log/messages 2> ~/troubleshooting.txt D. tail -f /var/log/messages | ~/troubleshooting.txt

Hint: Recall which descriptor redirects the stdout from a command to a file B is correct. The tail -f /var/log/messages > ~/troubleshooting.txt command will monitor the /var/log/messages file for new entries and write them to the troubleshooting.txt file. A, C, and D are incorrect. Response A omits the -f option required for tail to monitor the log file for new entries. Response C redirects the stdout from the tail command tothe troubleshooting.txt file. Response D attempts to pipe the output from tail to a text file, which is an invalid operation.

You need to monitor the messages being written to the /var/log/messages file while troubleshooting a Linux daemon that won't start correctly. Which command can you use to monitor the file and display each new message on the screen as they are added? A. tail /var/log/messages B. tail -f /var/log/messages C. less -f /var/log/messages D. cat -f /var/log/messages E. cat /var/log/messages | more

Hint: Recall which utility can monitor a text file Reference: Chapter 4: Managing Linux Files and Directories Objective: 103.3 Perform basic file managementB is correct. The -f option causes the tail command to display the last few lines of a text file on the screen and monitor the file for new lines that may be added. As new lines are added, they are displayed on the screen as well. A, C, D, and E are incorrect. The tail command alone displays the last few lines of the file on the screen, but it doesn't monitor the file for new lines. The less and cat commands don't use the -f option and hence can't be used to monitor a log file for new entries. Likewise, piping the output of the cat command to the input of the more command will not display new entries as they are added to the log file.

You've opened a configuration file on your Linux system in the vi text editor. You've made changes to the file but realize that a number of mistakes have been made. You want to close the file without saving any changes and start over. Which command will do this? A. :q B. :quit C. :exit! D. :q!

Hint: Remember the command used to close without saving Reference: Chapter 3: Using the vi Editor Objective: 103.8 Perform basic file editing operations using vi D is correct. Entering :q! in Normal mode in the vi editor will discard all changes to the file since the last save and exit the editor. A, B, and C are incorrect. The :q and :quit commands will only quit the editor if no changes have been made to the file. The :exit! Command will exit the editor but will also save any changes made to the file.


Conjuntos de estudio relacionados

Indiana State Life and Health Insurance Exam

View Set

Questions I Missed on PMP Practice Exam

View Set

Ch. 32 Antituberculars, Antifungals, Peptides, and Metronidazole

View Set

NUR318 Exam III Study Guide Maternal Health Nursing

View Set

Project Management Ch. 1 Quizzes

View Set

Issues in International Business :)

View Set