Quiz #2 -Linux

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

You are looking for a specific five character string in the ~/customquote file with the grep command. The string should begin with the letter g and end with an y and be the last string on the line. Which regular expression should you use with grep?

"g...y$"

Which directory contains the configuration for GRUB ?

/boot

You are installing Linux on an old computer with an old BIOS and you are planning out the partitions of the hard disk. Which of the following directions should exist in the first 1024 cylinders of the hard disk drive?

/boot

What is the path for the menu.lst file?

/boot/grub

You have GRUB installed in your workstation. You need to make some permanent changes to the boot loader. What file would you edit?

/boot/grub/menu.lst /boot/grub/conf.

Which of the following directions must remain on the same partition?

/etc /lib /bin

Which of the following directories should be part of the partition that holds the root (/) directory?

/etc /bin /proc

You are looking for a more orderly way of stopping processes besides running the kill utility. Another administrator tells you that scripts exists to stop most processes in an orderly fashion. Where should you look for such scripts on your system?

/etc/init.d

You are working on a Linux distribution which uses upstart. Which file allows you to set the default runlevel

/etc/init/rc-sysinit.conf

You are experiencing a problem with one particular server. Each time it boots it goes into single user mode even though no warnings or errors are reported. You want to verify that it is configured to boot runlevel 3 just as all your other servers are. Which file would you check to find the default runlevel setting?

/etc/inittab

Which file includes a list of users who are able to shut down the system?

/etc/shutdown.allow

You need to configure a few changes to how the locateb index file is created. Which file should you edit?

/etc/updatedb.conf

Which directory contains user data for all standard users in the system?

/home

Which of the following directories should be on separate partitions?

/home /var

Which directory contains the locale configuration files on Linux distribution ?

/usr/share/locale

1. The GRUB 2 configuration(non editable) 2. The GRUB2 directory for script files 3. The GRUB2 configuration file(editable) 4. The GRUB configuration file (non editable) 5. The GRUB configuration file(editable) 6. The GRUB directory for script files

1. /boot/grub/grub.cfg 2. /etc/grub.d/ 3. /etc/default/grub 4. 5. /boot/grub/menu.lst 6.

1.Specifies a personal name format 2.Specifically used an override LC_MESSAGES 3.A special variable for overriding all settings. It sets all the locales to the same setting. 4.Defines all locale settings at once, while allowing further individual customization via the LC_*settings

1. LC_NAME 2. LANGUAGE 3. LC_ALL 4.LANG

1. Single User Mode 2. Reboot 3. Halt State 4. Graphical Multi-user mode 5. Same as run level 2 but not used

1. Runlevel 1 2. Runlevel 6 3. Runlevel 0 4. Runlevel 2 5. Runlevel 5 Runlevel 4 Runlevel 3

The entry 3:2345:respawn:/sbin/mingetty tty3 exists in the /etc/inittab file for virtual terminal #3. At what run levels is this virtual terminal available for access?

2 through 5

What is the recommended size for the /var directory?

3 GB

You have a Linux system with 512 MB of RAM installed. How much space should you plan to partition for the swap file?

512 MB

Which system component verifies the hardware and passes control of the computer to the boot loader ?

BIOS

1st 2nd 3rd 4th

BIOS Boot Loader OS Kernel Init

You have complied a new kernel. When you reboot, the new kernel is not shown on the menu. You use GRUB boot loader. What might you need to do to fix the problem?

Edit the grub.conf file to add to the new kernel

You are installing a boot loader on a system that will boot both Linux and Windows. You are going to use the GRUB boot loader for Linux. Where is the best location for GRUB?

GRUB should be installed on the boot sector of the Linux partition

You are editing the /etc/default/grub file. Which option should you use to set the default operating system?

GRUB_DEFAULT

You have a system with two installed operating systems you have already configured the GRUB bootloader to manage which operating system is loaded by default and how long to display the two operating system choices when the systems boot up. Now you need to prevent all users from making changes to the second operating system in the GRUB menu and restrict users from booting into the second operating system. The users should boot the system using the first operating system.

Insert the password option into /boot/grub/grub.conf file before the listed operating systems Insert the lock option into the /boot/grub/grub.conf file for the second operating system

You are piping the data from the cat command to another program, but the data is garbled. You believe the locale is corrupting the output. Which variable setting should you change to avoid the problem described above?

LANG=C

Which environment variable overrides all other locale settings and sets all locales to the same setting?

LC_ALL

In which boot process stage is the root partition mounted?

OS Kernel

Which component is responsible for loading and executing the init process?

OS Kernel

What does telinit 5 command do?

Switches the system run level to multi user textual mode

You are teaching users about security and passwords. Which example of the passwords would be the most secure password?

T1a73gz9!

Which of the following has a process ID (PID) of 1?

The intial (init) Process

You have a system with more than one Linux operation system installed. During the systems bootup process, which component loads a splash screen thus allowing you to choose the operating system you want to run?

The secondary boot loader

After reviewing the daemons on your system, you notice the atd daemon is not running in the current runlevel. You need to get the atd daemon running.

Use the service atd start command change the /etc/rc.d/init.d directory and type ./atd start

You have a dual-boot system with a Linux and Windows Operating systems. You need to configure the GRUB bootloader to display the GRUB menu for 12 seconds before GRUB automatically boots the default operating system. What should you do?

add timeout=12 to the /boot/grub/grub.conf file

Of the services listed below which service is stopped?

bttrack

Which command would you use to add the ladap service to runlevels 3 and 4

chkconfig --level 34 ldap on

You are searching the standard input for any line containing JAMESTOWN at the end of a line. Which egrep constructor should you use?

egrep JAMESTOWN$

Which of the following files will be displayed when using the egrep exhibit [0-9]+~/samps command?

exhibit 1 exhibit 125

You need to find files in the /home/gshant directory that are larger than 300k. You changed directories to /home/gshant. What command should you use?

find -size + 300k

Which of the following commands would you use to find all the files on the system that have either blue or gold in their names?

find / -name '*blue* '-o name '*gold*'

Which of the following commands finds files with the .txt extension in the /home/gshant directory?

find/home/gshant/ -name/ '*text*'

You are working on a Linux distribution that uses systemd. Which file in the /lib/systemd/system/ directory is used to start the services for necessary runlevel 5?

graphical.target

You want to perform an audit and make sure that group membership for user dblair is correct. Which command would you use to view the groups that dblair is a member of?

grep -e dblair /etc/group

You need to quickly see all the lines in the blue_and_gold text file that do not reference Karen. Which command do you use to accomplish this?

grep -v Karen blue_and_gold

You have an application called ABCD that is generating system errors when it starts. Which command is best to search the system message for log file errors?

grep ABCD /var/log/messages

Which of the following commands will help you determine which version of GRUB is installed in your Linux system ?

grub-install -v grub2-install -v

You recently installed a third hard drive in your system. You need to install GRUB on the hard drive. What command should you use ?

grub-install--root directory = /boot sd2

Which command should you use to convert encoding from one type to another ?

iconv

Which of the following lines in the /etc/inittab defines the default runlevel?

id:3 :initdefault:

Which daemon is responsible for bringing up other services as runlevels changed?

init

Which of the following is a core process for Linux?

init

You are experiencing a problem with a network server. You want to bring the system down and try reseating the cards within it before restarting it. Which command completely shuts down the system in an orderly manner?

init 0

You need to perform some system maintenance and want to prevent users from logging on while you do so. Which command should you run?

init 1

You have made changes to the /etc/inittab file but they do not seem to be taking effect. This is a busy time of day and you do not want to bring the system down and back up. Which command forces the system to reread the entries in the /etc/inittab file?

init q

You currently do not need to run the httpd daemon on your system, so you decide to disable it, but not remove it from the system. If you are using a BSD-based definition such as SUSE which of the following commands will keep the httpd script from starting at any runlevel when the computer boots?

insserv -r httpd

Which of the following files would not be found by the locate -i Libraryfines.csv command?

libraryfines.csv1

Which of the following utilities would you use to search the path for files matching a given name?

locate

You need to find a specific file in your Linux system. Which of the following commands should you use?

locate find

You have a Linux system that is configured to run graphical multi-user by default. Before the system is started in the graphical user mode you need to perform some administrative tasks in the system. You need to boot the system to single-user mode. What should you do?

provide a kernel boot option of 1

You are editing the GRUB configuration file and you need to configure the /dev/sda3 as the root drive. What entry should add to the file?

root (hd0,2)

what is the purpose of the find command?

search for files in the file system based on name, file size, time created, and other options

You have just finished installing an updated kernel on your email server that has been patched to solve a security vulnerability and wish to reboot as soon as possible. This is a busy time of day and you do not want the server down any longer than necessary. Which option prevents fsck from running after the reboot and allows the system to boot faster?

shutdown -f

You have informed users that you need to bring the machine down at the end of the day to perform routine maintenance. However, prior to shutting the system down you want to send a message to users and give them fifteen minutes to save data and exit the system. Which of the follow commands should you use?

shutdown -h +15 It is time for a shutdown!

You want to shut down the system immediately but send a message to logged on users and allow running processes to close gracefully. Which command would you use?

shutdown -h now

You are working on a Linux distribution which uses systemd. Which command should you use to manage the services and runlevels?

systemctl

Which of the following utilities displays the category of command?

type

After updating the settings in the /etc/default/grub file, you need to make sure the changes take effect. What command should you use?

update-grub

After using the locate command you discover some of your files are not being listed in the search results. Which command should you use to update the /var/log/locateb file?

updatedb

Which of the statements describe file globbing?

using wildcards to match specific files

Which single command should you use to find the path and manual pages for the mycustapp program?

whereis mycusapp

You use a program on your Linux system named photorec. Which command will display the path to the photorec binary file ?

which photorec


Ensembles d'études connexes

1.1 Regulatory Entities, Agencies and Market Participants

View Set

Securities Industry Essentials Exam

View Set

C2 Practice Exam Questions Wrong

View Set

Sociology quiz 10: Economy and politics

View Set