Linux Final Exam

Ace your homework & exams now with Quizwiz!

In Linux, which of the following prompts does the Shell display to indicate that the logged in user is Superuser?

#

Which of the following symbols in the beginning of the first line in a shell script specifies the shell used to run the script?

#!

Which of the following special lines is placed at the top of a custom bash shell script?

#! /bin/bash

Which of the following lines, as the first line of a file, positively identifies it as a bash shell script?

#!/bin/bash

A script named "welcome" is stored in the current directory. Which of the following commands is used to execute this script?

./welcome

Which of the following is the extension of the Debian package files?

.deb

In the Linux filesystem hierarchy, which of the following base directories contains the host-specific configuration files?

/etc

Which of the following directories contains X11's configuration file xorg.conf?

/etc/X11

Which of the following files is the main configuration file of cron?

/etc/crontab

Which of the following files is the main configuration file for the CUPS?

/etc/cups/cupsd.conf

Which of the following files configures how network printers are discovered?

/etc/cups/snmp.conf

Which of the following files lists the filesystems to be mounted automatically at startup?

/etc/fstab

Which of the following files will you edit to permanently mount a device during boot up of a system?

/etc/fstab

Which of the following options is the default mount point of the system?

/etc/fstab

In Linux, which of the following files contains the group account information?

/etc/group

Which of the following files contains list of IP addresses and their corresponding host names?

/etc/hosts

Which of the following files is modified when a user wants to add or remove daemon definitions?

/etc/inetd.conf

Which of the following files/directories stores scripts that are run when the system starts?

/etc/inetd.d

Which of the following SysV init configuration files will you modify to disable the ctrl-alt-delete key combination?

/etc/inittab

Which of the following files does init search to determine the runlevel?

/etc/inittab

Which of the following files contains the list of directories in which the ldconfig command searches the shared libraries?

/etc/ld.so.conf /etc/ld.so.cache

Which of the following files can be modified to create users in the Linux system?

/etc/passwd

Which of the following files contains a list of all user accounts?

/etc/passwd

Which of the following files is used to store the uid number?

/etc/passwd

Which of the following files stores mapping of domain name servers for the system to use?

/etc/resolv.conf

Which of the following files is used to store the user password information?

/etc/shadow

Which of the following files does syslogd daemon examine during the system's boot process?

/etc/syslog.conf

Which file is the configuration file for the systemd Journal System?

/etc/systemd/journald.conf

Which of the following files contains information about the location of users in text format?

/etc/timezone

YUM is configured with which of the following configuration files?

/etc/yum.conf

You've installed a commercial spreadsheet program called WonderCalc on a workstation. In which of the following directories are you most likely to find the program executable file?

/opt/wcalc/bin

Which file would you examine to learn what interrupts (IRQs) are in use on Linux?

/proc/interrupts

Which of the following is the first program to run on a Linux system and has a process ID (PID) of 1?

/sbin/init

In what directory tree are you most likely to find programs compiled by the system administrator for general use (accessible by standard user accounts)?

/usr/local

Which of the following directories contains the library interfaces used by the man command?

/usr/share/man

Richard decided to create a partition on his Linux system. Which of the following directories should he consider to have separate partitions? Each correct answer represents a complete solution. Choose three.

/var /home /tmp

Which of the following is the default directory for crontab files?

/var/spool/cron

Which of the following locations stores the crontab file for the user sam?

/var/spool/cron/sam

Which of the following runlevels cannot be used as the default runlevel on the Linux operating system?

0 6

Which of the following is the default umask value for a regular user?

002

Which of the following umask values assigns read and write permissions for the owner and read-only permission for all others?

022

Which of the following umask values will result in files with rw-r----- permissions?

027

Which of the following symbols is used to redirect errors to a file?

2>

Which of the following is prefixed with an account's hashed password to lock that account?

exclamation (!)

Which of the following commands runs a script without creating a subshell and exits the current shell after execution by default?

exec

Which of the following is the most frequent use of IRQ 14?

Primary IDE or ATA controller

You see the usrquota and grpquota options in the /etc/fstab entry for a filesystem. What is the consequence of these entries?

Quota support will be available if it's compiled into your kernel, but you must activate it with the quotaon command.

Which of the following commands is used to convert tabs in a given file into spaces?

expand

You have a data file, data.txt, to be processed by a particular program. However, the program cannot handle data separated by tabs. The data.txt file's data is separated by a tab stop at every eight characters. What command should you use before processing the data file with the program?

expand data.txt > data1.txt

Which of the following commands is used to make an environment variable available to subshells?

export

Which of the following commands is used to set an environmental variable?

export

Which of the following commands is a text-based menu-driven tool for disk partitioning?

fdisk

Which of the following commands is used to create a partition on a hard disk?

fdisk

Which of the following commands is used to create, change, delete, or display the partitions on a hard disk?

fdisk

You want to track down all of the files in /home that are owned by karen. Which of the following commands will do the job?

find /home -user karen

John works as a network administrator for Perfect Solutions Inc. The company has a Linux-based network. He has a file named format.txt. He wants to display this file in such a manner that there are only 50 characters in each line of the file. Which of the following commands will he use to accomplish his task?

fmt -w 50 format.txt

What do HorizSync and VertRefresh lines define in a monitor?

Range of horizontal and vertical refresh rates that the monitor can accept.

What does RPM stand for?

Redhat Package Manager

Which of the following is not an advantage of a source package over a binary package?

Source packages can be installed more quickly than binary packages.

What is the effect of the following command? $ myprog &> input.txt

Standard output and standard error from myprog are written to input.txt.

Which of the following AccessX features causes the keyboard modifier keys to remain active when pressed once, even after releasing the key?

Sticky Keys

The ________ permission set on a shared directory prevents users other than the owners from deleting files from a directory.

Sticky bit

A user wants to be able to press and release modifier keys, such as Shift and Ctrl, rather than press them simultaneously with the keys that they modify. Which of the following options will provide this feature?

Sticky keys

Which of the following keys is used to press more than one key at a time?

Sticky keys

You want to create a link to the /usr/local/bin directory in another location. Which of the following statements is true?

The link will probably have to be a symbolic link.

You want to move a file from your hard disk to a USB flash drive. Which of the following is true?

The mv command will delete the file on the hard disk after copying it to the flash drive.

In the following syslog.conf file, which of the following statements correctly describes the facility and priority? news.notice /var/log/news

The news is the facility and the notice is the priority.

You want to convert the my_package.rpm rpm package into the Debian package. Which of the following commands will you use to accomplish the task?

alien --to-deb my_package.rpm

Which of the following commands maintains a database of package information that enables the tool to automatically upgrade packages and their dependencies as new package releases become available?

apt-get

Which of the following utilities can be used to install a Debian package?

apt-get dpkg dselect

You try to run a program but receive the following error message. What does it mean? error in loading shared libraries: libXm.so.1: cannot open shared object file: No such file or directory

The program relies on a library called libXm.so.1, but that library isn't correctly installed.

Which of the following statements is false regarding quotas?

The repquota command is used to view the modified quotas of a group.

Which of the following statements are true about the rm command?

The rm command can remove files. The rm command can remove directories.

Which of the following statements are true about the selector field in the syslogd configuration file?

The selector field determines the priority of messages. The selector field is sub-divided into the facility and priority.

In an extended regular expression, what does the caret (^) symbol denote?

The start of a line

Which of the following best summarizes the differences between Windows's FDISK and Linux's fdisk?

The two are completely independent programs that accomplish similar goals, although Linux's fdisk is more flexible.

A user's home directory includes a file called ∼/.forward that consists of one line: |∼/junkme. What is the effect of this configuration?

The user's incoming mail is sent through the ∼/junkme program file.

Which of the following statements is true of binary RPM packages that are built for a particular distribution?

They can often be used on another RPM-based distribution for the same CPU architecture, but this isn't guaranteed.

Which of the following statements are correctly stated about the #! sequence?

This sequence must be at the beginning of the line. The shebang tells the system the name of the interpreter that should be used to execute the script that follows. The shebang line is ignored by the interpreter.

Why might you type touch filename?

To ensure that filename's time stamp holds the current time

What is the purpose of udev?

To manage the /dev directory tree

A user types kill -9 11287 at a bash prompt. What is the probable intent, assuming the user typed the correct command?

To terminate a misbehaving or hung program with process ID 11287

You want your computer to remind you to get your car inspected in two years. What is the best way to do this among the specified options?

Type "at date," where "date" is a date specification. You can then specify a command, such as mail with appropriate options, to notify you of the need to get your car inspected.

What is the surest way to run a program (say, myprog) that's located in the current working directory?

Type ./ followed by the program name: ./myprog.

A program's instructions say that the $FIRMWARE environment variable must be set to /lib/firmware/tp9173.fw. How can you verify that this is so?

Type echo $FIRMWARE and verify that the command displays /lib/firmware/tp9173.fw.

You run Linux's fdisk and modify your partition layout. Before exiting the program, you realize that you've been working on the wrong disk. What can you do to correct this problem?

Type q to exit fdisk without saving changes to disk.

How can you search for text in vi?

Type the slash key (/) followed by the text you want to find while in command mode.

Which of the following SQL statements is used to replace old data in a table with the new data?

UPDATE

Which of the following are restrictions on ordinary users' abilities to run renice? (Select two.)

Users may not modify the priorities of other users' processes. Users may not increase the priority (that is, decrease the priority value) of their own processes.

How does man display information by default on most Linux systems?

Using the less pager

Which of the following filesystems is supported by both the Windows and Linux operating systems?

VFAT

You use top to examine the CPU time being consumed by various processes on your system. You discover that one process, dfcomp, is consuming more than 90 percent of your system's CPU time. What can you conclude?

Very littlE: dfcomp could be legitimately consuming that much CPU time, or it could be an unauthorized or malfunctioning program.

Question 10 : Which of the following describes a difference between apt-get and dpkg?

apt-get can automatically retrieve and update programs from Internet sites; dpkg can't.

Which of the following describes a difference between apt-get and dpkg?

apt-get can automatically retrieve and update programs from Internet sites; dpkg can't.

Which of the following acts as front-end to the dpkg command?

aptitude

Which of the following commands is used to list the jobs scheduled by the at command?

atq

Which of the following commands list the user's pending jobs?

atq at -l

You've received an ASCII text file (longlines.txt) that uses no carriage returns within paragraphs but two carriage returns between paragraphs. The result is that your preferred text editor displays each paragraph as a very long line. How can you reformat this file so that you can more easily edit it (or a copy)?

fmt longlines.txt > longlines2.txt

Which of the following commands is used to switch a Linux computer to different runlevels?

init

Which of the following starts an XDMCP server?

init

A runlevel can be switched from one mode to another mode with the help of either __________ or __________ command.

init, telinit

Which of the following commands is used to insert a new kernel module in a Linux operating system?

insmod

Which of the following commands are commonly used to create archive files? (Select two.)

cpio tar

Which of the following keywords is used to construct a table in SQL?

create table

Which of the following commands is used to schedule the recurring jobs?

crontab

Which of the following commands causes the current crontab to be removed?

crontab -r

Which of the following commands extracts filtered segments of a file and sends them to the standard output?

cut

Which of the following commands lists all partially installed Debian packages on the Linux operating system and also suggests what to do with them to get them working correctly?

dpkg -C

Which of the following commands will you use to remove a prog package along with its configuration files?

dpkg -P prog

You want to use dpkg to remove a package called theprogram, including its configuration files. Which of the following commands will you use to accomplish the task?

dpkg -P theprogram

Which of the following commands will you use to get a list of all installed packages on a Debian system?

dpkg -l

Which of the following commands uninstalls a package but leaves its configuration files for re-installation in future?

dpkg -r

Which of the following utilities can be used to install a Debian package?

dselect dpkg apt-get

Which of the following commands is used to summarize disk usage of each file recursively for directories?

du

Which of the following options is used with the rpm to uninstall a package?

e

Which of the following commands is implemented as an internal command in bash?

echo

In Linux, which of the following commands is used to edit user quotas?

edquota

Which of the following string searching commands treats the specified pattern as regular expression and special characters as meta-characters by default?

egrep

A text-mode program, verbose, prints a lot of bogus "error" messages to standard error. How might you get rid of those messages while still interacting with the program?

verbose 2> /dev/null

Which of the following filesystems is an MS Windows FAT filesystem type?

vfat

You've been asked to write a 1,000-word report, formatted as a plain ASCII text file. What utility can you use to count the words in your file to verify that it's the correct length?

wc

Which of the following commands is used to count the number of characters in a file?

wc -m

Which of the following commands locates files by checking each location in a list that is built into the program?

whereis

Typing ls -ld wonderjaye reveals a symbolic file mode of drwxr-xr-x. Which of the following are true? (Select two.)

wonderjaye may be read by all users of the system. wonderjaye is a directory.

Which of the following utilities is used to view the X system information?

xdpyinfo

Which of the following files is the X.org-X11 server's configuration file?

xorg.conf

Which command is used to obtain detailed information about any window in X window system?

xwininfo

Which of the following commands would you type to update the unzip program on a Fedora system to the latest version? (Select all that apply.)

yum update unzip yum upgrade unzip

Which of the following commands copies an entire line of text to an unnamed vi buffer in vi editor?

yy

Which of the following commands is used to copy a text in the vi editor?

yy

Which of the following metacharacters is used to send the output of one command as the standard input of the next command?

|

Which of the following symbols is used to connect the output of one command to the input of another command?

|

Which of the following symbols is used to redirect the output of one command as the input to another command?

|

Which of the following files can be edited to redirect all of a user's mail to another mail address?

~/.forward

Which of the following commands is used to view the processes running in background as well as foreground?

jobs

Question 12 : Which of the following commands is used to kill a process by name?

killall

Which of the following commands is used to kill a process by name?

killall

Which of the following commands is used to create necessary links to the most recent shared libraries?

ldconfig

John works as a network administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. The bash shell of John's OS is not working properly. Mark, one of John's colleagues, suggests that some shared library of the bash shell has been corrupted. To analyze this suggestion, John has to find the names of shared files of the bash shell. Which of the following commands will John use to accomplish the task?

ldd

A system contains a file, /usr/share/important.txt. You want to create a link to this file in the /usr/local directory, which is on another partition. Which of the following commands will accomplish this goal?

ln -s /usr/share/important.txt /usr/local/important.txt

Which of the following programs defines the user's language, country, or region?

locale

Which of the following acts as an interface for sending messages to the syslog?

logger

Which of the following commands is used to rename, compress, and delete system log files?

logrotate

Which of the following commands is used to display information about all the queued print jobs?

lpq

You work as a network administrator for Perfect Solutions Inc. The company has a Linux-based network. A printer is configured on the network. You want to see the status of a print queue. Which of the following commands will you use to accomplish the task?

lpq

Which of the following commands can be used to identify the job_id of a job in a print queue?

lpq lpstat

Which of the following CUPS utilities can be used to send a file to the print queue for printing?

lpr

Which of the following commands submits the print jobs to the print service?

lpr

Which of the following syslog facility parameters specifies that a printing program is logging the message?

lpr

You want to print the file /etc/lilo.conf on the default print queue. Which of the following commands will you use?

lpr

Which of the following commands is used to remove a print job from a print queue in a Linux computer?

lprm

Which of the following commands will you use to remove the job from a print queue?

lprm

You work as a network administrator for McNeil Inc. You want to remove a file from a print queue. Which of the following commands will you use to accomplish the task?

lprm

You work as a network administrator for Perfect solutions Inc. The company has a Linux-based network. You want to see the file permissions on a file. Which of the following commands will you use to accomplish the task?

ls -l

You want to discover the sizes of several dot files in a directory. Which of the following commands might you use to do this?

ls -la

Which of the following can be used to display the contents of an email queue?

mailq

Which parameter limits the search to a specific number of subdirectories?

maxdepth

Which of the following commands is used to create a directory in a Linux computer?

mkdir

Which of the following commands is used to create a filesystem on a Linux partition?

mkfs

Which of the following commands can be used to create a vfat filesystem? Each correct answer represents a complete solution. Choose three.

mkfs.vfat mkfs -t vfat mkfs.msdos

Which of the following commands is used to create a swap area on a Linux device?

mkswap

Which of the following commands is used to prepare the media to be read by the Linux operating system?

mount

Your DNS server has IP address as 10.11.12.11. Which of the following lines will you add in the /etc/resolv.conf file?

nameserver 10.11.12.11

Which of the following commands can list all the TCP ports on which the Linux server is listening?

netstat

Which of the following commands is identical to the sendmail -bi command?

newaliases

You have updated the /etc/aliases file manually. Which of the following commands will you execute in order to cause the changes to take effect?

newaliases sendmail -bi

You want to temporarily change your primary group to another group of which you are a member. In this process, a new shell will be created, and when you exit the shell, your previous group will be reinstated. Which of the following commands will you use to accomplish this task?

newgrp

Which of the following commands are equivalent to one another? (Select two.)

nice crunch nice -10 crunch

Which of the following commands is used for port scanning?

nmap

Which of the following is an open source tool for network exploration and security auditing?

nmap

Richard works as a Linux Administrator for Perfect Solution Inc. He runs a command that consumes a lot of time. Suddenly, he has to log off his computer, but in doing so, he has to terminate the running command. Which of the following commands should he use so that the command keeps running even after he gets logged off?

nohup

Which of the following files is read by the ntpd to determine the synchronization sources?

ntp.conf

Which of the following commands set the date and time via NTP?

ntpdate

Which of the following commands is used to paste the copied or cut text?

p

Which of the following commands is used to set passwords for Linux users?

passwd

Which of the following commands can be used to unlock a locked user account?

passwd -u usermod -U

Which of the following is a mail transfer agent whose configuration files are human readable and support 250 directives?

postfix

Which of the following commands is used to convert text files for printing?

pr

You work as a network administrator for Tech Perfect Inc. The company has a Linux-based network. You want to kill a process running on a Linux server. Which of the following commands will you use to determine the process identification number (PID) of the process?

ps

Which of the following commands creates a display of processes, showing the parent-child relationships through links between their names?

ps --forest

Which of the following commands is used to disable the disk quota?

quotaoff

Sam works as a Network Engineer for Perfect Solutions Inc. He found some disk space issue. He decided to restrict the user's ability to consume the disk space. Which of the following commands should he use to perform this task? Each correct answer represents a complete solution. Choose two.

quotaon edquota

John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. Which of the following commands will he use to create a report of the disk quota of all users?

repquota

Which of the following commands summarizes quotas for a filesystem?

repquota

Which of the following commands can be used to summarize the quota information about all filesystems?

repquota -a

Which of the following commands is used to delete files in Linux?

rm

How would you configure a computer to use the computer whose IP address is 172.24.21.1 as a gateway for all network traffic that's not otherwise configured?

route add default gw 172.24.21.1

Which of the following commands will install an RPM package file called theprogram-1.2.3-4.i386.rpm on a computer?

rpm -Uvh theprogram-1.2.3-4.i386.rpm rpm -i theprogram-1.2.3-4.i386.rpm

Which of the following commands is used to list Redhat Linux packages that are installed on a computer?

rpm -qa

Which of the following commands is used to list all installed packages?

rpm -qa

Which of the following commands will extract the contents of the myfonts.rpm file into the current directory?

rpm2cpio myfonts.rpm | cpio -i --make-directories

What command will you use to find the current runlevel of an active Linux session?

runlevel

Which of the following commands is used to verify runlevel of the Linux system?

runlevel

Which of the following letters is used to indicate that the SGID bit is set on a directory?

s

Which of the following commands is used to list all the running screen processes?

screen -ls

Which of the following commands will change all occurrences of dog in the animals.txt file to mutt in the screen display?

sed 's/dog/mutt/g' animals.txt

Which of the following commands is used to print a list of numbers within a specified range?

seq

Which of the following commands is used to display all user-defined variables in a sorted list?

set

Which of the following commands will you use to reboot the system while using SysV init?

shutdown - r now "rebooting" telinit 6

Which of the following shutdown commands is used to skip the fsck command process after rebooting the Linux operating system?

shutdown -f

Which of the following is a special name of shared library?

soname

Which of the following is NOT one of the descriptors of a Linux process?

stdproc

Which of the following commands should regular users use to run commands that can only be executed by root?

sudo

Which of the following commands is used to enable devices and files for paging and swapping?

swapon

Which of the following files is the main configuration file of the syslogd daemon?

syslog.conf

Which of the following are valid init systems within Linux?

systemd SysV

Which of the following systemd methods will you use to change the boot target?

systemd.unit

Which of the following options is used with the nl command to number the non-empty lines only?

t

Which of the following commands is used to concatenate and print lines of text files to standard output in reverse order?

tac

What program would you use to display the end of a configuration file?

tail

Which of the following commands can be used to write the last few lines of a text file to the standard output?

tail

Which of the following commands can you use to see only the last ten lines of a file?

tail tail -10

Which of the following commands can you use to see only the last ten lines of a file? Each correct answer represents a complete solution. Choose two.

tail -10 tail

You've received a tar archive called data79.tar from a colleague, but you want to check the names of the files it contains before extracting them. Which of the following commands would you use to do this?

tar tvf data79.tar

Richard created a document on his Linux system. He finds all the characters in uppercase and tries to convert all those uppercase characters to lowercase characters. Which of the following commands should he run to get his task done?

tr

Which of the following is a good replacement for the traceroute6 command?

tracepath6

Which of the following commands will you use to track the route of packets from a computer to a destination?

traceroute tracepath

Which of the following commands is used to adjust filesystem parameters?

tune2fs

Which of the following commands is used to specify how each command will be interpreted?

type

Which of the following commands can be used to limit the system's resources?

ulimit

Which of the following options sets the default value of permission on a file?

umask

Which of the following commands can be used to unmount a cdrom mounted on the /mnt/cdrom directory? Each correct answer represents a complete solution. Choose two.

umount /dev/cdrom umount /mnt/cdrom

Which of the following commands will you use to convert all spaces to tabs?

unexpand

Which of the following commands can be used to remove all the duplicate lines from a sorted file?

uniq

Which of the following commands is used to get the time since the computer is running?

uptime

Which of the following can you use to load the necessary modules when your system detects a newly connected USB device? Each correct answer represents a complete solution. Choose two.

usbmgr hotplug

You want to allow a user to unmount a filesystem that the user has mounted. Which of the following options will you add in the /etc/fstab file?

user

Which of the following commands is used to remove a user from the Linux system?

userdel

Which of the following commands is used to change the group of a Linux user?

usermod

Which of the following commands is used to change the user login name?

usermod

Which of the following commands is used to modify a user account?

usermod

Which of the following commands is used to change the permission on a file?

chmod

Which of the following commands is used to inspect the kernel ring buffer?

dmesg

Which of the following ln parameters is used to create a symbolic link?

-s

What parameter can you pass to ln to create a soft link? (Select two.)

-s --symbolic

Which of the following metacharacters is used by Linux to run a command in the background?

&

Which of the following metacharacters is used with a Linux command to run the command in the background?

&

Which of the following symbols is used to redirect all output including errors to a file?

&>

Which of the following symbols is expanded when a pattern is matched?

*

Which of the following date command parameters is used to display or set the date in UTC (universal) time?

-u

Which of the following files are used to activate disk quotas on a filesystem?

*quota.user (in the root directory of the filesystem) *quota.group (in the root directory of the filesystem)

What is the range of nice numbers for a Superuser (root)?

-20 to 19

Which of the following dpkg command parameters is used to recursively handle all regular files matching pattern *.deb found at specified directories and all of its subdirectories?

-R

Which of the following options is used with the rpm to verify the installed packages?

-V

Which of the following history command parameters is used to delete all of the history entries?

-c

Which of the following logger options is used to record the process ID of the logger process?

-i

Which of the following crontab command parameters can be used to display the contents of the crontab file?

-l

Which of the following rpm options is used with -q operation to display the files contained within a package?

-l

Which of the following file permissions denotes the read and write permissions for a user named "john" and the execute permission for the members of the group named "users"?

-rw---x--- 1 john users 14 Jul 28 10:00

What will be the file permission of a user with umask value 002?

-rw-rw-r--

What command would you type to obtain a list of all the installed packages on a Debian system?

dpkg --get-selections

How many bits are present in an IPv6 address?

128

Which of the following commands will you use to remove a Debian file along with its configuration files?

dpkg --purge

Which of the following represents a correct entry in the /etc/hosts file?

172.165.0.23 ucertify.cer.com ucertify

You are working with the vi editor and writing a textfile. Which of the following commands will you use if you want to move the cursor 3 characters to the right?

3l

Which of the following port numbers does DNS use?

53

In Linux, which of the following is the octal representation of the -rwxr-xr-x permission set?

755

Each line of the crontab file contains __________ fields.

Six

Which of the following commands exits vi without saving changes?

:q!

Which of the following commands is used to quit forcefully?

:q!

You are working on your Linux system. Accidently, you made changes in one of the read-only file and you are unable to quit editing the file with the "q" command. Which of the following commands will you run to quit from the file without saving changes?

:q!

Which of the following, when typed in vi's command mode, saves a file and quits the program?

:qw ZZ

Which of the following commands in vi editor writes the changes to a file and then quits from the editor?

:wq

Which of the following characters is used to direct the contents of a file to a command?

<

Which of the following symbols is used to redirect a file as an input to a command?

<

Which of the following characters is used to direct the output of a command to a file?

>

Which of the following symbols redirects output to append an existing file in a Linux computer?

>>

Which of the following symbols matches any single character?

?

What is a daemon?

A background process

You work as a Linux technician for Tech Perfect Inc. The company has a Linux-based network. You have configured a database server in the network. Users complain that the server has become remarkably slow. However, the previous day, the server was performing well. You know that some of the processes may be the cause of the issue. You run the ps command on the server. While reviewing this output, which information will you look at that suggests the problematic process?

A high CPU time

A user wants to run the cruncher program with a very low priority and attempts to execute nice -n -19 cruncher. The system responds with a Permission denied error. What is the most likely cause of this error?

A nice value of -19 increases the priority of a program, and only root may do that.

In diagnosing a network problem, you type ping -c 10 test.example.org. The result is several lines of output, one of the last of which is shown here. 10 packets transmitted, 6 received, 40% loss, time 9083ms What does this result indicate?

A system (or possibly multiple systems) between your own and test.example.org is losing a lot of the test packets you're sending or the replies from the remote system.

Which of the following statements are true about a tarball?

A tarball is usually indicated by using multiple extensions, .tar and .gz, which are written together as .tar.gz or .tgz. A tarball is an archive file created by tar and optionally compressed with gzip or bzip2.

Which of the following defines the facility parameter in the /etc/syslog.conf file?

A type of program that generated the messages to be logged

Which of the following options is true about the ASCII code?

ASCII is a 7-bit code.

What does the third field in the process entry of the /etc/inittab file define?

Action to be taken by the process

What is the preferred method of adding a directory to the library path for all users?

Add the directory to the /etc/ld.so.conf file, and then type ldconfig.

In Linux, which of the following commands is used to install a non-debian package on a computer?

Alien

To access files on a USB flash drive, you type mount /dev/sdc1 /media/flash as root. Which types of filesystems will this command mount?

All of these

Which of the following is correctly stated about the DELETE command?

All the rows can be deleted without deleting the table. The WHERE command specifies the record that is to be deleted. A user cannot undo the deleted records.

Which of the following is sometimes referred to as quota and can be temporarily exceeded by a user?

Soft limit

How many commands can you pipe together at once?

An arbitrary number

You type a command into bash and pass a long filename to it, but after you enter the command, you receive a File not found error message because of a typo in the filename. How might you proceed?

Any of these.

What software can you use to drive a Braille display device?

BRLTTY A 2.6.26 or later kernel

Which of the following utilities is used to search for Braille displays at the USB port in a Debian-based Linux operating system?

BrlTTY

Which of the following statements about the X Window System or X is false?

By default, it encrypts network traffic between an X server and remote X clients.

How will you calculate the file permission of a user with umask value 027?

By subtracting the umask value from 666

Which of the following sections is concerned with fonts in the xorg.conf file?

Files

John works as a professional Ethical Hacker for uCertify Inc. He has been assigned a project to test the security of www.we-are-secure.com. He enters the following command on the Linux terminal: chmod 741 secure.c Considering the above scenario, which of the following statements are true?

By the octal representation of the file access permission, John is restricting the group members to only read the file named "secure". John is providing all rights to the owner of the file.

You've just installed MySQL, and you intend to use it to store information about the animals in a zoo, from the anteaters to the zebras. What command are you likely to use first, once you start MySQL?

CREATE DATABASE animals;

Which of the following is a printing program used in a Linux environment?

CUPS

How does the lpc utility for CUPS differ from its counterpart in BSD LPD and LPRng?

CUPS's lpc is much simpler than its counterpart in BSD LPD and LPRng.

On which of the following systems is X11 based?

Client/Server-based

Which of the following variable types is best suited to hold the value of a currency value (dollars and cents) in a SQL database?

DECIMAL

Which of the following commands will you use to delete the record where the FirstName is "Richard" from the employee table?

DELETE FROM employee WHERE FirstName="Richard"

Which of the following services does BIND refer to?

DNS

Which of the following services uses both TCP and UDP?

DNS

How would you delete the table called deleteme from a SQL database?

DROP TABLE deleteme;

How should you configure a system that uses Yum to access an additional Yum software repository?

Download a package from the repository site, and install it with RPM, or place a configuration file from the repository site in the /etc/yum.repos.d directory.

Which of the following filesystems is not a journaled filesystem in Linux?

EXT2

Typing fdisk -l /dev/sda on a Linux computer with an MBR disk produces a listing of four partitions: /dev/sda1, /dev/sda2, /dev/sda5, and /dev/sda6. Which of the following is true?

Either /dev/sda1 or /dev/sda2 is an extended partition.

Which of the following is a speech interface that allows visually impaired users to interact independently and efficiently with a computer?

Emacspeak

Which of the following keys is used to exit insert mode?

Esc

Which of the following are journaling filesystems for Linux? (Select three.)

Ext3fs XFS ReiserFS

Which of the following lines is used to declare the shebang?

First line

Which of the following are common display managers on Linux?

GDM XDM

Which of the following is an on-screen keyboard utility in Linux?

GOK

Which of the following utilities can be used as an onscreen keyboard?

GOK

You work as a network administrator for Rick Inc. The company has a Linux-based network. You are configuring a Linux server. Which of the following bootloaders does not require to be rewritten after the configuration of the kernel has been changed?

GRUB

You type echo $PROC, and the computer replies Go away. What does this mean?

One of your configuration files, or a program you've run, has set the $PROC environment variable to Go away.

Which of the following protocols is used by the ping command?

ICMP

Which of the following commands is used to add a new record in a table?

INSERT

Which of the following protocols is used by the CUPS to manage jobs and queues?

IPP

Which of the following commands displays the shared library required by each program?

Idd

Which of the following utilities is used to determine the libraries necessary for a particular executable code?

Idd

What can the type command do that whereis can't?

Identify a command as an alias, internal command, or external command.

An administrator types the following command on an RPM-based Linux distribution: # rpm -ivh megaprog.rpm

If the megaprog.rpm package exists, is valid, and isn't already installed on the computer, it is installed.

You are working on a Linux computer. One of the keys of the keyboard is not functioning properly. You have been asked to complete an assigned task within an hour and you do not have any spare keyboard. What will you do to solve this issue?

Install and use GOK.

You type mkdir one/two/three and receive an error message that reads, in part, No such file or directory. What can you do to overcome this problem? (Select two.)

Issue three separate mkdir commands: mkdir one, then mkdir one/two, and then mkdir one/two/three. Add the --parents parameter to the mkdir command.

Which of the following statements is true about the sticky bit applied to a directory?

It allows only the owner or root to delete or rename files in that directory.

What does the following command accomplish? $ wc report.txt | tee wc

It displays a count of newlines, words, and bytes in the report.txt file and copies that output to the wc file.

Which of the following is the main reason for using the ReiserFS filesystem over the ext2 filesystem?

It is a journaled filesystem.

What does the pwd command accomplish?

It prints the name of the working directory.

What does the grep command accomplish?

It searches files' contents for a pattern.

Which is true of using both RPM and Debian package management systems on one computer?

It's generally inadvisable because the two systems don't share installed-file database information.

What is the function of the ∼/.profile file?

It's one of a user's bash startup scripts.

Which of the following abbreviations is used to denote localization?

L10N

Which of the following variables overrides other LC_* variables when set?

LC_ALL

Which of the following variables determines the locale category for date and time formatting information?

LC_TIME

Which of the following environment variables is used to add directories holding shared libraries?

LD_LIBRARY_PATH

You execute the following command: fdisk -l What will be the result?

List the partition tables for the specified devices and then exit.

Which of the following is the physical address of a computer?

MAC address

Which of the following locations is used by the bootloader to store its configuration files?

MBR

Which of the following locations are valid to store LILO?

MBR Root partition

Which of the following mechanisms does the Linux operating system use to access resources on a hard drive?

Mounting

Which of the following AccessX features enables the cursor keypad to be emulated as a pointing device?

Mouse keys

Which of the following is not a bootloader?

NFS

Each entry in the crontab file ends with which character?

Newline

You type jobs at a bash command prompt and receive a new command prompt with no intervening output. What can you conclude?

No background processes are running that were launched from the shell that you're using.

In Linux, which of the following statements is correct regarding the file permission set ID 666?

None of the user types (owner, group, and others) has the execute permission on the file.

Which of the following keywords is used to sort the result?

ORDER BY

Which of the following is the default screen reader of the GNOME desktop environment?

Ocra

You want to create a link from your home directory on your hard disk to a directory on a DVD drive. Which of the following link types might you use?

Only a symbolic link

When should programs be configured SUID root?

Only when they require root privileges to do their job.

Which of the following environment variables holds path of directory(ies) that contain executable files?

PATH

Which of the following configuration information can be displayed using the lspci command? Each correct answer represents a complete solution. Choose all that apply.

PCI domain numbers IRQ numbers

Which of the following protocols is used to retrieve mail from the server?

POP

Which of the following SQL statements is used to extract data from a database?

SELECT

Which of the following keywords is used to query and retrieve data from a database?

SELECT

Which of the following statements is NOT true about symbolic links?

Symbolic links work on the inode level to point to a particular file.

How do the > and >> redirection operators differ?

The > operator creates a new file or overwrites an existing one; the >> operator creates a new file or appends to an existing one.

As root, you type apt-get update on a Debian system. What should be the effect of this command?

The APT utilities retrieve information about the latest packages available so that you may install them with subsequent apt-get commands.

You ask your Network Administrator for an IP address and netmask for a local computer. (You have the other information you need.) The administrator writes "255.255.255.0 172.24.21.201" on a piece of paper. What does this mean?

The IP address is 172.24.21.201 and the netmask is 255.255.255.0.

How do grep and egrep differ?

The grep command uses basic regular expressions by default, whereas egrep uses extended regular expressions by default.

What does the number 703 represent in the following /etc/passwd entry? george:x:703:100:George Brown:/home/george:/bin/tcsh

The account's user ID (UID) number

Which of the following statements is true about the chmod 0755 scriptfile.sh command?

The command assigns the read, write, and execute permissions to the scriptfile.sh file's owner.

Which of the following are correctly stated about the cpio command?

The cpio command can extract archive files. The cpio command can copy files. The cpio command can create archive files.

In Linux, which of the following statements is not true regarding access permissions?

The execute access permission for a directory has the same meaning as that for a file.

You work as a network administrator for McNeil Inc. The company has a Linux-based Network. You are a root user on the Red Hat operating system. You see the following permissions on a file: -rwxr----- What operations can be performed on the file?

The file can be read by its owner. The file can be read by its owner and member of its owning group.

What is the effect of the following command? $ pr report.txt | lpr

The file report.txt is formatted for printing and sent to the lpr program.

Which of the following conditions is necessary for using the join command?

The files should be sorted

Which of the following file-location commands is likely to take the most time to find a file that may be located anywhere on the computer (assuming the operation succeeds)?

The find command.

What can you conclude from the following interaction? $ which man /usr/bin/man

The first instance of the man program, in path search order, is in /usr/bin.

Which of the following statements regarding various modes of the rpm command is false?

The freshen mode upgrades packages whose older versions do not exist on a computer.

Mounting is the process of associating a device or a filesystem with ______.

a directory

Which of the following protocols is used by the display manager to communicate with the servers over a network?

XDMCP

Which of the following options is front-end to the RPM?

YUM

Which of the following options is correct expansion of YUM?

Yellowdog Updater Modified

You prefer the look of GTK+ widgets to Qt widgets, so you want to substitute the GTK+ libraries for the Qt libraries on your system. How would you do this?

You can't easily do this; libraries can't be arbitrarily exchanged for one another. You would need to rewrite all of the Qt-using programs to use GTK+.

Which of the following commands is used to assign new names to regular commands?

alias

Which of the following information is maintained in the /etc/inittab file?

actions to be taken by processes runlevels of each process processes that start during boot up

You want to remove a Debian package including its configuration files. Which of the following commands will you use?

dpkg --purge

Which of the following commands will you choose to schedule the tasks to be executed later?

batch at crontab

Which of the following commands is used to send a process in background?

bg

Which of the following options is responsible for loading and starting Linux operating system?

bootloader

Which of the following constructs is used to completely exit a loop?

break

What programs might you use to learn what your system's load average is?

top uptime

What programs might you use to learn what your system's load average is? (Select two.)

top uptime

Which of the following commands will update the modification timestamp on the /tmp/foo.txt file?

touch

Which of the following commands is NOT an apt-get command?

cat

Which of the following commands is used to join files end to end?

cat

Which of the following commands will number the lines in aleph.txt? (Select three.)

cat -b aleph.txt nl aleph.txt cat -n aleph.txt

Which of the following commands is used to view a Linux user's login shell ?

cat /etc/passwd

Which of the following commands will you use to see the crontab file of the root?

cat /var/spool/cron/root

Which of the following commands can be used to view the contents of a file?

cat < testfile cat testfile

Which of the following commands can be used to view the contents of a file? Each correct answer represents a complete solution. Choose two.

cat testfile cat < testfile

Which of the following commands is used to change an entire line?

cc

Which of the following commands can be used to set the minimum or maximum number of days between password changes?

chage

Which of the following commands is used to set the date at which user's password expires?

chage

Which of the following utilities is used to change the aging information in the /etc/shadow file?

chage

You work as a system administrator for Perfect Solutions Inc. For the security purpose, you want to ensure that no user should login with the same password for more than 6 days. Which of the following commands will you use to get the task done?

chage -M 6

In a Linux computer, the ____ command changes the group ownership of files.

chgrp

John works as a network administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He wants to change the group membership of the file named "foo" to use the group ID for the group named "bar". Which of the following commands will he use to accomplish the task?

chgrp bar foo

Which of the following commands can be used to list the installed services and their associated runlevels?

chkconfig

Which of the following commands is used to change the access permissions for files and directories?

chmod

You work as a network administrator for Net Perfect Inc. The company has a Linux-based network. You have created a folder named report. You have made David the owner of the folder. The members of a group named JAdmin can access the folder and have read, write, and execute permissions. No other user can access the folder. You want to ensure that the members of the JAdmin group do not have the write permission on the folder. Also, you want other users to have the read permission on the report folder. Which of the following commands will you use to accomplish the task?

chmod 754 report

Which of the following commands would you type to enable world read access to the file myfile.txt? (Assume that you're the owner of myfile.txt.)

chmod o+r myfile.txt

Which of the following commands is used to change ownership of files?

chown

You work as a network administrator for Perfect Solutions Inc. The company has a Linux-based network. You are a root user on the Red Hat operating system. You want to grant ownership of the foofile file to a user named John. Which of the following commands should you use to accomplish this task?

chown John foofile

What command would you type (as root) to change the ownership of somefile.txt from ralph to tony?

chown tony somefile.txt

Which of the following regular expressions will match the strings dog, dug, and various other strings but not dig?

d[o-u]g

Which of the following commands is used to set the system time in the Linux operating system?

date

Which of the following commands is used to delete the current line?

dd

Which of the following extensions is used with the Debian package?

deb

Which of the following commands is used to report filesystem disk space usage in Linux?

df

Which of the following commands is used for DNS troubleshooting?

dig

Which of the following commands can be used to examine the kernel ring buffer?

dmesg

John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He wants to run two programs, "foo" and "bar". The "foo" command does use the most common conventions for returning information. He also wants to ensure that bar is executed if and only if foo has executed successfully. Which of the following command sequences will John use to accomplish the task?

foo && bar;

What tool can diagnose and fix many common Linux filesystem problems?

fsck

Which of the following commands is used to check and repair a Linux filesystem?

fsck

Which of the following commands is used to check filesystem errors?

fsck

Which of the following commands identifies which processes are using a particular file or directory?

fuser

You want to run an interactive script, gabby, which produces a lot of output in response to the user's inputs. To facilitate future study of this script, you want to copy its output to a file. How might you do this?

gabby | tee gabby-out.txt

Which of the following commands can be used to retrieve records from databases configured in the NSS (Name Service Switch) file?

getent

John works as a network administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He has stored all user names, one name per line, in the file named users.txt. Now, he wants to search for such user names that does not contain the letter D. Which of the following commands will John use to accomplish his task?

grep -v D users.txt

Which of the following commands will print lines from the file world.txt that contain matches to changes and changed?

grep change[ds] world.txt

Which of the following commands is used to create a new group in a Linux server?

groupadd

Which of the following commands is used to remove a group named payroll?

groupdel payroll

Which of the following commands is used to modify a group?

groupmod

You want to enable group quota support on a filesystem. Which of the following options will you add on the /etc/fstab file to accomplish the task?

grpquota

You type ls *r[0-9].pdf in a directory. Which of the following files' names, if present, is displayed in the resulting output?

hair3.pdf

Which of the following commands can be used to power off a Linux computer?

halt init 0 shutdown

Which of the following commands shows first ten lines of a file if no arguments are passed?

head

Which of the following commands is used to set the CMOS clock?

hwclock

Which of the following tools is used to access the Hardware clock of the Linux system?

hwclock

John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He wants to set the current system time according to the Hardware clock time. Which of the following commands will he use to accomplish the task?

hwclock -s

Which of the following options is used with the rpm to install a package?

i

Which of the following is used to change the encoding of files from one format to another?

iconv

Which of the following commands is not used to initiate a loop?

if

Which of the following constructs is used to test the exit status of commands?

if/then

You want to store the standard output of the ifconfig command in a text file (file.txt) for future reference, and you want to wipe out any existing data in the file. You do not want to store standard error in this file. How can you accomplish these goals?

ifconfig > file.txt

Which of the following commands brings up the network interfaces?

ifup

Which of the following commands is used to view the output on a screen as well as to save it in a file?

tee

Which of the following commands is used to switch a Linux computer to different runlevels?

telinit init

Which of the following commands is used to compare values or evaluate expressions?

test

Which option defines the wait duration for GRUB before loading the default operating system?

timeout

Which of the following commands look through the currently running processes and list the process IDs that match the selection criteria to stdout?

top pgrep


Related study sets

Theme #3: Insurrection in America Vocab

View Set

NSCA-CPT: Goal Setting and Motivation

View Set

Mental Health Chapter 25 Evolve Questions (Suicide and Non-Suicidal Self-Injury)

View Set

Intro to Psychology Unit 2 (ch. 6-10)

View Set

Procedures II: Quiz 4 (Skull Anatomy and Radiography)

View Set

Fundamentals PrepU - Chapter 8: Outcome Identification and Planning

View Set