sErV

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan 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. OLDPWD E. 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.

Which commands will perform a scan for open TCP ports on the local system? (Choose two.) A. nmap -sT localhostB. netstat -l C. nmap -sU localhost D. netstat -i E. netstat -r Hint: Recall which command checks for listening (open) sockets

A and B are correct. The nmap -sT localhost command will scan for open TCP ports on the local host, while the netstat -l command will generate a list of listening sockets (open ports) on the local host (both TCP and UDP). C, D, and E are incorrect. Response C scans for open UDP ports. Response D generates network interface statistics. Response E displays the routing table.

To configure public key authentication, the first thing you need to do is create the public/private key pair on the client system so that you can send the public key to the SSH server. Which commands will do this? (Choose two.) A. ssh-keygen -t rsaB. ssh-keygen -t dsa C. ssh-add ~/.ssh/id_rsa D. ssh-add ~/.ssh/id_dsa E. ssh-agent bash Hint: The command you use depends on which type of key file is used by the SSH server

A and B are correct. You can use either the ssh-keygen -t rsa or the ssh-keygen -t dsa command to create a public/private key pair on your client system so that you can send the appropriate public key to the SSH server. C, D, and E are incorrect. These commands are used to set the ssh-agent utility to eliminate the need to enter the passphrase every time you establish an SSH connection.

You need to run the updatedb command two hours in the future. Which commands will do this? (Choose two.) A. at now + 2 hours B. at updatedb -t +120m C. at now + 120 minutes D. at now + 2 hours updatedb E. at now + 2 hours updatedb Hint: Recall the syntax for using the updatedb command

A and C are correct. Both of these commands will configure the command that follows to run two hours in the future. B, D, and E are incorrect. Response B uses incorrect at command syntax. Responses D and E include the name of the command to run on the at command line, which is incorrect.

Which private host keys are used by the sshd daemon during an SSH version 2 session? (Choose two.) A. etc/ssh/ssh_host_rsa_key B. /etc/ssh/ssh_host_key C. /etc/ssh/ssh_host_dsa_keyD. /etc/ssh/ssh_host_key.pub E. etc/ssh/ssh_host_rsa_key.pub Hint: Remember which private keys are used for SSH v2 sessions

A and C are correct. These files are the private host keys used by the sshd daemon during an SSH v2 session. B, D, and E are incorrect. The file in response B is used in SSH v1 sessions. The files in responses D and E are public key files.

Which bash shell configuration files contain parameters that are applied system wide? (Choose two.) A. /etc/bash.bashrc B. ~/.profile C. ~/.bashrc D. /etc/profile E. /etc/environment

A and D are correct. Either /etc/bash.bashrc or /etc/profile (depending upon the type of bash shell) is used to provide default configuration parameters for the bash shell that applied system-wide. B, C, and E are incorrect. B and C contain bash configuration parameters that are unique to the current user. Response E contains configuration parameters used by the pam_env module.

Which file is used to restrict which users are allowed to create crontab files on your Linux system? (Choose two.) A. /etc/cron.deny B. /etc/cronusers.deny C. /etc/hosts.deny D. /etc/cron.allow E. /etc/hosts.allow F. /etc/cronusers.allow Hint: Two files can be used to control crontab access

A and D are correct. If /etc/cron.deny exists, then the users in that file are denied the ability to create crontabs. All other users can by default. If /etc/cron.allow exists, then only the users in that file are allowed to create crontabs. All other users are denied by default. B, C, E, and F are incorrect. Responses B and F are not used to control cron access and are distracters. Responses C and E are used by network services to restrict access to specific hosts on the network.

Which configuration files are used to store your X server configuration settings? (Choose 2.) A. /etc/X11/XF86Config B. /etc/sysconfig/windowmanager C. /etc/sysconfig/displaymanagerD. /etc/X11/xorg.conf E. /etc/X11/xinit Hint: The configuration file used depends the X server your distribution implements

A and D are correct. If your distribution uses X.org, then the X server configuration settings are saved in /etc/X11/xorg.conf. If your distribution uses XFree86, then the X server configuration settings are saved in /etc/X11/XF86Config. B, C, and E are incorrect. The /etc/sysconfig/windowmanager file is used to specify which window manager (such as GNOME or KDE) your system uses. The /etc/sysconfig/displaymanager file specifies which X server your system has implemented. The /etc/X11/xinit file is an executable that is run by the startx script to initialize an X session from the command prompt.

Which protocols operate at the Network layer of the OSI model? (Choose two.) A. IP B. TCP C. UDP D. ICMP E. HTTP Hint: Think about the flow of information through the OSI reference model on the sender and the receiver

A and D are correct. The IP and ICMP protocols operated at the Network layer of the OSI model. B, C, and E are incorrect. The TCP and UDP protocols operate one layer up from the IP and ICMP protocols at the Transport layer of the OSI model. The HTTP protocol operates at the highest layer (Application) of the OSI model.

The ServerLayout section within the /etc/X11/xorg.conf file ties together two other types of sections found within the file. What are they? (Choose two.) A. Screen B. Modes C. Device D. Monitor E. InputDevice Hint: Recall the structure of the xorg.conf file

A and E are correct. The ServerLayout section within the /etc/X11/xorg.conf file binds together one or more Screen section(s) and one or more InputDevice section(s). B, C, and D are incorrect. The Modes, Device, and Monitor sections are not included within the ServerLayout section of the /etc/X11/xorg.conf file.

One of your Linux workstations has been configured with an incorrect default gateway router address. Which file do you need to edit to correct this? A. /etc/sysconfig/network/routes B. /etc/sysconfig/network/ifcfg-eth0 C. /etc/hostname D. /etc/resolv.conf Hint: Recall which file is used to configure routes, including the default route

A is correct. All of your routes are configured in the /etc/sysconfig/network/routes file.B, C, and D are incorrect. Response B is used to configure IP addressing information but doesn't contain routing information. Response C is used to configure the system's hostname. Response D is used to configure your name server IP address.

The existence of which file prevents everyone except for root from logging in? A. /etc/nologin B. /etc/pam.d/login C. /lib/security/pam_nologin.so D. /usr/bin/rlogin Hint: The contents of this file are displayed when users try to log in

A is correct. As long as the /etc/nologin file exists, no one but root is allowed to log in. Any text you enter in the file will be displayed if a user does try to log in. B, C, and D are incorrect. Responses B and C are part of the nologin process. They are used to configure PAM on your Linux system to check for the existence of /etc/nologin and deny logins if it is there. D is used to establish remote login sessions.

In your user's home directory, there are four hidden bash shell configuration files: ~/.bash_profile, ~/.bash_login, ~/.bashrc, and ~/.profile. Which file will be used by default for bash login shells? A. ~/.bash_profile B. ~/.bash_login C. ~/.profile D. ~/.bashrc Hint: Remember which configuration files are used for login shells and which are used for non-login shells

A is correct. By default, when a login shell session is started, bash will search for the ~/.bash_profile, ~/.bash_login, or ~/.profile file in this order. It uses the first file it finds and ignores all of the rest. B, C, and D are incorrect. By default, when a login shell session is started, bash will search for the ~/.bash_profile, ~/.bash_login, or ~/.profile file in this order. It uses the first file it finds and ignores all of the rest. The ~/.bashrc file is only used for non-login shells.

Which locale environment variable has the highest degree of precedence on a Linux system? A. LC_ALL B. LC_MEASUREMENT C. LANG D. LANGUAGE Hint: Recall the order of precedence of locale variables

A is correct. If the LC_ALL variable is defined, its value is used and the values assigned to all other LC variables are not checked. B, C, and D are incorrect. If the LC_ALL variable is defined, its value is used and the values assigned to all other LC variables are not checked. If LC_ALL is undefined, then the specific LC variable in question is checked. If the specific LC variable has a value, it is used. If the LC variable in question has a null value, then the LANG environment variable is used. The LANGUAGE local variable only overrides the LC_MESSAGES variable.

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've used fdisk to create a new partition on the first SATA hard drive in your Linux system. You want to create an ext4 file system on the new partition. Which partition type do you need to set it to? A. 83 B. 82 C. 64 D. b Hint: Most Linux file systems (ext2, ext3, ext4, reiser, etc.) use the same type of Linux partition

A is correct. Partition type 83 specifies a standard Linux partition. B, C, and D are incorrect. Partition type 82 is used for Linux swap partitions. Partition type 64 creates a NetWare partition. Partition type b creates a FAT 32 partition.

Consider the following IP address: 172.17.8.10/22. Which subnet mask is assigned to this address? A. 255.255.252.0 B. 255.255.0.0 C. 255.255.255.0 D. 255.255.255.252 Hint: Remember how many bits are represented by the decimal number 255

A is correct. The /22 prefix length indicates the first two octets of the subnet mask (16 bits) are populated plus 6 additional bits in the third octet. B, C, and D are incorrect. The prefix length for response B would be /16. The prefix length for response C would be /24. The prefix length for response D would be /30.

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.

Where is the UID number range that can be assigned to new user accounts defined? A. /etc/login.defs B. /etc/default/useradd C. /etc/skel D. /etc/passwd Hint: Remember which configuration files contain default parameters for new user accounts

A is correct. The /etc/login.defs file contains values that can be used for the GID and UID parameters when creating an account with useradd. It also contains defaults for creating passwords in /etc/shadow. B, C, and D are incorrect. The /etc/default/useradd file contains defaults used by the useradd utility. The /etc/skel directory contains default directories and files that are automatically copied to the home directory of newly created users. The /etc/passwd file contains user account records.

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

To harden the sshd daemon running on your Linux system, you decide to configure it to listen for SSH requests on a port other than the default of 22. Which directive in your etc/ssh/sshd_config file can you use to do this? A. Port B. BindAddress C. Protocol D. Tunnel Hint: Moving to a port other than the default will require client systems to explicitly specify the SSH port to be used

A is correct. The Port directive specifies the port on which the sshd daemon will listen for SSH requests.B, C, and D are incorrect. The BindAddress directive is used to specify the address on the local machine to be used as the source address of the connection. The Protocol directive specifies the protocol versions SSH should support. The Tunnel directive is used to set up forwarding between the SSH client and the SSH server.

Which environment variable specifies a Linux system's time zone? A. TZ B. TIME C. TIME_ZONE D. CLOCK Hint: Recall the list of default environment variables used on a Linux system and their function

A is correct. The TZ environment variable sets the system's time zone. You can change time zones from the shell prompt by setting the value of the TZ variable and then exporting it. B, C, and D are incorrect. These variables don't exist by default on a Linux system and are distracters.

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 are logged in to your Linux system as the tuxuser and need to set up a cron job. Which command can be used to edit tux's crontab file? A. crontab -e B. crontab -l C. crontab -r D. crontab -i E. vi /var/spool/cron/tabs/tux Hint: Recall the utility you should use to create and edit crontab files

A is correct. The crontab -e command will create a new crontab for the user in /var/spool/cron/tabs and open it in the vi text editor. B, C, D, and E are incorrect. The crontab -l command lists the contents of your user's crontab file. The crontab -r and crontab -i commands delete your user's crontab file. Response E opens your user's crontab file directly in the vi text editor, which shouldn't be done.

You need to assign a numeric value to a variable named NUM1 in a script so that you can perform mathematical operations on it. Which line can you add to your script to do this? A. declare -i NUM1 B. type NUM1 integer C. declare -r NUM1 D. declare -f NUM1 Hint: Recall the script syntax for typing a variable

A is correct. The declare -i NUM1 statement specifies that the NUM1 variable contains integers. B, C, and D are incorrect. While declaring a variable is sometimes called "typing" a variable, type is not a valid shell command. The declare -r statement creates a read- only variable that can't be changed (essentially, it becomes a constant). The declare - f statement is used to define a function.

Where is the GID number range that can be assigned to new groups defined? A. /etc/login.defs B. /etc/default/useradd C. /etc/skel D. /etc/default/groupadd Hint: Remember which configuration file contains default parameters for new group accounts

A is correct. The default parameters for new group accounts, including the GID number, are contained in the /etc/login.defs file. B, C, and D are incorrect. The /etc/default/useradd file contains defaults used by the useradd utility. The /etc/skel directory contains default directories and files that are automatically copied to the home directory of newly created users. The /etc/default/groupadd file isn't used and is a distracter.

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

You're writing a script that will require the end user to enter the name of his or her supervisor. Which of the following lines will input the user's response into a variable named SUP? A. read SUP B. input SUP C. prompt SUP D. query SUP Hint: Remember the script element that accepts user input and assigns it to a variable

A is correct. The read command is used to pause the script and prompt the user to provide some type of input, which is assigned to the specified variable. B, C, and D are incorrect. The input, prompt, and query commands can't be used to read user input.

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.

You need to create a backup of your home directory to a removable hard disk drive mounted at /media/USB. Which tar command will do this? A. tar -cfv /media/USB/backup.tar ~ B. tar -xfv /media/USB/backup.tar ~ C. tar -xzf /media/USB/backup.tar ~ D. tar -cfv ~ /media/USB/backup.tar Hint: Recall the tar option used to create a tar archive

A is correct. The tar -cfv /media/USB/backup.tar ~ will create a backup of your home directory to a removable hard disk drive mounted at /media/USB. B, C, and D are incorrect. Responses B and C use the extract (-x) option with tar instead of create (-c). Response D reverses the order of the directory to be backed up and the archive file to be created.

You need to create a new user account for a user named George Sanders on your Linux system. You want to specify a user name of gsanders, a full name of George Sanders, a default shell of /bin/bash, and that a home directory be created. Which command will do this? A. useradd -c "George Sanders" -m -s "/bin/bash" gsanders B. useradd -c "George Sanders" -m -s "/bin/bash" -u gsanders C. usermod -c "George Sanders" -m -s "/bin/bash" gsanders D. useradd -c "George Sanders" -s "/bin/bash" gsanders Hint: Recall which command is used to create new user accounts

A is correct. The useradd -c "George Sanders" -m -s "/bin/bash" gsanders command creates a new user account for a user named George Sanders with a user name of gsanders, a full name of George Sanders, a default shell of /bin/bash, and a home directory. B, C, and D are incorrect. Response B uses incorrect syntax for the useradd command. Response C uses an incorrect command (usermod). Response D omits the -m option, which is required to create a home directory.

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.

You've just added a new e-mail alias to the /etc/aliases file for use with the postfix MTA on your Linux system. Which command do you now need to run to apply the change to the file? A. newaliases B. postfix --reload C. postfix --newaliases D. postfix -D E. updatealiases Hint: Recall what needs to happen for the MTA to recognize newly added aliases

A is correct. When done configuring aliases, you must run the newaliases command at the shell prompt as root to enable them. B, C, and D are incorrect. Responses B and D use invalid commands. Response C is used to start Postfix in debug mode.

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.

Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt? A. file /tmp/myfile.txt B. echo "Hello" >/tmp/myfile.txt C. sed -ie "s/1/2/" /tmp/myfile.txt D. echo -n "Hello" >>/tmp/myfile.txt E. touch /tmp/myfile.txt

Answer A

Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.) A. esc ZZ B. ctrl :w! C. esc zz D. esc :wq! E. ctrl XX

Answer A,D

What is the effect of the egrep command when the -v option is used? A. It enables color to highlight matching parts. B. It only outputs non-matching lines. C. It shows the command's version information. D. It changes the output order showing the last matching line first.

Answer B

Which of the following is the device file name for the second partition on the only SCSI drive? A. /dev/hda1 B. /dev/sda2 C. /dev/sd0a2 D. /dev/sd1p2

Answer B

Which of the following statements is correct regarding the command foo 1> bar? A. The stdout from the command foo is appended to the file bar. B. The stdout from the command foo overwrites the file bar. C. The command foo receives its stdin from the file bar. D. The command foo receives its stdin from the stdout of the command bar. E. The stderr from the command foo is saved to the file bar.

Answer B

When running the command sed -e "s/a/b/" /tmp/file >/tmp/file While/tmp/file contains data, why is /tmp/file empty afterwards? A. The file order is incorrect. The destination file must be mentioned before the command to ensure redirection. B. The command sed did not match anything in that file therefore the output is empty. C. When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading. D. Redirection for shell commands do not work using the > character. It only works using the | character instead.

Answer C.When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading.

How many fields are in a syntactically correct line of /etc/fstab? A. 3 B. 4 C. 5 D. 6 E. 7

Answer D

Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting? A. kill -PIPE 123 B. kill -KILL 123 C. kill -STOP 123 D. kill -TERM 123

Answer D

Which of the following settings for umask ensures that new files have the default permissions -rw-r----- ? A. 0017 B. 0640 C. 0038 D. 0027

Answer D

What is the purpose of the Bash built-in export command? A. It allows disks to be mounted remotely. B. It runs a command as a process in a subshell. C. It makes the command history available to subshells. D. It sets up environment variables for applications. E. It shares NFS partitions for use by other systems on the network.

Answer: D. It sets up environment variables for applications.

In which directory must definition files be placed to add additional repositories to yum?

Answer: /etc/yum.repos.d, /etc/yum.repos.d/, yum.repos.d, yum.repos.d/

Which world-writable directory should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem? (Specify the full path to the directory.)

Answer: /tmp, tmp, /var/tmp, /tmp/, /var/tmp/

Which umask value will result in the default access permissions of 600 (rw-------) for files and 700 (rwx------) for directories? (Specify only the numerical umask value.)

Answer: 0077, 077

During a system boot cycle, what program is executed after the BIOS completes its tasks? A. The bootloader B. The inetd program C. The init program D. The kernel

Answer: A

In compliance with the FHS, in which of the directories are man pages found? A. /usr/share/man B. /opt/man C. /usr/doc/ D. /var/pkg/man E. /var/man

Answer: A

Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate line and without any trailing spaces, is reached? A. << B. <| C. !< D. &<

Answer: A

Which of the following commands is used to update the list of available packages when using dpkg based package management? A. apt-get update B. apt-get upgrade C. apt-cache update D. apt-get refresh E. apt-cache upgrade

Answer: A

Which of the following commands will change the quota for a specific user? A. edquota B. repquota C. quota -e D. quota

Answer: A

Which of the following files, located in the user home directory, is used to store the Bash history? A. .bash_history B. .bash_histfile C. .history D. .bashrc_history E. .history_bash

Answer: A

Which of the following is correct when talking about mount points? A. Every existing directory can be used as a mount point. B. Only empty directories can be used as a mount point. C. Directories need to have the SetUID flag set to be used as a mount point. D. Files within a directory are deleted when the directory is used as a mount point.

Answer: A

Which type of filesystem is created by mkfs when it is executed with the block device name only and without any additional parameters? A. ext2 B. ext3 C. ext4 D. XFS E. VFAT

Answer: A

From a Bash shell, which of the following commands directly executes the instruction from the file /usr/local/bin/runme.sh without starting a subshell? (Please select TWO answers.) A. source /usr/local/bin/runme.sh B. . /usr/local/bin/runme.sh C. /bin/bash /usr/local/bin/runme.sh D. /usr/local/bin/runme.sh E. run /usr/local/bin/runme.sh

Answer: A,B

Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.) A. /sbin/mke2fs -j /dev/sdb1 B. /sbin/mkfs -t ext3 /dev/sdb1 C. /sbin/mkfs -c ext3 /dev/sdb1 D. /sbin/mke3fs -j /dev/sdb1

Answer: A,B

Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.) A. < B. <<< C. > D. >>> E. %>

Answer: A,B,C

What information can the lspci command display about the system hardware? (Choose THREE correct answers.) A. Device IRQ settings B. PCI bus speed C. System battery type D. Device vendor identification E. Ethernet MAC address

Answer: A,B,D

When using rpm --verify to check files created during the installation of RPM packages, which of the following information is taken into consideration? (Choose THREE correct answers.) A. Timestamps B. MD5 checksums C. Inodes D. File sizes E. GnuPG signatures

Answer: A,B,D

Which of the following commands can be used to determine how long the system has been running? (Choose TWO correct answers.) A. uptime B. up C. top D. uname -u E. time-up

Answer: A,C

Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.) A. shutdown -r now B. shutdown -r "rebooting" C. telinit 6 D. telinit 0 E. shutdown -k now "rebooting"

Answer: A,C

In order to display all currently mounted filesystems, which of the following commands could be used? (Choose TWO correct answers.) A. cat /proc/self/mounts B. free C. mount D. lsmounts E. cat /proc/filesystems

Answer: A,C cat /proc/self/mounts , Mount

Which of the following information is stored within the BIOS? (Choose TWO correct answers.) A. Boot device order B. Linux kernel version C. Timezone D. Hardware configuration E. The system's hostname

Answer: A,D

Which run levels should never be declared as the default run level when using SysV init? (Choose TWO correct answers.) A. 0 B. 1 C. 3 D. 5 E. 6

Answer: A,E

A. It will break the file into new files of 1,024 byte pieces each. B. It will break the file into new files of 1,000 line pieces each. C. It will break the file into new files of 1,024 kilobyte pieces each. D. It will break the file into new files that are no more than 5% of the size of the original file.

Answer: B

After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the filesystem. Which of the following describes the resulting situation? A. foo and bar would both be removed. B. foo would be removed while bar would remain accessible. C. foo would be removed. bar would still exist but would be unusable. D. Both foo and bar would remain accessible. E. The user is prompted whether bar should be removed, too.

Answer: B

In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories? A. -dirmax B. -maxdepth C. -maxlevels D. -n E. -s

Answer: B

In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows? A. By using the command :repeat followed by the number and the command. B. By specifying the number right in front of a command such as 4l or 2yj. C. By selecting all affected lines using the shift and cursor keys before applying the command. D. By issuing a command such as :set repetition=4 which repeats every subsequent command 4 times.

Answer: B

Regarding the command: nice -5 /usr/bin/prog Whichof the following statements is correct? A. /usr/bin/prog is executed with a nice level of -5. B. /usr/bin/prog is executed with a nice level of 5. C. /usr/bin/prog is executed with a priority of -5. D. /usr/bin/prog is executed with a priority of 5.

Answer: B

What is the difference between the i and a commands of the vi editor? A. i (interactive) requires the user to explicitly switch between vi modes whereas a (automatic) switches modes automatically. B. i (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor. C. i (independent rows) starts every new line at the first character whereas a (aligned rows) keeps the indentation of the previous line. D. i (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates editing.

Answer: B

What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init? A. /lib/init.so B. /sbin/init C. /etc/rc.d/rcinit D. /proc/sys/kernel/init E. /boot/init

Answer: B

What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process? A. 9 B. 19 C. 49 D. 99

Answer: B

When given the following command line. echo "foo bar" | tee bar | cat Which of the following output is created? A. cat B. foo bar C. tee bar D. bar E. foo

Answer: B

Which RPM command will output the name of the package which supplied the file /etc/exports? A. rpm -F /etc/exports B. rpm -qf /etc/exports C. rpm -Kl /etc/exports D. rpm -qp /etc/exports E. rpm -qi /etc/exports

Answer: B

Which of the following commands can be used to create a USB storage media from a disk image? A. gdisk B. dd C. cc D. fdisk E. mount

Answer: B

Which of the following commands can be used to display the inode number of a given file? A. inode B. ls C. ln D. cp

Answer: B

Which of the following commands can be used to download the RPM package kernel without installing it? A. yum download --no-install kernel B. yumdownloader kernel C. rpm --download --package kernel D. rpmdownload kernel

Answer: B

Which of the following commands displays the contents of a gzip compressed tar archive? A. gzip archive.tgz | tar xvf - B. tar ztf archive.tgz C. gzip -d archive.tgz | tar tvf - D. tar cf archive.tgz

Answer: B

Which of the following commands is used to change options and positional parameters for a running Bash? A. history B. set C. bashconf D. setsh E. envsetup

Answer: B

Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard? A. SIGTERM B. SIGINT C. SIGSTOP D. SIGKILL

Answer: B

Which of the following statements is correct regarding the command foo 1> bar? A. The stdout from the command foo is appended to the file bar. B. The stdout from the command foo overwrites the file bar. C. The command foo receives its stdin from the file bar. D. The command foo receives its stdin from the stdout of the command bar. E. The stderr from the command foo is saved to the file bar.

Answer: B

Which shell command is used to continue background execution of a suspended command? A. & B. bg C. cont D. exec E. :&

Answer: B

After running the command umount /mnt, the following error message is displayed: umount: /mnt: device is busy. What is a common reason for this message? A. The kernel has not finished flushing disk writes to the mounted device. B. A user has a file open in the /mnt directory. C. Another file system still contains a symlink to a file inside /mnt. D. The files in /mnt have been scanned and added to the locate database. E. The kernel thinks that a process is about to open a file in /mnt for reading.

Answer: B A user has a file open in the /mnt directory.

Which of the following commands changes the ownership of file.txt to the user dan and the group staff? A. chown dan/staff file.txt B. chown dan:staff file.txt C. chown -u dan -g staff file.txt D. chown dan -g staff file.txt

Answer: B chown dan:staff file.txt

Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct answers.) A. chmod +s /tmp B. chmod +t /tmp C. chmod 1775 /tmp D. chmod 4775 /tmp E. chmod 2775 /tmp

Answer: B,C

Which of the following are init systems used within Linux systems? (Choose THREE correct answers.) A. startd B. systemd C. Upstart D. SysInit E. SysV init

Answer: B,C,E

What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.) A. Entries for all possible devices get created on boot even if those devices are not connected. B. Additional rules for udev can be created by adding them to /etc/udev/rules.d/. C. When using udev, it is not possible to create block or character devices in /dev/ using mknod. D. The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup. E. The content of /dev/ is stored in /etc/udev/dev and is restored during system startup.

Answer: B,D

What can the Logical Volume Manager (LVM) be used for? (Choose THREE correct answers.) A. To create RAID 9 arrays. B. To dynamically change the size of logical volumes. C. To encrypt logical volumes. D. To create snapshots. E. To dynamically create or delete logical volumes.

Answer: B,D,E

Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line? A. i (lowercase) B. P (uppercase) C. p (lowercase) D. U (uppercase) E. u (lowercase)

Answer: C

In Bash, inserting 1>&2 after a command redirects A. standard error to standard input. B. standard input to standard error. C. standard output to standard error. D. standard error to standard output. E. standard output to standard input.

Answer: C

What is the output of the following command? echo "Hello World" | tr -d aieou A. Hello World B. eoo C. Hll Wrld D. eoo Hll Wrld

Answer: C

When removing a package, which of the following dpkg options will completely remove the files including configuration files? A. --clean B. --delete C. --purge D. -remove

Answer: C

When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process? A. -10 B. 0 C. 10 D.20

Answer: C

Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination? A. /etc/keys B. /proc/keys C. /etc/inittab D. /proc/inittab E. /etc/reboot

Answer: C

Which character, added to the end of a command, runs that command in the background as a child process of the current shell? A. ! B. + C. & D. % E. #

Answer: C

Which of the following commands can be used to search for the executable file foo when it has been placed in a directory not included in $PATH? A. apropos B. which C. find D. query E. whereis

Answer: C

Which of the following commands changes the number of days before the ext3 filesystem on /dev/sda1 has to run through a full filesystem check while booting? A. tune2fs -d 200 /dev/sda1 B. tune2fs -c 200 /dev/sda1 C. tune2fs -i 200 /dev/sda1 D. tune2fs -n 200 /dev/sda1 E. tune2fs --days 200 /dev/sda1

Answer: C

Which of the following commands lists all currently installed packages when using RPM package management? A. yum --query --all B. yum --list --installed C. rpm --query --all D. rpm --list-installed

Answer: C

Which of the following commands lists the dependencies of a given dpkg package? A. apt-cache depends-on package B. apt-cache dependencies package C. apt-cache depends package D. apt-cache requires package

Answer: C

Which of the following commands overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it? A. dd if=/dev/zero of=/dev/sda bs=512 B. dd if=/dev/zero of=/dev/sda bs=512 count=1 C. dd if=/dev/zero of=/dev/sda bs=440 count=1 D. dd if=/dev/zero of=/dev/sda bs=440

Answer: C

Which of the following environment variables overrides or extends the list of directories holding shared libraries? A. LD_LOAD_PATH B. LD_LIB_PATH C. LD_LIBRARY_PATH D. LD_SHARE_PATH E. LD_RUN_PATH

Answer: C

Which of the following file permissions belong to a symbolic link? A. -rwxrwxrwx B. +rwxrwxrwx C. lrwxrwxrwx D. srwxrwxrwx

Answer: C

Which of the following options is used in a GRUB Legacy configuration file to define the amount of time that the GRUB menu will be shown to the user? A. hidemenu B. splash C. timeout D. showmenu

Answer: C

Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created? A. File size B. Modify timestamp C. Link count D. Inode number E. Permissions

Answer: C

Which of the following statements is correct when talking about /proc/? A. All changes to files in /proc/ are stored in /etc/proc.d/ and restored on reboot. B. All files within /proc/ are read-only and their contents cannot be changed. C. All changes to files in /proc/ are immediately recognized by the kernel. D. All files within /proc/ are only readable by the root user.

Answer: C

Which variable defines the directories in which a Bash shell searches for executable commands? A. BASHEXEC B. BASHRC C. PATH D. EXECPATH E. PATHRC

Answer: C

Which of the following commands brings a system running SysV init into a state in which it is safe to perform maintenance tasks? (Choose TWO correct answers.) A. shutdown -R 1 now B. shutdown -single now C. init 1 D. telinit 1 E. runlevel 1

Answer: C,D

Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root? (Choose TWO correct answers.) A. find /tmp -uid root -print B. find -path /tmp -uid root C. find /tmp -user root -print D. find /tmp -user root E. find -path /tmp -user root-print

Answer: C,D

After moving data to a new filesystem, how can the former path of the data be kept intact in order to avoid reconfiguration of existing applications? (Choose TWO correct answers.) A. By creating an ACL redirection from the old to the new path of the data. B. By creating a hard link from the old to the new path of the data. C. By creating a symbolic link from the old to the new path of the data. D. By running the command touch on the old path. E. By mounting the new filesystem on the original path of the data.

Answer: C,E

Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition? (Choose TWO correct answers.) A. FIND B. ID C. LABEL D. NAME E. UUID

Answer: C,E

Which of the following commands determines the type of a file by using a definition database file which contains information about all common file types? A. magic B. type C. file D. pmagic E. hash

Answer: C.file

After modifying GNU GRUB's configuration file, which command must be run for the changes to take effect? A. kill -HUP $(pidof grub) B. grub-install C. grub D. No action is required

Answer: D

In the vi editor, which of the following commands will copy the current line into the vi buffer? A. c B. cc C. 1c D. yy E. 1y

Answer: D

What command will generate a list of user names from /etc/passwd along with their login shell? A. column -s : 1,7 /etc/passwd B. chop -c 1,7 /etc/passwd C. colrm 1,7 /etc/passwd D. cut -d: -f1,7 /etc/passwd

Answer: D

What does the command mount -a do? A. It ensures that all file systems listed with the option noauto in /etc/fstab are mounted. B. It shows all mounted file systems that have been automatically mounted. C. It opens an editor with root privileges and loads /etc/fstab for editing. D. It ensures that all file systems listed with the option auto in /etc/fstab are mounted. E. It ensures that all file systems listed in /etc/fstab are mounted regardless of their options.

Answer: D

What does the command mount -a do? A. It mounts all available filesystems onto the current directory. B. It shows all mounted filesystems. C. It mounts all user mountable filesystems for the current user. D. It mounts all filesystems listed in /etc/fstab which have the option auto set. E. It mounts all filesystems listed in /etc/fstab which have the option noauto set.

Answer: D

What happens after issuing the command vi without any additional parameters? A. vi starts and loads the last file used and moves the cursor to the position where vi was when it last exited. B. vi starts and requires the user to explicitly either create a new or load an existing file. C. vi exits with an error message as it cannot be invoked without a file name to operate on. D. vi starts in command mode and opens a new empty file. E. vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.

Answer: D

Which file should be edited to select the network locations from which Debian installation package files are loaded? A. /etc/dpkg/dpkg.cfg B. /etc/apt/apt.conf C. /etc/apt/apt.conf.d D. /etc/apt/sources.list E. /etc/dpkg/dselect.cfg

Answer: D

Which function key is used to start Safe Mode in Windows NT? A. F10 B. F8 C. F6 D. Windows NT does not support Safe Mode

Answer: D

Which of the following command sets the Bash variable named TEST with the content FOO? A. set TEST="FOO" B. TEST = "FOO" C. var TEST="FOO" D. TEST="FOO"

Answer: D

Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter? A. sed '/bob/Bob' letter > newletter B. sed s/bob/Bob/ letter < newletter C. sed 's/bob/Bob' letter > newletter D. sed 's/bob/Bob/g' letter > newletter E. sed 's/bob, Bob/' letter > newletter

Answer: D

Which of the following commands will print the last 10 lines of a text file to the standard output? A. cat -n 10 filename B. dump -n 10 filename C. head -n 10 filename D. tail -n 10 filename

Answer: D

Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log? A. cat < myapp | cat > file1.log B. myapp 0>&1 | cat > file1.log C. myapp | cat > file1.log D. myapp | tee file1.log E. tee myapp file1.log

Answer: D

Which of the following kernel parameters instructs the kernel to suppress most boot messages? A. silent B. verbose=0 C. nomesg D. quiet

Answer: D

Which of the following commands will write a message to the terminals of all logged in users? A. bcast B. mesg C. print D. wall E. yell

Answer: D. Wall

Creating a hard link to an ordinary file returns an error. What could be the reason for this? A. The source file is hidden. B. The source file is read-only. C. The source file is a shell script. D. The source file is already a hard link. E. The source and the target are on different filesystems.

Answer: E

Which of the following commands updates the linker cache of shared libraries? A. mkcache B. soconfig C. mkldconfig D. lddconfig E. ldconfig

Answer: E

Which of the following commands will reduce all consecutive spaces down to a single space? A. tr '\s' ' ' < a.txt > b.txt B. tr -c ' ' < a.txt > b.txt C. tr -d ' ' < a.txt > b.txt D. tr -r ' ' '\n' < a.txt > b.txt E. tr -s ' ' < a.txt > b.txt

Answer: E

Which of the following options for the kernel's command line changes the systemd boot target to rescue.target instead of the default target? A. systemd.target=rescue.target B. systemd.runlevel=rescue.target C. systemd.service=rescue.target D. systemd.default=rescue.target E. systemd.unit=rescue.target

Answer: E

Which of the following commands can be used to locate programs and their corresponding man pages and configuration files? A. dirname B. which C. basename D. query E. whereis

Answer: E whereis

Which Bash environment variable defines in which file the user history is stored when exiting a Bash process? (Specify ONLY the variable name.)

Answer: HISTFILE

Which signal is missing from the following command that is commonly used to instruct a daemon to reinitialize itself, including reading configuration files? killall -s _______ daemon

Answer: HUP, SIGHUP, 1

Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)

Answer: cmdline, /proc/cmdline

Which command will display messages from the kernel that were output during the normal boot sequence?

Answer: dmesg, /bin/dmesg

Which Debian package management tool asks the configuration questions for a specific already installed package just as if the package were being installed for the first time? (Specify ONLY the command without any path or parameters.)

Answer: dpkg-reconfigure

Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.)

Answer: jobs

What is the name of the main configuration file for GNU GRUB? (Specify the file name only without any path.)

Answer: menu.lst, grub.conf, grub.cfg

Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.)

Answer: mkdir, /usr/bin/mkdir

Which command is used to create and initialize the files used to store quota information? (Specify ONLY the command without any path or parameters.)

Answer: quotacheck

Which command will disable swapping on a device? (Specify ONLY the command without any path or parameters.)

Answer: swapoff, /sbin/swapoff

Which option to the yum command will update the entire system? (Specify ONLY the option name without any additional parameters.)

Answer: update, upgrade

Which of the following commands makes /bin/foo executable by everyone but writable only by its owner? A. chmod u=rwx,go=rx /bin/foo B. chmod o+rwx,a+rx /bin/foo C. chmod 577 /bin/foo D. chmod 775 /bin/foo

Answer:A

Which of the following Linux filesystems preallocates a fixed number of inodes at the filesystem's make/creation time and does NOT generate them as needed? (Choose TWO correct answers.) A. ext3 B. JFS C. ext2 D. XFS E. procfs

Answer:A,C

What is the default nice level when a process is started using the nice command? A. -10 B. 10 C. 20 D. 0

Answer:B

Which of the following commands moves and resumes in the background the last stopped shell job? A. run B. bg C. fg D. back

Answer:B

Which of the following shell redirections will write standard output and standard error output to a file named filename? A. 2>&1 >filename B. >filename 2>&1 C. 1>&2>filename D. >>filename E. 1&2>filename

Answer:B

Which grep command will print only the lines that do not end with a / in the file foo? A. grep '/$' foo B. grep '/#' foo C. grep -v '/$' foo D. grep -v '/#' foo

Answer:C

Which of the following commands prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file? A. fmt -f 1,4 /etc/passwd B. split -c 1,4 /etc/passwd C. cut -d : -f 1,4 /etc/passwd D. paste -f 1,4 /etc/passwd

Answer:C

Which of the following commands shows the definition of a given shell command? A. where B. stat C. type D. case

Answer:C

Which utility would be used to change how often a filesystem check is performed on an ext2 filesystem without losing any data stored on that filesystem? A. mod2fs B. fsck C. tune2fs D. mke2fs E. fixe2fs

Answer:C

A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory? A. rmdir '~/\dir' B. rmdir "~/\dir" C. rmdir ~/'dir' D. rmdir ~/\dir E. rmdir ~/\\dir

Answer:E

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.

You need to implement a for loop in a script. You want to use the seq command to generate a sequence of numbers that starts at 1, increments by 1, and stops at 100. Which statements will do this? (Choose two.) A. for i in 'seq 1 5 100` B. for i in 'seq 100` C. for i in 'seq 1 1 100` D. for i in 'seq 1-100` E. for i in 'seq 1..100` Hint: Recall the syntax for using the seq command to generate a sequence of numbers

B and C are correct. If you specify a single value with seq, the sequence starts at one, increments by one, and ends at the specified value. If you specify three values, the sequence starts at the first value, increments by the second value, and ends at the third value. A, D, and E are incorrect. Response A increments by 5 instead of 1. Responses D and E use incorrect syntax for the seq command.

Where are time zone settings stored? (Choose two.) A. /etc/sysconfig/services B. /etc/timezone C. /etc/sysconfig/clock D. /etc/systemclock E. /etc/environment Hint: The file used to set the time zone varies between distributions

B and C are correct. Some distributions (such as Ubuntu) use the /etc/timezone file to set the time zone, while others (such as openSUSE) use the /etc/sysconfig/clock file. A, D, and E are incorrect. The /etc/sysconfig/services file is used to determine how services are restarted after an update. The file in response D doesn't exist and is a distracter. The /etc/environment file is used by the pam_env module.

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.

Which IP addresses are private (sometimes called reserved) addresses? (Choose two.) A. 11.23.5.254 B. 172.17.8.1 C. 10.254.254.1 D. 192.169.1.10 E. 137.65.5.5 Hint: Recall the range of private IP addresses assigned to each IP address class

B and C are correct. The reserved class B range of IP addresses is 172.16.0.0 - 172.31.255.255, while the reserved class A range is 10.0.0.0 - 10.255.255.255. A, D, and E are incorrect. Each of these responses contains a public IP address that must be registered if the associated host is connected to a public network.

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 directives in the /etc/cups/cupsd.conf file must be enabled to share your local printers with other CUPS-compatible systems on the network? (Choose two.) A. DefaultPolicy B. BrowseAddress C. Listen D. Policy E. Browsing Hint: These directives are not enabled by default on many Linux distributions

B and E are correct. The Browsing directive specifies whether or not cupsd will announce its printers using broadcasts on the network. The BrowseAddress directive specifies the broadcast address cupsd should use to announce its printers. You should set this directive to the broadcast address of your network segment.A, C, and D are incorrect. The DefaultPolicy directive specifies the default policy to use for IPP operation. The Listen directive specifies a network address and port to listen for connections. The Policy directive specifies IPP operation access control limits.

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 option, when added to the :0 line of the /etc/xdm/Xservers file, will configure the display manager to use 24-bit color? A. -color 24 B. -bpp 24 C. -24 D. -color_depth=24 Hint: Recall the syntax for the Xservers file

B is correct. Adding the -bpp 24 option to the :0 configuration line will configure the default display to use 24-bit color. A, C, D are incorrect. Each of these responses uses incorrect syntax for the Xservers file.

Which term refers to gradual time adjustments made by the NTP daemon to your system clock when the time difference between your local system and the NTP time provider is less than 128 milliseconds? A. Stepping B. Slewing C. Drift D. Jitter Hint: The NTP protocol initially syncs time between the time consumer and the time provider about once per minute. However, the interval increases gradually to once every 17 minutes once time is closely synced between the provider and consumer

B is correct. If the time difference between the provider and the consumer is small (less than 128 milliseconds), then NTP adjusts the time on the consumer gradually. This is called slewing. A, C, and D are incorrect. If the time difference between provider and consumer is relatively large, then time adjustments are made quickly on the consumer (stepping). NTP measures and corrects for incidental clock frequency errors (called drift). Jitter is the estimated time difference between the consumer and the provider since the last time poll.

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.

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.

The /etc/xdm/Xservers file on your Linux system contains the following entry: :0 local /usr/X11R6/bin/X -nolisten tcp -br vt7. Which parameter must be removed in order to enable remote access to the display manager on this host? A. local B. -nolisten tcp C. /usr/X11R6/bin/X D. -br vt7 Hint: Recall the syntax for the Xservers file

B is correct. The -nolisten tcp parameter must be removed in order to enable remote access to the display manager on this host. A, C, and D are incorrect. The local parameter determines whether or not the Xserver is running locally or remotely on a different system. In this case, it's running locally. The /usr/X11R6/bin/X parameter specifies the startup command for the X server. The -br vt7 parameter specifies the console where the display should be sent.

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.

Which directive in the /etc/sysconfig/network/ifcfg-eth0 is used to specify whether the interface is configured with static IP address information or with dynamic IP address information from a DHCP server? A. STARTMODE B. BOOTPROTOC. IPADDR D. USERCONTROL Hint: The configuration specified is applied when the interface is initialized

B is correct. The BOOTPROTO parameter can be set to a value of STATIC to use static IP address assignments or to DHCP to configure dynamic IP addressing. A, C, and D are incorrect. STARTMODE determines whether the interface is started automatically or manually. IPADDR assigns an IP address to the interface but only works if BOOTPROTO is set to STATIC. USERCONTROL determines whether standard user accounts are allowed to manage the interface.

Which port is used by the FTP protocol for its control connection? A. 20 B. 21 C. 25 D. 110 E. 137 Hint: Remember FTP uses two ports; one for a control connection and one for data

B is correct. The FTP protocol uses two ports; one for a control connection (21) and one for data (20). A, C, D, and E are incorrect. Port 20 is used by the FTP protocol for its data connection. Port 25 is used by the SMTP protocol for transferring mail messages. Port 110 is used by the POP3 protocol to transfer e-mail messages from an MTA to an MUA. Port 137 is used by the SMB protocol via NetBIOS to share files and printers.

Which locale variable is used to define the currency format used in your location? A. LC_MESSAGES B. LC_MONETARY C. LC_CURRENCY D. LC_MEASUREMENT Hint: Recall what each local environment variable is used for

B is correct. The LC_MONETARY environment variable defines the currency format used in your location. A, C, and D are incorrect. The LC_MESSAGES locale variable configures natural language messages. The LC_MEASUREMENT locale variable configures the default measurement unit. There is no local environment variable named LC_CURRENCY defined by default on Linux.

Which at command can be used to view a listing of pending at jobs? A. at -l B. atq C. atrm D. at -listjobs Hint: Recall which at utility displays a list of at jobs

B is correct. The atq command can be used to view a listing of pending at jobs. A, C, and D are incorrect. The at command can't be used to display pending jobs. The atrm command is used to remove pending jobs.

Which mouse accessibility setting allows you to send a mouse click whenever the mouse pointer stops moving for a specified amount of time? A. Simulated secondary click B. Dwell click C. Mouse gestures D. Delay keys Hint: This setting assists physically impaired users

B is correct. The dwell click option sends a mouse click whenever the mouse pointer stops moving for a specified amount of time. A, C, and D are incorrect. The simulated secondary click option allows you to send a double-click by holding down the primary mouse button for a specified amount of time. Mouse gestures allow you to complete a certain task when you move the mouse in a specific way. Delay keys insert a slight delay between keystrokes to prevent the keyboard from sending unintentional keystrokes.

You need use fdisk to create a partition the second SCSI hard drive in your system. Which is the correct command to do this? A. fdisk /dev/hdb B. fdisk /dev/sdb C. fdisk /dev/sda2 D. fdisk /dev/hdb2 Hint: SCSI and SATA drives are referenced using the same /dev file naming syntax

B is correct. The fdisk /dev/sdb command can be used to manage partitions on the second SCSI hard drive in your system. A, C, and D are incorrect. Response A addresses the second PATA (IDE) hard drive in older versions of the Linux kernel. Responses C and D reference specific partitions on a device instead of the hard disk itself.

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.

Which command will search for files on your Linux system that have SUID permissions set? A. find / -type f -perm -g=s -ls B. find / -type f -perm -u=s -ls C. find / -type f -perm -u=rwx -ls D. find / -type f -perm -g=rwx -ls E. find / -type f -perm -o=rwx -ls Hint: Remember the syntax for identifying the SUID permission in a file's mode

B is correct. The find / -type f -perm -u=s -ls command will search for files on your Linux system that have SUID permissions set. A, C, D, and E are incorrect. Response A searches for files with the SGID permission set. Responses C, D, and E search for files that have rwx permissions set for user, group, or others respectively.

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

You need to format the first partition on the second SATA drive in your system with the ext3 file system. Which command will do this? A. mkext3fs /dev/sdb1 B. mkfs -t ext3 /dev/sdb1 C. mkfs -t ext3 /dev/hdb D. mkfs /dev/sdb1 Hint: SCSI and SATA drives are referenced using the same /dev file naming syntax

B is correct. The mkfs -t ext3 /dev/sdb1 command will format the first partition on the second SATA drive in your system with the ext3 file system. A, C, and D are incorrect. Response A uses an invalid Linux command and is a distracter. Response C uses older Linux device naming that was used in earlier versions of the Linux kernel to reference PATA (IDE) hard disks. Response D omits the file system type, which causes mkfs to create an ext2 file system by default.

You created an ext3 file system on the third partition on the first SATA hard disk in your system and now need to mount it in /mnt/shared in read/write mode. Which commands will do this? (Choose two.) A. mount -t ext3 /dev/sdc1 /mnt/shared/B. mount -t ext3 /dev/sda3 /mnt/shared/ C. mount -t ext3 /dev/sdb1 /mnt/shared/ D. mount -t ext3 -o ro /dev/sda3 /mnt/shared/ Hint: Recall how SATA hard disks are addressed though device files in /dev

B is correct. The mount -t ext3 /dev/sda3 /mnt/shared/ command will mount the third partition on the first SATA hard disk in /mnt/shared in read/write mode. A, C, and D are incorrect. Response A tries to mount the first partition on the third drive in the system. Response C tries to mount the first partition on the second drive in the system. Response D mounts the right partition but does so in read-only mode.

Which netstat command can be used to view performance statistics about the network interfaces in your Linux system? A. netstat -l B. netstat -i C. netstat -r D. netstat -s Hint: This command displays transmit (TX) and receive (RX) statistics

B is correct. The netstat -i command can be used to view performance statistics about the network interfaces in your Linux system, including transmit (TX) and receive (RX) statistics. A, C, and D are incorrect. The netstat -l command displays a list of listening sockets on your network interface. The netstat -r command displays your routing table. The netstat -s command displays summary information for each IP protocol.

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 write an if/then/else statement in a script that will test to see if a file named /var/opt/mydb/mydb exists and has the write permission assigned for the user running the script. Which statement will do this? A. if test -e /var/opt/mydb/mydb; then... B. if test -w /var/opt/mydb/mydb; then... C. if test -f /var/opt/mydb/mydb; then... D. if test -x /var/opt/mydb/mydb; then... Hint: Recall the syntax for using the test command to evaluate a condition as true or false

B is correct. The test -w command checks to see if the specified file exists and if the write permission is granted. A, C, and D are incorrect. The test -e command only checks to see if the specified file exists. The test -f command checks to see if the specified file exists and if it is a regular file. The test -x command checks to see if the specified file exists and if the execute permission is granted.

Consider the following entry from the /etc/passwd file: ksanders:x:1001:100:Kimberly Sanders:/home/ksanders:/bin/bash. What user ID (UID) has been assigned to this user account? A. ksanders B. 1001 C. 100 D. Kimberly Sanders Hint: Recall the structure of the records in the /etc/passwd file

B is correct. The third field in each user entry in /etc/passwd specifies the user's ID number (UID). In this case, it's 1001. A, C, and D are incorrect. Response A specifies the username. Response C specifies the group ID (GID) of user's primary group. Response D specifies the user's full name.

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.

You've logged in to your Linux system through the GNOME graphical desktop environment. You've opened a terminal session within GNOME to complete several command-line tasks. Which bash configuration files were used to configure the bash environment within the shell session? (Choose two.) A. /etc/profile B. ~/.profile C. /etc/bashrc D. ~/.bashrc E. ~/.bash_profile Hint: Recall which type of shell uses specific configuration files

C and D are correct. Because the terminal session is a non-login shell, the /etc/bashrc (or/etc/bash.bashrc) and ~/.bashrc files are used to configure the bash shell environment. A, B, and E are incorrect. Each of these files is used on various distributions to configure the login shell environment. Because the terminal session opened here is a non-login shell, these files are not used.

Which script structure executes over and over until a specified condition is no longer true. A. For loop B. Case C. While loop D. Until loop Hint: Recall which script structures execute repeatedly based on a given condition

C is correct. A while loop executes over and over until a specified condition is no longer true. A, B, and D are incorrect. A for loop executes a specific number of times. A case statement evaluates only once. An until loop runs over and over as long as the condition is false. As soon as the condition is true, it stops.

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.

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.

You want to redirect the display from the X server on one Linux system to another Linux client system securely through an SSH tunnel. Which directive in the /etc/ssh_config file on the X server system do you need to configure to allow this? A. Protocol B. LocalCommand C. ForwardX11 D. PasswordAuthentication Hint: The sshd_config file uses a directive dedicated to encrypting X server traffic

C is correct. The ForwardX11 directive specifies whether X11 connections will be automatically redirected over a secure channel. A, B, and D are incorrect. The Protocol directive specifies the protocol versions SSH should support. The LocalCommand directive specifies a command to execute on the local machine after successfully connecting to the server. The PasswordAuthentication directive specifies whether to use password authentication.

You are working with data in a MySQL database table named customers. The fields in this table are first, last, street, city, state, zip, and phone. You want to retrieve records with a value of 83401 in the zip field. Which SQL command will do this? A. UPDATE customers WHERE zip='83401' B. SELECT zip='83401' FROM customers; C. SELECT * FROM customers WHERE zip='83401'; D. SELECT * FROM customers; E. VIEW * FROM customers WHERE zip='83401'; Hint: Recall which SQL command is used to view information in a table

C is correct. The SELECT * FROM customers WHERE zip='Tracy'; command will retrieve records from the customers table with a value of 83401 in the zip field. A, B, D, and E are incorrect. Reponses A, B, and E use invalid SQL commands. Response D will select all records from the customers table.

Which environment variable specifies which display manager is loaded by default when the X environment is initially loaded? A. XAUTHORITY B. DISPLAY C. WINDOWMANAGER D. DISPLAYMANAGER

C is correct. The WINDOWMANAGER environment variable contains the path to the display/window manager your X system will use by default. For example: /sur/bin/gnome. A, B, and D are incorrect. The XAUTHORITY environment variable specifies the cookie file used to authorize you to connect to the X server. The DISPLAY variable specifies where the output from the X server is sent. The DISPLAYMANAGER variable does not exist by default on a Linux system and is a distracter.

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.

Which directive in a given service's xinetd configuration file specifies whether or not xinetd is allowed to start the daemon when requested? A. server_args B. server C. disable D. wait Hint: This directive is usually set to a value of yes by default

C is correct. The disable directive specifies whether or not xinetd is allowed to start the daemon when requested. If it is set to yes, the daemon will not be started when requested. A, B, and D are incorrect. The server_args directive specifies arguments to be sent to the daemon when it's started. The server directive specifies the executable to run to launch the service. The wait directive defines whether the service is single-threaded (yes) or multithreaded (no).

You've just created a new script in your home directory named runme.sh. When you try to run your script while in your home directory using the ./runme.sh command from the shell prompt, you see the following error: bash: ./runme.sh: Permission denied. Which resolution will fix this issue? A. Copy the file to the ~/bin directory. B. Add your home directory to the PATH environment variable. C. Enter chmod u+x runme.sh at the shell prompt. D. Change the she-bang line of the script to #!/bin/sh. Hint: Recall what is required for a script file to be executed by the bash shell

C is correct. The error shown is caused by not having the execute permission set for the user trying to run the script. The chmod u+x runme.sh will allow the user who owns the file to run it. A, B, and D are incorrect. Responses A and B resolve path-related problems, which aren't an issue in this scenario. Response D changes the command interpreter to the sh shell, which isn't necessary in this scenario.

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.

You want to create a compressed cpio archive of all the files within your home directory to /media/usbdrive/backup.cpio.gz. Which command will do this? A. cpio -ov ~ | gzip > /media/usbdrive/backup.cpio.gz B. ls ~ | cpio -ovz > /media/usbdrive/backup.cpio.gzC. ls ~ | cpio -ov | gzip > /media/usbdrive/backup.cpio.gz D. cpio -ovz ~ > /media/usbdrive/backup.cpio.gz Hint: Recall how files to be archive must be sent to the stdin of the cpio command

C is correct. The ls ~ | cpio -ov | gzip > /media/usbdrive/backup.cpio.gz command will generate a listing of files in your home directory, send the list to the cpio command to create an archive, and send the archive to gzip for compression. A, B, and D are incorrect. Responses A and D fail to send a list of files to the stdin of the cpio command. Response B uses an invalid cpio option (-z). Responses B and D also fail to pipe the output of the cpio command to the gzip command.

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.

Consider the following entry from the /etc/shadow file: ksanders:$2a$05$KL1DbTBqpSEMiL.2FoI3ue4bdyR.eL6GMKs7MU6.nZl5 SCC7/REUS:15043:1:60:7:5::. In how many days will this account be disabled after the user's password has expired? A. 1 day B. 7 days C. 5 days D. Null value (Never) Hint: Recall the structure of records within the /etc/shadow file

C is correct. The seventh field in each record in /etc/shadow specifies the number of days to wait after a password has expired to disable the account. A, B, and D are incorrect. Response A specifies the minimum number of days (1) required before a password can be changed. B specifies the number of days prior to password expiration before the user will be warned of the pending expiration. Response D is assigned to the eighth field, which specifies the number of days since January 1, 1970, after which the account will be disabled.

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 of the following terms refers to the clock that runs via software within the Linux kernel? A. Hardware clock B. Time server C. System clock D. Local time Hint: Recall the two clocks that run simultaneously on a Linux system

C is correct. The system clock runs via software inside the Linux kernel itself. It is driven by an ISA timer interrupt and is measured as the number of seconds since 00:00:00 January 1, 1970 UTC. A, B, and D are incorrect. The hardware clock is the clock running within the BIOS of your motherboard. A time server is a time provider on the network that systems can synchronize time with. Local time specifies that the hardware clock in a Linux system is set to the local time instead of UTC.

The asanders user has recently married and changed her last name to Ebbert. Which command can be used to update her user account with her new last name? A. usermod -l asanders -c "Amber Ebbert" aebbert B. usermod -l aebbert -c "Amber Ebbert" -u asanders C. usermod -l aebbert -c "Amber Ebbert" asanders D. usermod-c "Amber Ebbert" asanders Hint: Recall the syntax used by the usermod command

C is correct. The usermod -l aebbert -c "Amber Ebbert" asanders command changes the full name and the username of the user account. A, B, and D are incorrect. Response A reverses the old username and new username parameters. Response B uses the -u option incorrectly (it is used to change the UIDassigned to the account). Response D is partially correct. It changes the user's full name, but it fails to change the user's username.

You need to run the tar command to back up the /home directory using the tar -cvf /media/usb/backup.tar /home command every day of every month, except Sundays, at 11:05 P . M . Which crontab entry will accomplish this? A. 5 11 * * 1-6 /bin/tar -cvf /media/usb/backup.tar /home B. 5 23 * * * /bin/tar -cvf /media/usb/backup.tar /home C. 5 23 * * 1-6 /bin/tar -cvf /media/usb/backup.tar /home D. 11 5 * * 0-5 /bin/tar -cvf /media/usb/backup.tar /home Hint: Recall the order of the fields that compose a crontab entry and the syntax used

C is correct. This line will run the tar command to back up the /home directory using the tar -cvf /media/usb/backup.tar /home command every day of every month, except Sundays, at 11:05 P . M . A, B, and D are incorrect. Response A runs the tar command at 11:05 A . M . instead of P . M . Response B runs the tar command every day of the week. Response D runs the cron command every morning at 5:11 A . M on Sunday-Friday.

For security reasons, you want your Linux system to always try to resolve hostnames using your DNS server before trying to resolve them using the /etc/hosts file. Which file can you use to configure the name resolver order? A. /etc/resolv.conf B. /etc/sysconfig/network/ifcfg-eth0 C. /etc/nsswitch.conf D. /etc/sysconfig/services Hint: Recall the name of the name service configuration file

C is correct. You can use the /etc/nsswitch.conf (name service switch) file to define the order in which services will be used for name resolution. A, B, and D are incorrect. Response A is used to configure the IP address of the DNS server but doesn't configure the name service order. Response B is used to configure IP addressing information but doesn't contain name resolution information. Response D is used to configure how services will behave after they are updated.

Which shell command is used to generate a list of open files on the system? A. fuser B. dumpe2fs C. lsof D. df E. du Hint: Entering this command at the shell prompt without any options lists all open files belonging to all active processes on the system

C is correct. You can use the lsof command at the shell prompt to display a list of open files.A, B, D, and E are incorrect. The fuser command displays the PIDs of processes using the specified files or file systems. The df command shows you where your hard drive partitions, optical drives, and other storage devices (such as USB drives) are mounted in the file system. It also shows the total size of the device and how much of that space is used. The dumpe2fs command displays information about ext2/3/4 file systems. The du command provides you with a summary of disk space usage of each file, recursively, for a specified directory.

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

The /etc/sudoers file on your Linux system is configured by default such that users must supply the root password when using sudo. You want to change this such that they only must supply their own password to use sudo. Which directives in the /etc/sudoers file must be commented out to do this? (Choose two.) A. Defaults env_keep B. root ALL=(ALL) ALL C. Defaults env_reset D. Defaults targetpw E. ALL ALL=(ALL) ALL Hint: One of the directives causes sudo to require the password of the user who the commands will be run as

D and E are correct. These two directives must be commented out in the /etc/sudoers file; otherwise, users must know the root password to use sudo run commands as root. A, B, and C are incorrect. The Defaults env_keep and Defaults env_reset directives are used to manage environment variables when using sudo. The root ALL=(ALL) ALL directive is used to define root user privileges.

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.

Which AccessX setting allows users to lock modifier keys such as CTRL and SHIFT ? A. RepeatKeys B. ToggleKeys C. SlowKeys D. StickyKeys Hint: This setting enables users to complete keyboard tasks with one finger that would normally require two or more fingers

D is correct. StickyKeys allows users to lock modifier keys such as CTRL and SHIFT . This enables users to complete keyboard tasks with one finger that would normally require two or more fingers. A, B, C are incorrect. RepeatKeys configures the keyboard to allow the user extra time to release a pressed key before sending multiple keystrokes. ToggleKeys sounds an audible alert if either the CAPS LOCK key or the NUM LOCK key is on. SlowKeys configures the keyboard such that the user must hold a key down for a specified period of time before the keystroke is actually sent.

When using local authentication on a Linux system, which file contains the passwords for your user accounts? A. /etc/passwd B. /etc/passwords C. /etc/gshadow D. /etc/shadow Hint: Recall which files are used for user and group accounts and which are used for passwords

D is correct. The /etc/shadow file contains passwords for your user accounts. A, B, C are incorrect. The /etc/passwd file contains your user accounts. The /etc/passwords file is not used for local authentication and is a distracter. The /etc/gshadow file contains passwords for your groups.

Which section of the /etc/X11/xorg.conf file is used to specify global X server options? A. Files B. Module C. Modes D. ServerFlags Hint: Recall the structure of the xorg.conf file

D is correct. The ServerFlags section specifies global X server options.A, B, and C are incorrect. The Files section tells the X server where to find the files it needs to do its job, such as font files and input device files. The Module section tells the X server to load certain server extension and font rasterizer modules at startup. The Modes section defines a video mode the X server may use.

You want to create a new alias on your system named ldir that will run the ls -al command when executed. Which command will do this? A. alias --create ldir "ls -al" B. alias -new ldir="ls -al" C. alias ldir ls -al D. alias ldir="ls -al" Hint: Remember the syntax for using the alias command

D is correct. The alias ldir="ls -al" command will create a new alias on your system named ldir that will run the ls -al command when executed. A, B, and C are incorrect. Each of these responses uses incorrect syntax for the alias command.

You need to use the chage command to specify a minimum password age of five days, a maximum password age of 60 days, and five warning days for the tux user. Which command uses the correct syntax to do this? A. chage -m 5 -M 5 -W 60 tux B. chage -m 60 -M 5 -W 5 tux C. chage tux -m 5 -M 60 -W 5 D. chage -m 5 -M 60 -W 5 tux Hint: Recall the syntax for using chage

D is correct. The chage -m 5 -M 60 -W 5 tux command specifies a minimum password age of 5 days, a maximum password age of 60 days, and 5 warning days for the tux user. A, B, and C are incorrect. Each of these responses uses incorrect syntax for the chage command or for the requirements of the given scenario.

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.

You need to add the aebbert user to the dbusers group. Which command can be used to do this? A. useradd -g dbusers aebbert B. usermod -g dbusers aebbert C. groupadd -A "aebbert" dbusers D. groupmod -A "aebbert" dbusers Hint: Recall which command is used to add a user to an existing group

D is correct. The groupmod -A "aebbert" dbusers command can be used to add the aebbert user account to the dbusers group. A, B, and C are incorrect. The useradd, usermod, and groupadd commands can't be used to add a user to a group.

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.

Which syslog facility can be used to capture log messages from an application you develop yourself? A. user B. authpriv C. daemon D. local1 Hint: Recall which syslog facilities (there are several) that are reserved for you to use to capture log messages from your own applications

D is correct. The local0-local7 facilities can be used to capture log messages from applications you develop yourself.A, B, and C are incorrect. The user facility is used for user-related log messages. The authpriv facility is used by all services associated with system security or authorization. The daemon facility is used by daemons that do not have their own dedicated facility.

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 need to assign the eth0 interface an IP address of 172.17.8.1 with a subnet mask of 255.255.0.0 and a broadcast address of 172.17.255.255. Which command will do this? A. ifconfig eth0 172.17.8.1 mask 255.255.0.0 bcast 172.17.255.255 B. ifconfig 172.17.8.1 netmask 255.255.0.0 broadcast 172.17.255.255 C. ifconfig eth0 172.17.8.1 subnetmask 255.255.0.0 bcast 172.17.255.255 D. ifconfig eth0 172.17.8.1 netmask 255.255.0.0 broadcast 172.17.255.255 Hint: Recall the syntax for setting IP address information with ifconfig

D is correct. This command will assign the eth0 interface an IP address of 172.17.8.1 with a subnet mask of 255.255.0.0, and a broadcast address of 172.17.255.255. A, B, and C are incorrect. Responses A and C use incorrect parameters for setting the subnet mask and broadcast address. Response B omits the network interface being configured.

What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command? A. The command is SetUID and it will be executed with the effective rights of the owner. B. The command will be executed with the effective rights of the group instead of the owner. C. The execute flag is not set for the owner. Therefore the SetUID flag is ignored. D. The command will be executed with the effective rights of the owner and group.

The execute flag is not set for the owner. Therefore the SetUID flag is ignored.


Set pelajaran terkait

IB/AP Biology Unit 6 Gene Expression and Regulation

View Set

OB chapter 5-foundations of employee motivation

View Set

PrepU Chp 28: Assessment of Hematologic Function and Treatment Modalities

View Set

NCLEX study set questions incorrect

View Set