LabSim Linux+ chapter reviews+

Your page rank:

Total word count: 34528
Pages: 126

Calculate the Price

- -
275 words
Looking for Expert Opinion?
Let us have a look at your work and suggest how to improve it!
Get a Consultant

Which of the following statements best describe the purpose of the Filesystem Hierarchy Standard (FHS)? (select two)
1) during installation, software can determine the permissions of specific directories.
2) During installation, software can predict where to place configuration files.
3) Individual users can predict where to find system configuration files.
4) As users create files, they are forced to place the files in specific directories.

2) During installation, software can predict where to place configuration files. 3) Individual users can predict where to find system configuration files.

Which directory is the home directory for the root user account?
1) /home/root
2) /root
3) /home
4) /

2) /root

Under the Filesystem Hierarchy Standard (FHS), which directory contains information about the system state and processes?
1) /bin
2) /proc
3) /root
4) /tmp

2) /proc

Which directory holds the man files on the system? (enter the full path of the directory)

/usr/share/man

Under the Filesystem Hierarchy Standard (FHS), which directory contains the device files for a Linux system? (enter the full path of the directory)

/dev

Which directory contains data files that change constantly, including e-mail, print jobs, and proxy cache files? (enter the full path of the directory)

/var/

Which of the following represent the root directory?
1) /
2) /root
3) /boot
4) /home/root

1) /

Which of the statements describe file globbing?
1) Indexing files for the locate command.
2) Displaying which commands use specific files.
3) Using wildcards to match specific files.
4) Determining the category of the file or command.

3) Using wildcards to match specific files.

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/locatedb file? (enter the command as if at the command prompt)

updatedb

Which of the following files will be displayed when using the egrep exhibit[0-9]+ ~/samps command? (select two)
1) exhibit1
2) exhibita45
3) exhibit1a12
4) exhibit125

1) exhibit1 4) exhibit125

You need to find all files in the /home/gshant directory that are larger than 300k. You change directories to /home/gshant. What command should you use? (enter the command as if at the command prompt)

find -size+300k

You need to find a specific file on your linux system. Which of the following commands should you use? (select two)
1) locate
2) find
3) which
4) whereis

1) locate 2) find

Which of the following utilities displays the category of a command?
1) whereis
2) type
3) which
4) find

2) type

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?
1) grep -e dblair /etc/passwd
2) grep -e dblair /etc/group
3) members dblair
4) group dblair

2) grep -e dblair /etc/group

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, end with a y, and be the last string on the line. Which regular expression should you use with grep?
1) "&g…y"
2) "g..y.$"
3) "g..$.y"
4) "g…y$"

4) "g…y$"

You have an application called ABCD that is generating system errors when it starts. Which command is the best to search the system message log file for errors?
1) grep ABCD /var/log/messages
2) display ABCD /var/log/messages
3) tail -n25 /var/log/ABCD.log
4) tail -n25 /var/log/messages
5) top /var/log/ABCD.log

1) grep ABCD /var/log/messages

What is the purpose of the find command?
1) Display the path to the binary files, the manual pages, and the source code.
2) Search for files in the file system based on name, file size, time created, and other options.
3) Display the path to a command and determine whether a package is installed.
4) Search an index file for specific parameters.

2) Search for files in the file system based on name, file size, time created, and other options.

You need to configure a few changes to how the locatedb index file is created. Which file should you edit? (enter the full path of the file)

/etc/updatedb.conf

Which of the following commands would you use to find all of the files on the system that have either blue or gold in their names?
1) find . -name ‘<b>b</b>’ -o ‘<b>gold</b>’
2) find / -print0 ‘<b>blue</b>’ -o ‘<b>gold</b>’
3) find .. -name ‘<b>blue</b>’ -o ‘<b>gold</b>’
4) find .. -print0 ‘<b>blue</b>’ -o ‘<b>gold</b>’

2) find / -print0 ‘blue’ -o ‘gold’

Which single command should you use to find the path and manual pages for the mycustomapp program?
1) whereis -b mycustomapp
2) whereis -m mycustomapp
3) whereis -s mycustomapp
4) whereis mycustomspp

4) whereis mycustomspp

You need to quickly see all of the lines in the blue_and_gold text file that do not reference Karen. Which command would you use to accomplish this?
1) grep -n Karen blue_and_gold
2) grep -v Karen blue_and_gold
3) grep -n blue_and_gold Karen
4) grep -v blue_and_gold Karen

2) grep -v Karen blue_and_gold

Which of the following utilities would you use to search the path for files matching a given name?
1) cat
2) type
3) tail
4) locate

4) locate

Which of the following commands finds files with the .txt extension in the /home/gshant directory
1) find /home/gshant -name ‘<b>txt</b>’
2) find /home/gshant -name ‘*.txt’
3) find /home/gshant -type d -name ‘<b>text</b>’
4) find /home/gshant -type f -name ‘<b>text</b>’

2) find /home/gshant -name ‘*.txt’

You use a program on your Linux system named photorec. Which command will display the path to the photorec binary file? (enter the command as if at the command prompt)

which photorec

Which of the following files would not be found by the locate -i LibraryFines.csv command?
1) 1 libraryFines.csv
2) LibraryFines.csv
3) Libraryfines.csv
4) libraryfines.csv
5) libraryfines.csv1

5) libraryfines.csv1

You are searching the standard input for any line containing JAMESTOWN at the end of a line. Which egrep constructor should you use? (type the command as if at the command prompt)

egrep JAMESTOWN $

Type the full device file name for the second partition on the hard drive with the lowest ID number?

/dev/sda2

You have put a new hard disk in your system and created two primary partitions (sbd1 and sbd2) and one extended partition (sbd3). You have just formatted sbd1 with ext3 and sdb2 as a swap area. When you try to format sbd3 as a swap area, you are unable to. What is the problem?

You cannot format an extended partition.

You are preparing to use a logical volume with LVM. Which of the following commands initializes a physical volume?

pvcreate

You are using LVM on your Linux system to manage the existing volumes. What commands scans for logical volumes on the system?

lvscan

You are using LVM on your Linux system to manage the existing volumes. After adding and initializing the fourth hard drive to the system and creating a physical volume, you need to add it to the backup volume group. What command should you use?

vgextend backup /dev/sdd

How many primary partitions can you create on a single hard disk drive?

4

Which hexadecimal code represents an extended partition?

0x85

You have added a second hard disk to your Linux system. Which of the following commands will allow you to partition the new drive?

fdisk /dev/sdb

You want to view partition information for your sda device. Which commands could you use to view the partitions defined on sda?

fdisk /dev/sda, then press p fdisk -l

You are preparing to use a logical volume with LVM. Which of the following commands creates a volume group named backup on the third disk in the system?

vgcreate backup /dev/sdc

The the full device file name for the first partition on the hard drive with the third lowest ID number.

/dev/sdc1

You have a system with a single hard disk. You add a new hard drive to your system. Which of the following commands would you use to partition the new drive?

fdisk /dev/sdb

How many logical partitions can you create on an extended partition?

Unlimited

Which of the following device file names represent the second local terminal on the system?

/dev/tty2

Which directory contains device files for hard drives, optical drives, and USB devices?

/dev

While reading about the file permission in Linux you discover that the default permissions assigned to new files when they are created in the rw-rw-rw (666 octal) and new directories are rwxrwxrwx (777 octal), However, whe you create a new file in a directory called /data the permissions assigned are rw-r–r–, Why is this?

The unmask must be set to 0022 and therefore block the write permission for the group owner and everyone else.

What is the result of the nohup gedit &amp; command?

gedit will start in the background and persist in the background after logging out of the shell.

A developer calls with a problem. They were trying to debug a new daemon and mistakenly placed it on the production machine instead of the lab machine. It has now entered runaway mode. The PID number is 2345 and attempts have been made to remove it and wit the standard kill command but it will not stop.

Which command would you use to be assured that the process will terminate?

kill -9 2345

After a severe lightning strike nearby, a number of processes seem to be running on the server in runaway mode. Which utility terminates these processes by name and not just by process ID number.

killall

Which command would you used to assign a new priority to a process that has already started? (Tip: Enter the command as if at the command prompt.)

renice

You want to view all currently-running processes that include getting in the process name. Which command would you use?

ps -A | grep getty

Drag the permission string on the left to the category on the right. (Tip: Some Permission strings will not be used)

Symbolic Link: lrwxrwxrwx Hard Link: -rwxr-xr-x

You want to mount a number of filesystems each time the system is brought up. Which configuration file should hold the configuration information for the filesystems to be mounted?

/etc/fstab

You are compressing a file with the tar utility, but you need to ensure you can uncompress the file with the bzip2 utility. Which tar option should you use during this file compression

-j

Which of the following commands is the fastest method to search a file for fixed strings rather than regular expressions.

fgrep

You need to create a large number of files and would like to ensure that yo, the user owner, are the only one that has read and write permissions to the files. The files will be located in a number of different directories that already contain files that you don’t want their permissions modified. How could you create these files with the correct permissions using the least amount of effort?

Type umask 0066 to change your umask

You need to see a listing of running processes and system status such as memory and CPU usage. Which command will produce the listing?

top

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

/etc/init/rc-sysinit.conf

Which of the following commands displays the contents of wordlist1 and wordlist2 then sorts the combined contents to the monitor and a file named sortedwords.

cat /usr/wordlist1 /usr/wordlist2 | sort | tee sortedwordlist

Drag the term on the left to match the characteristic on the right (Tip: you may use the term more than once)

Has a .so or .so.version extension: Dynamic Library Increase the size of the application Static Library Has an .a filename extension Static Library Are typically stored in /usr/lib/ and /usr/local/lib/ Dynamic Library Can degrade program load time if the library isn’t already in use by another program Dynamic Library

You have added several new hard disks to your system. After partitioning and formatting you have modified a configuration file to mount these new file systems automatically. You want to document the change you made. What file would you document?

/etc/fstab

You have an application whose owner is root but you want all users to execute the application with root user permissions. Which of the following examples whows correct usage of the SUID flag?

-rw3r–r 3 root sys 73748 Nov 2 2005 /usr/bin/applicationx

You need to view the contents of the /home/jerrys directory. Which command will show all the contents, including hidden files and directories? (Tip: Only include the necessary command options.)

ls -a /home/jerrys

Which directory contains device files for hard drives, optical drives, and USB devices? (Tip: Include the entire path.)

/dev

You have successfully partitioned the fourth hard drive into 2 primary partitions. You need to format the second partition with the ext3 filesystem. Which command will work?

mke2fs -j /dev/sdd2

You are using YUM, and you need to determine which package contains the /usr/lib/libstiport_gcc.so file. Which command should you type at the command prompt? (Tip: Enter the command as if at the command prompt.)

yum whatprovides /usr/lib/libstlport_gcc.so

Which of the following utilities will substitute an existing with a new string within a file?

sed

You need to set the SUID permission on a file named rider. Which of the following commands will accomplish this?

chmod 4777 rider

Which sed flag or optiono allows you to exchange on string of characters for another string of characters in a file?

s

Which Directory allows you to name devices when they are connected to the system? (Tip: Enter the full path to the directory.)

/etc/udev/rules.d

Which text stream processing command filters identical, adjacent lines from a single file?

uniq

Which dpkg option lists information about a currently installed Debian package? (Tip: Enter the command as if at the command prompt.)

dpkg -p

Which utility runs at startup to load modules into the kernel?

modprobe

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 , and be the last string in the line. Which regular expression should you use with grep?

g…y$

Which command will query the system for all installed RPM packages?

rpm -qa

Which command transposes characters in a text stream

tr

You need to create the directory /var/oracle/database/9i. Only the directory /var currently exists. From the root of the filesystem which command will create the directory path?

mkdir -p /var/oracle/database/9i

if you are getting your applications and updates in RPM format, which distribution is your system based on?

Red Hat

After losing the 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/locatedb file? (Tip: Enter the command as if at the command prompt)

updatedb

Which command displays information on all USB devices connected to the computer?

lsusb

What is the full path for the Yellowdog Updater Modified (YUM) configuration file? (Tip: Enter the full path)

/etc/yum.conf

You suspect some corruption of files in the /bin directory. What is the proper course to determine if any of the files in the /bin are corrupt?

Use and integrity checking program to check the files in /bin

In the /var directory is a subdirectory called backup. You need to delete the directory backup and any files. You change directory focus to /var. Which command will delete the directory backup and all its files?

rm -rf backuo

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 are logged in as root. You have the file, letter, doc, on a CD in the first compact disk drive. Which command will copy the file from the CD to your home directory

cp /mnt/scd0/letter.doc /root

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

The secondary boot loader.

You are the team lead for a marketing project. Only the members of the team 3 group should have read/write permissions to a document called project_data.doc however you want to ensure that no one on the team will delete the document by accident

Your user name is bsmith
A long listing of the file is as follows:

-rwr-xr-x 1 bsmith team3 7260 June 22 2004 project_data.doc

Which of the following will accomplish this?

chmod 1664 project-data.doc

You need to create an ext4 file system on the first partition on the second disk drive. What command should you use? (Tip: Enter the command as if at the command prompt)

mkfs.ext4 /dev/sdb1

Which of the following statements best describes the nl -s ":" myfile command?

nl adds the number, a colon, and a space to the front of each line in the file.

Which of the following statements are true regarding the apt-get utility? (Select two)

apt-get is similar to yum utility on an RPM distribution apt-get uses /etc/apt/sources.list to find information about the application repositories.

A service specialist from your company calls you from a customer;s site. They are attempting to install an upgrade to the software, but it will not install, reporting that it cannot do so until all non-care services are stopped. You cannot remotely access the machine, but the representative tells you that there are only four processes running and their PID numbers are 1, 10, 100, and 1000.

With no further information available, which command would you recommend the representative run?

kill 1000

What are two methods to exit vi from the command mode? (Select two. Each answer is an independent solution)

Type ZZ Type :wq

Which command would you use in a script to parse out entries that contain the word those from a file named config in a folder named diet beneath the /etc.directory

grep those /etc/diet/config

Which of the following commands displays all of the shared library information for the /bin/bash executable?

ldd -v /bin/bash

You have installed a package called mathpac with apt-get. After a system upgrade, the package is not working correctly. Which command is the most correct option to get the package to work?

apt-get upgrade mathpac

The /home/gshant/smp directory is empty and needs to be removed. You change directories to /home/gshant. Which command should you use? (Tip: Enter the command as if at the command prompt.)

rmdir smp

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 the Yellowdog Updater Modified (YUM) utility to check specific URLs for RPM repositories. Where should you add the URLs

Within the /etc/yum.conf file

Which directory contains the configuration file for GRUB?

/boot

What command should you enter to see a list of all the command you recently used at the command prompt?

history

Which command will display all the environment variables on the system?

set

You have a SCSI tape drive st0. You want to backup the contents of /var/oracle. Which command will perform the backup?

tar -vcf /dev/st0 /var/oracle

Which of the following directories is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable, such as USB storage media, DVD’s, CD-ROM’S and Zip disks?

/media

What is the typical default umask value

022

You have previously installed package ‘mplayer’ and wish to remove it from your computer. Which of these methods is the best?

Run the command rpm -e mplayer-1.0-0.20.pre4.1.fc2.fr.i386 to uninstall mplayer.

You are providing telephone support for a user who is swapping out an old CRT SVGA monitor with a new LCD SVGA monitor. He’s not sure which connector on the back of the PC is used for the monitor. How would you like to describe the connector that he should look for?

D-shaped with 36 pins
D-shaped with 15 pins
Round with 6 pins
Round with 9 pins

D-shaped with 15 pins

You are looking at a female TRS connector on the computer. What device uses this connector?

Joystick
Speaker
External modem
Thumb drive

Speaker

You are looking at a high-density (three-row) female DB-15 connector on the computer as shown in the figure. What device uses this connector?

USB storage devices
External modems that use a serial port
IEEE 1284 printers
VGA/SVGA monitors

VGA/SVGA monitors

You are helping a customer over the phone who needs to connect a monitor that uses a digital interface. Which port should you instruct her to look for on the back of her PC?

DVI
Firewire 6-pin
Serial DB-15
SVGA DB-15 3-row

DVI

A D-shaped, 25 pin female port on the back of a computer is a:

Game port
Parallel port
Monitor port
Serial port

Parallel port

The Sidebar is a feature of which Windows version(s)?

-Windows Vista
-Windows Vista and Windows 7
-Windows XP, Windows Vista, and Windows 7
-Windows XP

Windows Vista

You are used to using a computer running Windows XP Professional. You want to upgrade to the latest operating system, but want to use the classic style for the Start Menu. You want to upgrade to the latest version possible. What should you do?

-Upgrade to Windows Vista; choose the Windows Classic theme.
-Upgrade to Windows 7; customize the Start menu settings.
-Upgrade to Windows Vista; customize the Start Menu settings.
-Upgrade to Windows 7; choose the Windows Classic theme.

Upgrade to Windows Vista; customize the Start Menu settings.

Which Windows version(s) include the following features: Flip 3D, Gadgets, Snap, and Peek?

-Windows XP, Windows Vista, and Windows 7
-Windows Vista
-Windows 7
-Windows Vista and Windows 7

Windows 7

Which component of Windows 7 prompts the user for credentials or permission to minimize the dangers of unintended software installations?

User Account Control (UAC)
Firewall with Advanced Security
Firewall
Defender

User Account Control (UAC)

Which Windows component can be used to display information such as weather forecasts, time, and news headlines on the desktop?

Gadgets
Notification Area
User Account Control (UAC)
Computer Management

Gadgets

What command should you enter to see a list of all the commands you recently used at the command prompt?

clear
chsh
uname
history

history

What is the result of the uname -a command?

Shows names of files and directories in the current directory.
All system information is displayed on the screen.
Displays the current working directory.
Displays the current username.

All system information is displayed on the screen.

Your default runlevel on your Linux system is set to textual, multi-user mode; however, you want the X Windows System to launch when you log into the system. Which file should you edit?

~/.bash_logout
~/.bash_log
~/.profile
~/.bash_login

~/.bash_login

All users at your site are using the Bash shell. You want to set a variable that will apply to every user and always have the same value. Which file would you place this variable in?

/etc/profile
.bash_login
.bashrc
.bash_profile

/etc/profile

You have the myapp executable file. It is found in the current directory, but not in the command path. What should you type at the command prompt to start the myapp file and replace the shell with myapp process?

exec ./myapp

Which of the following files would you use to create aliases that are applied when a specific user starts a BASH session?

~/.profile
~/.bash_logout
/etc/profile
~/.bashrc

~/.profile ~/.bashrc

A user is requesting that each time she logs in, a particular entry be written to a log file. This will only apply to her and she is using the Bash shell. In which configuration file would you make an entry for this action to take place?

.profile
.sh
.bashrc
/etc/profile

.profile

Which command will display the present working directory?

pwd

Which of the following options is the standard shell for most Linux computers?

Korn
C-shell
Bourne-again shell (bash)
tcsh
Bourne shell

Bourne-again shell (bash)

After a user starts a BASH session and the scripts in /etc/profile are applied, what is next file that could affect the shell session?

~/.bash_login
~/.profile
~/.bash_logout
~/.bash_profile

~/.bash_profile

You have an executable file named ni that allows you to save a snapshot of your network information with the date and time into a log file. The file is in the /root directory, and /root is the current working directory. How would you run the executable file? (Select two)

ni
source ni
/root/ni
./ni

/root/ni ./ni

You are working at the command line and need to start a new Bourne-again shell (bash) session. What should you type?

bash

You are working on a Linux system and need more information about the uname command. What command should you use to learn about the uname command syntax and options.

man uname

Which of the following commands could you use to search man pages for a specific keyword (select three)

man -k
whatis
find
slocate
apropos

man -k whatis apropos

Which command shows the value of the environmental variable currently set for the terminal?

echo %TERM
echo TERM
echo $TERM
echo %TERM%

echo $TERM

Which command will display all the environment variables on the system?

set

Which command will display only the environment variables applied to child sessions?

env

You want to view the number of commands your HISTSIZE environment variable is set to save. You don’t want to have to scroll through all the environment variables. Which command shows you the value for the HISTSIZE variable?

cat $HISTSIZE
cat /etc/profile | grep "HISTSIZE"
echo $HISTSIZE
HISTSIZE =

echo $HISTSIZE

You want the directory /sbin/special to always be a part of the PATH. You also want to keep all the current entries in your PATH statement. Which of the following commands would you use?

PATH=$PATH:/sbin/special
PATH=PATH&amp;/sbin/special
PATH=$PATH:$/sbin/special
PATH=/sbin/special

PATH=$PATH:/sbin/special

What line must you add to /etc/profile to make sure /sbin/custom is always part of the PATH, but also keep all the current entries in the PATH statement?

PATH=$PATH:/sbin/custom; export PATH

You need to set the COMP variable to the value 1745. Which command will set the variable so it is available to other shell programs?

COMP=1745
set COMP to 1745
export COMP=1745
set COMP=1745

export COMP=1745

Two users should have identical settings, yet one is having problems with the display on his screen and you suspect there is a difference in their environment variables. Which command will display all the environment variables?

display
echo
print
env

env

Which of the following presents the greatest security risk?

There are several disabled user accounts.
The second field for every user in the /etc/passwd file is x.
The system has a large file named core.
The PATH statement includes .(period)

The PATH statement includes .(period)

Which of the following statements best describes the PATH environment variable?

It specifies the characters the shell uses to indicate normal user ($), root user (#) and similar items.
It specifies the filename where past commands are stored.
It contains the path of the current working directory.
It contains the directory prefixes used to search for programs and files.

It contains the directory prefixes used to search for programs and files.

Which environment variable affects the number of past commands used in the current shell session?

HISTSIZE

You recently used the HOST=FS4 command. What command should you use to make the environment variable to apply to all child sessions?

unset HOST
env HOST
set HOST
export HOST

export HOST

Which of the following commands will configure the shell to retain 300 recently-used commands in the ~/.bash_history file for multiple shell sessions?

HISTFILE=300
BASH=300
HISTSIZE=300
HISTFILESIZE=300

HISTFILESIZE=300

Which of the following commands will create a shortcut to the tail -f /var/log/messages command?

alias sysmesg="tail -f /var/log/messages"
export alias sysmesg="tail -f /var/log/messages"
export alias= "tail -f /var/log/messages"
env alias="tail -f /var/log/messages"

alias sysmesg="tail -f /var/log/messages"

After opening a file in vi, you want to switch from command mode to command line mode. What key should you enter?

:

You have opened the /root/myscript file in vi. While looking at the file, your soda spilled, and you hit several keys on the keyboard trying to pick it back up. There are extra characters everywhere in the file, and you know you can’t fix it. How do you exit vi without saving the changes?

:q!
:wq
😡
:q

:q!

While in command mode, you copied a whole line of text to memory. You navigated to a different location in the file, and now you need to place the line of text. What command should you use?

cc
p
dw
u

p

You are editing a text file with vi and need to open a new line above the one you are currently working on. What key should you press to accomplish this?

i
p
a
o

o

The initial vim mode used when vim is started. It has commands that cut and replace text, and it is the mode vi uses to enter the other modes.

command mode

The mode that works with the file system. Use it to save files after editing them.

Command line mode

The mode that vim uses to write and edit text in the file.

edit mode

Which of the following commands will cut an entire line from a file while in vi command line mode?

yy
de
C
dd

dd

You made a few changes to the /grub/grub/grub.conf file and now you need to exit out of insert mode, save the changes, and quit. What should you do? (select two)
Type :w!
Type :q!
Press Esc
Type :wq

Press Esc Type :wq

What are two methods to exit vi from command mode? (select two)

Type yy
Type :e!
Type ZZ
Type :wq

Type ZZ Type :wq

While in command mode, you need to find the term Sam. Which command should you use?

/Sam

Which key combination should you press in vi to save the file you are working and quit?

:wq
s
S
:q

:wq

A friend sent you a shell script file that is 117 lines long. He says that he wants you to examine code on lines 82 through 87. What command in command line mode takes you directly to line 82?

82

While in vi command mode, you need to copy an entire line of text. What command should you use?

yy

Command to move the cursor up a line.

k

Command to move the cursor one space to the left.

h

Command to move the cursor one space to the right.

l

Command to move the cursor down a line.

j

You need to create a new text file with the name network.txt in the current directory. Which command starts vi and creates the file?

vi :w network.txt
vi -new network.txt
vi -n network.txt
vi network.txt

vi network.txt

You are trying to debug a shell script called myscript and to aid you in this task you would like to have the output of the script be recorded in a text file. Which of the following commands would you satisfy your requirements?

echo myscript &gt;&gt; testfile.txt
myscript | testfile.txt
myscript &gt;&gt; testfile.txt
myscript | echo | testfile.txt

myscript >> testfile.txt

Which symbol uses the output of one command as the input of another command?

|

Which of the following commands displays the contents of wordlist1 and wordlist2 then sorts the combined contents, then sends the results to the monitor and a file names sortedwordlist?

cat /usr/wordlist1 /usr/wordlist2 | sort sortedwordlist
cat /usr/wordlist1 /usr/wordlist2 | tee sortedwordlist
cat /usr/wordlist1 &gt;&gt; /usr/wordlist2 | sort sortedwordlist
cat /usr/wordlist1 /usr/wordlist2 | sort | tee sortedwordlist

cat /usr/wordlist1 /usr/wordlist2 | sort | tee sortedwordlist

What will be the effect of the following command?
ls -l /usr/bin &gt;&gt; /tmp/list.txt

The contents of the /usr/bin directory will be redirected into a file called /tmp/list.txt, inserted after previous contents of the file.
The contents of the /usr/bin directory will be appended to the file called /tmp/list.txt and then the contents of /tmp/list.txt will be output to the screen.
The contents of the /usr/bin directory will be redirected into a file called /tmp/file.txt, overwriting the previous contents of the file.
The contents of the /usr/bin directory will be redirected into a file called /tmp/list.txt, inserted before the previous contents of the file.

The contents of the /usr/bin directory will be redirected into a file called /tmp/list.txt, inserted after previous contents of the file.

Which command reads from standard input and writes to standard output and files?

tee

You are trying to debug a shell script that has the command ls -s in it. You suspect an error is occurring here and want to send the results of the operation (successful or error) to a file named Friday in order to examine it later. Which of the following commands should you use?

ls -s &gt;&gt; Friday
ls -s Friday
ls -s &gt; Friday
ls -s&gt; Friday 2&gt;&amp;1

ls -s> Friday 2>&1

Which of the following commands redirects standard output to standard error?

cat txtfile 1&gt;&amp;2
cat txtfile | 2
cat txtfile 2&gt;&amp;1
cat txtfile | tee 2

cat txt 1>&2

Which command overcomes the 128 KB shell command size restriction by breaking up long lists of arguments?

xargs

Which of the following commands sorts the contents of wordlist1 and wordlist2 and sends the result to standard output?

cat /usr/wordlist1 &gt; /usr/wordlist2 | sort
cat /usr/wordlist1 &gt;&gt; /usr/wordlist2 | tee
cat /usr/wordlist1 | /usr/wordlist2 | sort
cat /usr/wordlist1 /usr/wordlist2 | sort

cat /usr/wordlist1 /usr/wordlist2 | sort

Which of the following commands will give the same results as cat &lt; turbo?

cat t&gt; turbo
cat turbo
cat 2&gt; turbo
cat 1&amp;2&gt; turbo

cat turbo

You have a system with a single hard disk. You add a new hard drive to your system. Which of the following commands would you use to partition the new drive?

fdisk /dev/sda
fdisk /dev/sd0
fdisk /dev/sd2
fdisk /dev/sd1
fdisk /dev/sdb

fdisk /dev/sdb

You want to view partition information for your sda device. Which commands could you use to view the partitions defined on sda? (Select two)

cat /etc/part
cat /proc/part
fdisk /dev/sda, then press p
fdisk -l

fdisk /dev/sda, then press p fdisk -l

You are preparing to use a logical volume with LVM. Which of the following commands initializes a physical volume?

pvscan
vgcreate
lvcreate
pvcreate

pvcreate

You have put a new hard disk in your system and created two primary partitions (sdb1 and sdb2) and one extended partition (sdb3). You have just formatted sdb1 with ext3 and sdb2 as a swap area. When you try to format sdb3 as a swap area, you are unable to. What is the problem?

You cannot format an extended partition.
The swap area must be on the first partition on a drive.
You cannot format an extended partition as a swap area (you must use a primary partition).
You can only have one swap area on a single drive.

You cannot format an extended partition.

You are using LVM on your Linux system to manage the existing volumes. What command scans for logical volumes on the system (Type the command as if at the command prompt)

lvscan

Which hexadecimal code represents an extended partition?

0x82
0x85
0x83
0x88

0x85

You are using LVM on your Linux system to manage to existing volumes. After adding and initializing the fourth hard drive to the system and creating a physical volume, you need to add it to the backup volume group. What command should you use? (Type it as if at the command prompt)

vgextend backup /dev/sdd

Which of the following device file names represent the second local terminal on the system?

/dev/tty2
/dev/ttyS2
/dev/fd2
/dev/sda2

/dev/tty2

You are preparing to use a logical volume with LVM. Which of the following commands creates a volume group named backup on the third disk in the system?

vgcreate backup /dev/sdc
vgcreate /dev/sdc backup
lvcreate backup /dev/sdc
vgextend /dev/sdc backup
pvcreate /dev/sdc backup

vgcreate backup /dev/sdc

Type the full device file name for the first partition on the hard drive with the third lowest ID number.

/dev/sdc1

How many primary partitions can you create on a single hard disk drive?

4
Unlimited
2
8

4

Which directory contains device files for hard drives, optical drives, and USB devices?

/dev

You have added a second hard disk to your Linux system. Which of the following commands will allow you to partition the new drive?

fdisk /dev/sdc
fdisk /sd0-1
fdisk /dev/sdb
format /dev/sdb1

fdisk /dev/sdb

Type the full device file name for the second partition on the hard drive with the lowest ID number?

/dev/sda2

How many logical partitions can you create on an extended partition?

4
2
Unlimited
1

Unlimited

Which of these Linux filesystems support journaling? (choose four)

XFS
Ext3
Ext2
Ext4
HPFS
reiserFS
VFAT

XFS Ext3 Ext4 reiserFS

During the Linux installation process you are asked to choose the filesystem type for your partitions. Which is the most common Linux filesystem to choose?

JFS
XFS
Ext3
ReiserFS
HPFS

Ext3

Which of the following commands will create an ext2 filesystem on the first primary partition of the third hard drive? (Choose 2)

mke2fs /dev/sdc1
format -ext2 /dev/sdc1
mkext2fs /dev/sdc1
mkfs -t e2 /dev/sdc1
mke2fs -t e2 /dev/sdc1
mkfs -t ext2 /dev/sdc1

mke2fs /dev/sdc1 mkfs -t ext2 /dev/sdc1

You have successfully partitioned the forth hard drive into 2 primary partitions. You need to format the second partition with the ext3 filesystem. Which command will work?

format -e3 sdb2
mke2fs -e3 /dev/sdd2
mke2fs -j /dev/sdd2
fdisk -e3 /dev/sdb2

mke2fs -j /dev/sdd2

Which file system is a FAT32 filesystem for Linux?

VFAT

You have a Linux system with two activated swap partitions: sda3 and sdb2. Which of the following commands can you use to deactivate the sda3 swap partition?

swapoff sda3
swapoff /dev/sda3
swapoff -a
fdisk d /dev/sda3

swapoff /dev/sda3

You need to create an ext4 file system on the first partition on the second hard disk drive. What command should you use? (Enter command as if at command prompt)

mkfs.ext4 /dev/sdb1

You are assembling a workstation. The system requirements show that this system will be used primarily to store documents of small size. What is the best Linux filesystem to install?

ReiserFS
Ext3
HPFS
Ext2

ReiserFS

You created a swap area on sad, but it is not activated. Which command should you use to activate the swap partition? (Enter command as if at command prompt)

swapon /dev/sda3

You have partitioned and formatted a new hard drive, sdc. You want to mount the first partition on src to directory /mnt/newdisk. Which command will perform the mount correctly?

mount /dev/sdc /mnt/newdisk
mount /dev/sdc1 /mnt/newdisk
mount /mnt/newdisk /devsdc1
mount /dsk/sdc_first /mnt/newdisk
mount /sdc1 /mnt/newdisk

mount /dev/sdc1 /mnt/newdisk

Which of the following gidrectories is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable media, such as USB storage media, DVDs, CD-ROMs, and Zip disks?

/mount
/mnt
/
/media

/media

Which of the following is not true about mount points?

Mount points should always be empty directories.
/mnt is a directory that contain mount points for temporarily mounted filesystems.
The /home directory must be attached to the system with a mount point before use.
Mount points use the partitions represented by device files located in the /lib directory.

Mount points use the partitions represented by device files located in the /lib directory.

Which file shows the currently mounted volumes?

/etc/mtab
/etc/mount
/etc/mount.conf
/etc/fstab

/etc/mtab

You are trying to umount /dev/sdd3 but are receiving a device is busy error message. What can you do to try to unmount the file system? (choose all that apply)

Find and close any open files on the file system, and try to unmount again.
Reboot the system because the file system is locked.
Edit /etc/fstab and remove the mount. Try unmount again.
Make sure your current working directory is not on the file system and try to unmount again.
Use the fscls command to close any open files on the filesystem. Try to unmount again.

Find and close any open files on the file system, and try to unmount again. Make sure your current working directory is not on the file system and try to unmount again.

A user is trying to access a file system mounted at /mnt/sdb1 but receives an error No such file or directory. Which commands can you use to see the current mount points? (choose two)
mount
mntfs
fsck
mntchk
df
mounts

mount df

Yesterday you created a new swap area for your system. Today, after rebooting the system, you find the swap area is not mounted. What should you do to ensure the swap area is mounted each time the system boots?

Edit /etc/mtab and add the swap partition.
Remount the swap area. Then run export mount to make the change persistent.
Run the mount -auto command and identify the swap area partition.
Edit /etc/inittab and add the swap area.
Edit /etc/fstab and add the swap partition.

Edit /etc/fstab and add the swap partition.

Partition /dev/sdb2 is mounted to /mnt/temp. You need to unmount /dev/sdb2. Which commands would you use? (choose two)

dismount /dev/sdb2
unmount /dev/sdb2
umount /dev/sdb2
dismount /mnt/temp
umount /mnt/temp

umount /dev/sdb2 umount /mnt/temp

You need to configure your Linux system to allow only the root user account to mount the CD-ROM device. Which of the following options should you add to the /etc/fstab file?

/dev/cdrom /media/cdrom -t iso9660 ro,users,noauto
/dev/cdrom /media/cdrom -t iso9660 ro,user,noauto
/dev/cdrom /media/cdrom -t iso 9660 ro
/dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto

/dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto

You have added several new hard disks to your system. After partitioning and formatting you have modified a configuration file to mount these new filesystems automatically. You want to document the change you made. What file would you document?

/etc/modules.conf
/etc/crontab
/etc/inittab
/etc/fstab

/etc/fstab

You need to mount the CD-ROM device to the /media/cdrom directory. What command should you use?

mount /dev/cdrom /media/cdrom

Where is the file system table located on a Linux system?

/etc/fstab

A number of new filesystems have been added to the server and you want them to be active now. You also do not want to bring the server down. Which command makes the changes active?

mount -t
mount -a
mount -r
init q

mount -a

You want to mount a number of filesystems each time the system is brought up. What configuration file should hold the configuration information for the filesystems to be mounted?

/etc/fstab
/etc/profile
/etc/inittab
/etc/mount

/etc/fstab

You are preparing to mount a device local to your system. Which directory holds the device files?

/opt/dev
/local/dev
/dev
/devices

/dev

Which of the following commands make sales the group owner of the /sales/report file? (Select two)

chgroup sales /sales/report
chown :sales /sales/report
chmod .sales /sales/report
chown .sales /sales/report

chown :sales /sales/report chown .sales /sales/report

Which command will change the group ownership for the devstyle.txt file to rand in the present working directory?

chgrp rand devstyle.txt

There is a directory called projects owned by the user cmarcela and the group rd. charcoal has left the company, so you need to give ownership of the projects directory, its file, and subdirectories to the user beats, who is a member of the mgmt group. Which command should you use to change the user ownership?

chown .ebates projects
chown beats projects
chgrp -R mgmt projects
chown -R ebates.mgmt projects
chown -R ebates projects

chown -R ebates projects

What is the typical default umask value?

0022

You have an application whose group is sys but you want all users, whether or not they are members of the sysadmin group, to execute the application with sysadmin group permissions. Which of the following examples shows correct usage of the SGID flag?

-rwxr-sr– 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx
-rwxr–r-s 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx
-rwsr–r– 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx
-rwxr-sr-s 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx

-rwxr-sr– 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx

While reading about file system permissions in Linux you discover that the default permissions assigned to new files when they are created are rw-rw-rw- (666 octal) and new directories are rwxrwxrwx (777 octal). However, when you created a new file in a directory called /data the permissions assigned are rw-r-r-. Why is this?

-There are more restrictive permissions assigned to the /data directory and any new files created inside that directory will inherit the more restrictive permissions.
-The umask must be set to 0022 and therefore block the write permission for the group owner and everyone else.
-You are logged in as the root user and all files created by the root user are assigned these permissions. Only normal users get rwxrwxrwx (777 octal) permissions on newly created files.
-Because you are logged in as a normal user and not the root user all files that you create will be created with a more restrictive set of permissions.

-The umask must be set to 0022 and therefore block the write permission for the group owner and everyone else.

Which set of permissions represent the minimal permissions required to allow a user to list the contents of a directory?

rw-
rwx
r–
r-x

r-x

You must change ownership of a script called my script so that only the user owner has read/write access to it and only the user owner and group owner have execute permissions. Which of the following commands would accomplish this?

chmod 611 myscript
chmod 755 myscript
chmod 750 myscript
chmod 771 myscript

chmod 750 myscript

Which of the following sets of octal permissions would allow everyone to execute the following file as if they were the root user?
-rwxr-xr-x 1 root root 8045 July 24 2004 myscript

1655
0755
4755
4744

4755

You are called into the office of a newly hired manager. He has copied a file from his old place of work onto his new workstation, but is now receiving an error message that access is denied each time he tries to access the file. He is not the owner of the file, and not a member of the group the file is associated with. Which of the following represents the least set of file permissions needed for him to be able to read and write to the file?

111
222
444
666

666

Setting the SUID flag is a powerful and useful feature. It can have weaknesses associated with its use. Which of the following statements identifies a weakness?

-There are no weaknesses to using a SUID flag.
-Setting the SUID flag for an application or process owned by the root user is a potential security hole.
-Only twelve applications or processes may be run at the same time by setting the SUID flag for root user permissions.
-Setting the SUID flag is a one-time event that reverts after execution, forcing the root user to reset the flag every time.

-Setting the SUID flag for an application or process owned by the root user is a potential security hole.

You need to set the SUID permission on a file named rider. Which of the following commands will accomplish this?

chmod 2777 rider
chmod 1777 rider
chmod 4777 rider
chmod rider 1777

chmod 4777 rider

Which of the following special permissions will prevent a file’s deletion by anyone except the file owner?

Umask
Sticky bit
SGID
SUID

Sticky bit

A user calls the help desk. Each time he creates a new text file, permissions of 640 are applied to the file and he must use chmod to set them to 644. What command should you enter in the user’s profile to set the default permission for newly created files to 644?

umask 640
umask -640
umask 0022
umask 0027

umask 0022

You have just installed a new program that will be used by all users on the computer. After installation, you log in as a regular user and you try to run the program. The program stops and displays the following error:
Error: not running as root
What should you do so that all users can run this program?

Have users run the program using the su -c command.
Set the SUID on the program.
Make all users members of the root group.
Add users to the sodoers file. Tell them to run the program using the sudo command.

Set the SUID on the program.

You have a critical file called yearend.xls. You want to set file permissions so that only the owner of the file can modify it and only group owners can read it. Which permission listed below will accomplish that?

-r–r–r– 1 george acctg 26256 June 1 04:16 yearend.xls
-r-xr-x— 1 george acctg 26256 June 1 04:16 yearend.xls
-rw-r—– 1 george acctg 26256 June 1 04:16 yearend.xls
-rwxrwxr– 1 george acctg 26256 June 1 04:16 yearend.xls

-rw-r—– 1 george acctg 26256 June 1 04:16 yearend.xls

A file named acct. need to have the SGID permission set on it while keeping all other permissions at their present value. Which of the following commands will accomplish this?

chmod 1777 acctg
chmod s+g acctg
chmod +g acctg
chmod g+s acctg

chmod g+s acctg

You need to create a large number of files and would like to ensure that you, the user owner, are the only one that has read and write permissions to the files. The files will be located in a number of different directories that already contain files that you don’t want their permissions modified. How could you create these files with the correct permissions using the least amount of effort?

-Type umask 6600 to change your umask.
-Type umask 0066 to change your umask.
-Run chmod -R 600 on all of the directories in which you created the new files.
-Make a list of all the files you created and run umask 0066 on each of them to change their permissions.

-Type umask 0066 to change your umask.

You are the team lead for a marketing project. Only the members of the team3 group should have read/write permissions to a document called project_data.doc however you want to ensure that no one on the team will delete the document by accident.

Your user name is smith.
A long listing of the file is as follows:
-rwxr-xr-x 1 bsmith team3 7260 June 22 2004 project_data.doc

Which of the following commands would accomplish this?

chmod 744 project_data.doc
chgrp bsmith project _data.doc
chmod 1664 project_data.doc
chown :bsmith project_data.doc

chmod 1664 project_data.doc

You need to restore a file, yearend.xls, from the archive 013004.tar.gz in the backup directory. The file needs to be restored to /home/accounting. Which command will perform the restore?

extract -xzvf /backup/013004.tar.gz /home/accounting/yearend.xls
unzip -xzvf /backup/013004.tar.gz /home/accounting/yearend.xls
tar -xzvf /backup/013004.tar.gz /home/accounting/yearend.xls
tar -zvf /backup/013004.tar.gz /home/accounting/yearend.xls

tar -xzvf /backup/013004.tar.gz /home/accounting/yearend.xls

You need to backup Jane’s files in her /home/user/jane directory. Which command will create an archive in the /root directory? (select two)

tar -cbvf /root/jane.tbz /home/user/jane
tar -cjvf jane.tbz /home/user/jane
tar -cgvf /root/jane/tgz /home/user/jane
tar -czvf /root/jane.tgz /home/user/jane
tar -cvf /root/jane.tar /home/user/jane

tar -czvf /root/jane.tgz /home/user/jane tar -cvf /root/jane.tar /home/user/jane

You have a SCSI tape drive st0. You want to backup the contents of /var/oracle. Which command will perform the backup?

tar -vcf /var/oracle /dev/st0
cp /var/oracle /dev/st0
tar -vcf /dev/st0 /var/oracle
backup /var/oracle /dev/st0

tar -vcf /dev/st0 /var/oracle

You are compressing a file with the tar utility, but you need to ensure you can uncompress the file with the bzip2 utility. Which tar option should you use during the file compression?

-j
-z
-v
-x

-j

Which utility allows you to make an exact copy of a file?

cp
tar
cpio
dd

dd

You need to view the files within /home/gshant/expfile.bz2, but you want to leave the compressed file unchanged. What bzip2 option should you use?

-k

You have a tape archive mounted in /dev/rmt12. You need to get a list of the file contents. Which command will list the contents?

ls -lc /dev/rmt12
tar -tc /dev/rmt12
ls -la /dev/rmt12
tar -tf /dev/rmt12

tar -tf /dev/rmt12`

You want to archive some configuration files to the floppy drive. You are using the cpio utility. Which line will create the archive on the floppy?

cpio -ov /etc/*.conf /dev/rfd0
cpio -ov /dev/rfd0 /etc/* .conf
cpio -cv /etc/*.conf /dev/rfd0
ls /etc/*.conf | cpio -ovd &gt; /dev/rfd0

ls /etc/*.conf | cpio -ovd > /dev/rfd0

You want to restore files with the extension .cfg from an archive called configs.cpio. Which command will perform the restore?

cpio -ivd /mnt/hdd2/configs.cpio &lt; "*.cfg"
cpio -ivd "*cfg" &lt; /mnt/hdd2/configs.cpio
cpio -ivd "cfg" &lt; /mnt/hdd2/configs.cpio
cpio -ivd ".cfg" &lt; /mnt/hdd2/configs.cpio

cpio -ivd "*cfg" < /mnt/hdd2/configs.cpio

If you are getting your applications and updates in RPM format, which distro is your system based on?

Red Hat

You need to install the package apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm. Which commands will perform the installation?

rpm -Uh apt-0.5.15cnc6-1.1.fc2.fr.i386 rpm -ih apt-0.5.15cnc6-1.1.fc2.fr.i386

You have previously installed package ‘mplayer’ and wish to remove it from your computer. Which of these methods is the best?

Run the command rpm -e mplayer-1.0-0.10.pre4.1.fc2.fr.i386

You have an RPM package called mathpac that is not working correctly. You have downloaded the latest package. Which line is the most correct option?

rpm -U mathpac

You have installed a package called mathpac with yum. After a system upgrade, the package is not working correctly. Which command should you try first to get the package to work?

yum update mathpac

You have found a patch for the Samba server on your system. The patch is a package in rpm format. Which is the most correct procedure to install the package?

Download the package. Run rpm -Uvh on the package to install the update.

Which command will query the system for all installed RPM packages?

rpm -qa

What rpm option will override the need to install the dependencies?

rpm –nodeps

You are attempting to install an RPM package on your Linux system, but the system tells you that a newer package is already installed. What command will install the RPM package over the existing, installed package?

rpm –force

Which command will upgrade an RPM package only if an earlier version is already installed on the system?

rpm -F

Before you install an RPM package, you want to verify the authenticity of the package and check the digital signature to ensure it has not been altered. Which command rpm option should you use?

–checksig

Without installing an RPM package, you want to check for all of the package’s uninstalled dependencies. Which command should you use?

rpm –test

Which of the following utilities should you use if you need to extract a file from an RPM package file?

rpm2cpio

Which rpm option will perform an MD5 checksum on the myapp5.4.rpm package?

rpm -V myapp5.4.rpm

1. i586
2. 8.1.3
3. acroread
4. 51.6

1. Architecture type 2. Version number 3. Package name 4. Release number

You need to determine which files are associated with the metacity RPM package. What command should you use?

rpm -ql metacity

What is the full path for the YUM configuration file?

/etc/yum.conf

When managing YUM, where should you place .repo files?

/etc/yum.repos.d/

Which command will download an RPM package without installing it to the system?

yumdownloader

Which yum option displays whether updates are available for RPM packages?

list updates

You are using YUM, and you need to determine which package contains the /usr/lib/libstlport_gcc.so file. Which command should you type at the command prompt?

yum whatprovides /usr/lib/libstlport_gcc.so

You need to remove an RPM package from your system. Which of the following commands could you use?

yum remove yum erase

You have installed a package called mathpac with apt-get. After a system upgrade, the package is not working correctly. Which command is the most correct option to get the package to work?

apt-get upgrade mathpac

Which dpkg option installs a package recursively?

-R

What is the purpose of the dpkg –configure command?

Reconfigure an unpacked package

What is the purpose of the dpkg -l command?

Display all packages with names that match a specified pattern.

Which command will search for packages that have been partially installed on the system?

dpkg -C

Which dpkg option lists information about a currently installed Debian package?

dpkg -p

Which dpkg option completely removes a package and its configuration files?

-P

Which command reconfigures an already installed package?

dpkg-reconfigure

Which of the following statements are true regarding the apt-get utility?

is similar to the yum utility on an RPM distro uses /etc/apt/sources.list to find info about the application repositories.

You need to install a package, but you do not want to manually install all the dependencies for the package. Which command should you use?

apt-get

You want to retrieve information about the Debian package database on the system. Without any command options, which command will provide the information you need?

apt-cache

Which apt-cache option shows the missing dependencies in the package cache?

unmet

What is the result of using the -d option with apt-get?

Packages are downloaded to the system, but not installed.

Which apt-get option upgrades all installed packages to the latest versions in with the information in /etc/apt/sources.list?

upgrade

Which of the following Debian package management utilities provides the front-end for APT?

aptitude

apt-get remove?
apt-get purge?

remove removes a specified package, but leaves the configuration files. purge removes the package and the configuration files.

Type the full device file name for the second partition on the hard drive with the lowest ID number. (enter the command as if at the command prompt)

/dev/sda2

Type the full device file name for the first partition on the hard drive with the third lowest ID number. (enter the command as if at the command prompt)

/dev/sdc1

Which of the following devices file names represents the second local terminal on the system?
A. /dev/tty2
B. /dev/sda2
C. /dev/ttyS2
D. /dev/fd2

A. /dev/tty2

What is the file path and name of the directory that contains device files for hard drives, optical drives, and USB devices?

/dev

You have put a new hard disk in your system and created two primary partitions (sbd1 and sbd2) and one extended partition (sbd3). You have just formatted sbd1 with ext3 and sdb2 as a swap area. When you try to format sbd3 as a swap area, you are unable to. What is the problem?
A. You cannot format an extended partition as a swap area (you must use a primary partition).
B. The swap are must be on the first partition on a drive.
C. You can only have one swap area on a single drive.
D. You cannot format an extended partiton

D. You cannot format an extended partiton

You have added a second hard disk to your Linux system. Which of the following commands will allow you to partition the new drive?
A. fdisk /sd0-1
B. format /dev/sdb1
C. fdisk /dev/sdc
D. fdisk /dev/sdb

D. fdisk /dev/sdb

You want to view partition information for your sda device. Which commands could you use to view the partitions defined on sda? (Select two).
A. fdisk -l
B. fdisk /dev/sda, then press p
C. cat/etc/part
D. cat/proc/part

A. fdisk -l B. fdisk /dev/sda, then press p

You have a system with a single hard disk. You add a new hard drive to your system. Which of the following commands would you use to partition the new drive?
A. fdisk /dev/sdb
B. fdisk /dev/sd0
C. fdisk /dev/sd2
D. fdisk /dev/sd1
E. fdisk /dev/sda

A. fdisk /dev/sdb

Which hexadecimal code represents an extended partition?
A. 0x88
B. 0x82
C. 0x83
D. 0x85

D. 0x85

How many logical partitions can you create on an extended partition?
A. Unlimited
B. 2
C. 4
D. 1

A. Unlimited

How many primary partitions can you create on a single hard disk drive?
A. 8
B. 4
C. Unlimited
D. 2

B. 4

You have installed a new blank hard drive on your system. This is the second drive on the system. This is the second drive on the system so it is represented in the file system by the /dev/sdb file. You need to create GUID partitions on the /dev/sdb drive? (enter the command as if at the command prompt)

gdisk/dev/sdb

With fdisk, you can create a maximum of 4 partitions per disk. What is the maximum number of partitions per disk that can be created using gdisk?
A. 32
B. 64
C. 8
D. 128

D. 128

You have just used the gdisk utility to create 8 partitions on a new hard drive. Which of the following describes the partitions you have just created?
A. All 8 partitions are logical partitions. There are no primary or extended partitions.
B. The first 3 partitions are primary partitions. The fourth is an extended partitions that holds 5 logical partitions, making 8 partitions in total.
C. All 8 partitions are the same. They are just partitions. There are no primary, extended, or logical partitions.
D. The first 7 partitions are primary partitions. The 8th partition is an extended partition that can be used to contain logical partitions.

C. All 8 partitions are the same. They are just partitions. There are no primary, extended, or logical partitions.

What is the name of the partition management utility that will both create GUID partitions and create file systems on those partitions? (enter the command as if at the command prompt)

parted

Which partition management utility can be used to define and change various different GUID partition configurations without committing the configuration to the disk until the w command is used?
A. fdisk
B. parted
C. gdisk
D. guidpart

C. gdisk

You are preparing to use a logical volume with LVM. Which of the following commands initializes a physical volume?
A. pvscan
B. pvcreate
C. vgcreate
D. lvcreate

B. pvcreate

You are preparing to use a logical volume with LVM. Which of the following commands creates a volume group named backup on the third disk in the system?
A. vgcreate backup /dev/sdc
B. vgcreate /dev/sdc backup
C. lvcreate backup /dev/sdc
D. vgextend /dev/sdc backup
E. pvcreate /dev/sdc backup

A. vgcreate backup /dev/sdc

You are using LVM on your Linux system to manage the existing volumes. After adding and initializing the fourth hard drive to the system and creating a physical volume, what command should you use to add it to the backup volume group? (enter the command as if at the command prompt)

vgextend backup /dev/sdd

You are using LVM on your Linux system to manage the existing volumes. What command scans for logical volumes on the system? (enter the command as if at the command prompt)

lvscan

You are using LVM on your Linux system to manage hard disk partitions. What command do you enter to scan for physical volumes on the system? (enter the command as if at the command prompt)

pvscan

You need to create a logical volume named video in the home volume group and give it 2 TB of disk space. Which command would you use to complete this task?
A. lvcreate -L 2T -n video home
B. createlv -L 2T -n video home
C. volcreate -L 2T -n video home
D. lvcreate -L 2T -n home video

A. lvcreate -L 2T -n video home

After creating logical volumes with LVM, what are the next steps you need to do?
A. Create file systems on the volumes and mount them.
B. Give them descriptive names and allocate space to them
C. Scan for logical volumes and extend them.
D. Add them to a volume group and mount the group in the file system.

A. Create file systems on the volumes and mount them.

You have a third hard disk to your Linux system. What command would you use to initialize a physical volume on this disk for later use by the Logical Volume Manager? (enter the command as if at the command prompt)

pvcreate/dev/sdc

During the Linux installation process you are asked to choose the filesystem type for your partitions. Which is the most common Linux filesystem to choose?
A. JFS
B. XFS
C. Ext3
D. HPFS

C. Ext3

You are assembling a workstation. The system requirements show that this system will be used primarily to store documents of small size. What is the best Linux file system to install?
A. Ext2
B. HPFS
C. Ext3
D. Ext4

Which of these Linux file systems support journaling? (choose three)
A. HPFS
B. Ext4
C. XFS
D. VFAT
E. Ext2
F. Ext3

B. Ext4 C. XFS F. Ext3

You have successfully partitioned the forth hard drive into 2 primary partitions. You need to format the second partition with the ext3 filesystem. Which command will work?
A. mke2fs -e3 /dev/sdd2
B. mke2fs -j /dev/sdd2
C. format -e3 sdb2
D. fdisk -e3 /dev/sdb2

B. mke2fs -j /dev/sdd2

Which of the following commands will create an ext2 filesystem on the first primary partition of the third hard drive? (Choose 2)
A. mke2fs /dev/sdc1
B. mke2fs -t e2 /dev/sdc1
C. mkfs -t ext2 /dev/sdc1 mke2fs /dev/sdc1
D. format -ext2 /dev/sdc1
E. mkfs -t e2 /dev/sdc1
F. mkext2fs /dev/sdc1

A. mke2fs /dev/sdc1 C. mkfs -t ext2 /dev/sdc1 mke2fs /dev/sdc1

You created a swap area on sad, but it is not activated. Which command should you use to activate the swap partition? (Enter command as if at command prompt)

swapon /dev/sda3

You have a Linux system with two activated swap partitions: sda3 and sdb2. Which of the following commands can you use to deactivate the sda3 swap partition?
A. swapoff sda3
B. swapoff -a
C. fdisk d /dev/sda3
D. swapoff /dev/sda3

D. swapoff /dev/sda3

Which file system is a FAT32 file system for Linux? (Enter command as if at command prompt)

VFAT

You need to create an ext4 file system on the first partition on the second hard disk drive. What command should you enter at the command prompt? (Enter command as if at command prompt)

mkfs.ext4 /dev/sdb1

Which of the following is not true about mount points?
A. The /home directory must be attached to the system with a mount point before use.
B. Mount points use the partitions represented by device files located in the /lib directory.
C. Mount points should always be empty directories.
D. /mnt is a directory that contain mount points for temporarily mounted file systems.

B. Mount points use the partitions represented by device files located in the /lib directory.

You have partitioned and formatted a new hard drive, sdc. You want to mount the first partition on src to directory /mnt/newdisk. Which command will perform the mount correctly?
A. mount /dev/sdc1 /mnt/newdisk
B. mount /sdc1 /mnt/newdisk
C. mount /dev/sdc /mnt/newdisk
D. mount /dsk/sdc_first /mnt/newdisk
E. mount /mnt/newdisk /devsdc1

A. mount /dev/sdc1 /mnt/newdisk

You are preparing to mount a device local to your system. Which directory holds the device files?
A. /dev
B. /opt/dev
C. /devices
D. /local/dev

A. /dev

Partition /dev/sdb2 is mounted to /mnt/temp. You need to unmount /dev/sdb2. Which commands would you use? (choose two)
A. umount /dev/sdb2
B. dismount /dev/sdb2
C. umount /mnt/temp
D. unmount /dev/sdb2
E. dismount /mnt/temp

A. umount /dev/sdb2 C. umount /mnt/temp

A user is trying to access a file system mounted at /mnt/sdb1 but receives an error No such file or directory. Which commands can you use to see the current mount points? (choose two)
A. mount
B. mounts
C. fsck
D. df
E. mntchk
F. mntfs

A. mount D. df

A number of new filesystems have been added to the server and you want them to be active now. You also do not want to bring the server down. Which command makes the changes active?
A. init q
B. mount -r
C. mount -t
D. mount -a

D. mount -a

You want to mount a number of filesystems each time the system is brought up. What configuration file should hold the configuration information for the filesystems to be mounted?
A. /etc/mount
B. /etc/inittab
C. /etc/profile
D. /etc/fstab

D. /etc/fstab

Yesterday you created a new swap area for your system. Today, after rebooting the system, you find the swap area is not mounted. What should you do to ensure the swap area is mounted each time the system boots?
A. Run the mount -auto command and identify the swap area partition.
B. Edit /etc/fstab and add the swap partition.
C. Remount the swap area. Then run export mount to make the change persistent.
D. Edit /etc/inittab and add the swap area.
E. Edit /etc/mtab and add the swap partition.

B. Edit /etc/fstab and add the swap partition.

Which file shows the currently mounted volumes?
A. /etc/mtab
B. /etc/mount.conf
C. /etc/fstab
D. /etc/mount

A. /etc/mtab

You have added several new hard disks to your system. After partitioning and formatting you have modified a configuration file to mount these new filesystems automatically. You want to document the change you made. What file would you document?
A. /etc/modules.conf
B. /etc/fstab
C. /etc/crontab
D. /etc/inittab

B. /etc/fstab

You are trying to umount /dev/sdd3 but are receiving a device is busy error message. What can you do to try to unmount the file system? (choose all that apply)

A. Edit /etc/fstab and remove the mount. Try unmount again.
B. Make sure your current working directory is not on the file system and try to unmount again.
C. Find and close any open files on the file system, and try to unmount again.
D. Use the fscls command to close any open files on the filesystem. Try to unmount again.
E. Reboot the system because the file system is locked.

B. Make sure your current working directory is not on the file system and try to unmount again. C. Find and close any open files on the file system, and try to unmount again.

You need to mount the CD-ROM device to the /media/cdrom directory. What command should you use? (Enter command as if at command prompt)

mount /dev/cdrom /media/cdrom

Which of the following directories is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable media, such as USB storage media, DVDs, CD-ROMs, and Zip disks?
A. /media
B. /mount
C. /
D. /mnt

A. /media

You need to configure your Linux system to allow only the root user account to mount the CD-ROM device. Which of the following options should you add to the /etc/fstab file?
A. /dev/cdrom /media/cdrom -t iso9660 ro,users,noauto
B. /dev/cdrom /media/cdrom -t iso9660 ro,user,noauto
C. /dev/cdrom /media/cdrom -t iso 9660 ro
D. /dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto

D. /dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto

What is the full path and filename of the file that contains the file system table for a Linux system?

/etc/fstab

7.6.6

start

Which command displays the PPID?

Ps -f

A user calls with a concern about the display he is seeing after running the command: ps -e. There are a number of processes that display getty and he is afraid that an unauthorized user is attached to the system. How should you respond?

Assure the user that this is normal

Which command displays in the most detail all the processes that are running?

Ps -ef

You want to view all currently-running processes that include getty in the process name. Which command would you use?

Bps -A | grep getty

You answer a call from a number of users who cannot access the mall server. which utility would you use to quickly see if the sendmail service is running?

ps

Which command would you use to look for a potential resource hog on a workstation?

top

You need to see a listing of running processes and system status such as memory and cpu usage. Which command will produce the listing?

Top

Which is the default signal sent to processes by the kill utility?
A developer calls with a problem. They were trying to debug a new daemon and mistakenly placed it on the production machine instead of on a lab machine. It has now entered runaway mode. The PID number is 2345 and attempts have been made to remove it with the standard kill command but it will not stop.

-15

Which command would you use to be assured that the process will terminate?

Kill -9 2345

After a severe lightning strike nearby, a number of processes seem to be running on the server in runaway mode. Which utility terminates these processes by name, and not just by process ID number?

Killall

You have several processes running in the background as shown from the jobs command below: [1] + running gedit &amp; [2]+ stopped crontab e
What command will bring the gedit program to the foreground.

Fg 1

You have a gedit process with a job ID of 6. Which command would you enter at the command prompt to send the process to the background?

bg 6

You need to send a process to the foreground. Which command should you enter to identify the job for the process?

jobs

Which kill option stops and restarts the process with the same Process ID (PID)?

-sighup

What is the result of the nohup gedit &amp; command?

Gedit will start in the background and persist in the background after logging out of the shell.

Which option would you use with the the kill utility at the command prompt to see the valid signals available with this Linux system you’re not familiar with ?

Kill -l

You need to manage a process in the foreground by pressing ctrl+C on this keyboard.what signal code is sent to the process?

SIGINT

Which command would you use to decrease the daemon’s priority?

Renice -n 10 2345

You need to determine the priority of several processes. Which command should you enter to identify the process ID and nice value for each process?

top

What would you enter at the command prompt to start the gedit process with a highest priority possible?

Nice -n -20 gedit

What is the default nice value for a process not executed with the nice command?

0

Which of the following commands starts the gedit program with a priority 1 above the default nice priority?

Nice -n -1 gedit

Which command could you use to verify if a crontab file exists for user thobbs.

Crontab -l -u thobbs

You are editing the crontab file and want an entry to run every hour at five minutes past the hour. Which of the following entries will accomplish this?

5**** /home/emmett/example.sh

You want to keep the gshant user from editing his respective file in /var/spool/cron, but still allow all other users on the system to edit their respective crontab file. What is the full path and filename of the file you should edit?

/etc/cron.deny

Which file should you edit if you want to permit specific users to edit their respective crontab file, but deny all other users on the system from editing their crontab file?

/etc/cron.allow

After logging in as root, you need to manage the crontab files for your Linux system. Which command should you use to edit the crontab file for the gshant user account?

Crontab -ue gshant

Which command should you enter at the command prompt to list the tasks in the at queue for the current user?

At -l

Which daemon must be running if you want to use the at command?

atd

You want to keep the gshant user from running the at command, but still allow all other user to use it. What is the full path and filename of the file you should edit?

/etc/at.deny

Which of the following statements best describes the effects of having only the gshant user account listed on the /etc/at.allow file?

Only gshant and root can use the at command

What should be entered at the command prompt to remove tasks 2 and 3 in the at queue?

Atrm 2,3

If a system is down at the time of a recurring regularly scheduled task is supposed to run, which task scheduling service will run the task when the system is back up again?

anacron

What is the full path and filename of the file that is used to schedule tasks for the anacron daemon?

/etc/anacrontab

You have anacrontab file with the following settings:
RANDOM_DELAY=35
START_HOURS_RANGE=17-23
#period in days delay in minutes job-identifier command
1 5 cron.daily nice run-parts /etc/cron.weekly
7 20 cron.weekly nice run-parts /etc/cron.weekly
@monthly 50 cron.monthly nice run-parts /etc/cron.monthly

Between which hours of the day will tasks schedule with anacron start to run?

If the system was down during the time period a weekly task was scheduled to run, what is the minimum amount of time anacron will wait, after the system is back up, before running the task?

If the "delay in minutes" for daily tasks is 5 minutes, how much time will anacron add to the delay of 5 minutes before the scheduled daily task?

Between 5 pm and 11 pm 20 minutes A randomly chosen number of minutes between 0 and 35

What service does cron rely on to run the scripts in the /etc/cron.daily, /etc/cron.weekly, and /etc/cron.monthly directories?

anacron

Anacron creates a timestamp file that tells you the last time a regularly scheduled job was run. What is the full path and name of the directory that contains these timestamp files?

/var/spool/anacron

You need to install an email server. Which of the following applications are valid Linux email applications?

Sendmail and Postfix

What do you enter at the command prompt to display the contents of an MTA mail queue?

mailq

Which of the following MTAs use the QMQP and QMTP protocols?

qmail

Which of the following MTAs are modular?

Postfix and qmial

By default, which protocol is used by an MTA to send messages to other MTAs?

SMTP

Which of the following are common protocols used by MTAs to send messages to MUAs?

IMAP and POP3

Recently, you updated the /etc/aliases file with several email aliases. What command do you use at the command prompt to update /etc/aliases.db file?

newaliases

Which of the following files stores the aliasing information for MTAs?

/etc/aliases.db

You are logged in as gshant, and you want to forward your mail to the dwant user on the local network. Which file should you edit to redirect the mail for a gshant user?

~/.forward

What is the full path and filename of the file that contains mail for the gshant user?

/var/spool/mail/gshant

Which of the following directories contains email for each user account on the system?

/var/spool/mail

Which database object in an SQL table represents attributes?

columns

Enter the SQL command that will list all tables in the grades database.

SHOW TABLES grades;

Which of the following SQL commands will group information in a list?

GROUP BY

Which SQL database object represents a single entity or item?

RECORD

Which clause should you add to the SELECT command to filter results from an SQL database?

WHERE

You need to show the contents of the location and price fields in the shirt table in an SQL database. Which SQL command should you use?

SELECT location, price FROM shirt

Which clause should you add to the SELECT command to sort results from an SQL database?

ORDER BY

You use the following command to retrieve specific entry information from the shirt table: SELECT location, price FROM shirt. However, the command is not returning any information. What should you do?

Add a semicolon to the end of the statement.

Which of the following statements best describes the purpose of the following SQL command? DELETE FROM shirts WHERE color=’pink’ AND type =’polo’ AND gender=’male’;

Records for men’s pink polo shirts will be removed from the shirts table

You have an executable file named ni that allows you to save a snapshot of your network information with the date and time into a log file. The file is in the /root directory, and the /root is the current working directory. How would you run the executable file? (select two.)

./ni and /root/ni

Which of the following options is the standard shell for most Linux computers

Bourne-again shell (bash)

What would you enter at the command prompt to start a new Bourne-again shell (bash) session?

bash

What command should you enter to see a list of all the commands you recently used at the command prompt?

history

You have the myapp executable file. It is found in the current directory, but not in the command path. What would you enter at the command prompt to start the myapp file and replace the shell with myapp process?

exec ./myapp

What is the result of the uname -a command?

All system information is displayed on the screen

What would you enter at the command prompt to display the present working directory?

pwd

Which of the following commands could you use to search man pages for a specific keyword?

apropos, whatis, man -k

You are working on a Linux system and need more information about the uname command. What would you enter at the command prompt to learn about the uname command syntax and options?

uname –help

What command can be used on most Linux distributions to find the directories where the man pages are kept?

echo $MANPATH

Following is a lost of the four sections typically found in a man page. Which of these shows a list of options available for a Linux command and explain what the options do?

DESCRIPTION

If you are viewing the contents of a man page, which key can you press to get back to the beginning of the page?

Home

Which of the following commands will create a shortcut to the tail -f /var/log/messages command?

Alias sysmesg="tail -f /var/log/messages"

Which command will display a list of the currently defined aliases on the system?

alias

What commonly predefined alias is configured to run the ls -l command?

||

You must do which of the following to define a persistent alias?

Add the command defining the alias to the appropriate shell configuration file.

The user mbrown has a directory named logs in her home directory that is regularly updated with new log files when certain systems events occur. She runs the following commands several times a week to check this directory:
– cd /home/mbrown/logs
– ls -al
She wants a persistent alias named logcheck to be created to run these two commands.
What command would you enter into her shell configuration file to create this persistent
Alias?

Alias logcheck="cd /home/mbrown/logs;ls -al"

You need to set the COMP variable to the value 1745. Which command will set the variable so it is available to other shell programs?

export COMP to 1745

Two users should have identical settings, yet one is having problems with the display on his screen and you suspect there is a difference in their environment variable. Which command will display all the environment variables?

env

Which of the following statements best describes the PATH environment variable?

It contains the directory prefixes used to search for programs and files.

You want the directory /sbin/special to always be a part of the PATH. You also want to keep all the current entries in your PATH statement. Which of the following commands would you use?

PATH=$PATH:/sbin/special

What line must you add to /etc/profile to make sure /sbin/custom is always part of the PATH environment variable for all users, without overwriting the current entries in the PATH statement?

PATH=$PATH:/sbin/custom; export PATH

Which command shows the value of the LANG environmental variable currently set for the language the operating system uses?

echo $LANG

You want to view the number of commands your HISTSIZE environment variable is set to save. You don’t want to have to scroll through all the environment variables. Which command shows you the value for the HISTSIZE variable?

echo $HISTSIZE

Which of the following presents the greatest security risk?

The PATH statement includes . (period)

Which command will display all the environment variables on the system?

set

Which command will display only the environment variables applied to child sessions?

env

You recently used the HOST=FS4 command. What command should you use to make the environment variable to apply to all child sessions?

export HOST

Which environment variable affects the number of past commands used in the current shell session?

HISTSIZE

Which of the following commands will configure the shell to retain 300 recently used commands in the ~/.bash_history file for multiple shell sessions?

HISTFILESIZE=300

All users at your site are using the Bash shell. You want to set a variable that will apply to every user and always have the same value. Which file would you place this variable in?

/etc/profile

A user is requesting that each time she logs in, a particular entry be written to a log file. This will only apply to her and she is using the Bash shell. In which configuration file would you make an entry for this action to take place?

.profile

Which of the following files would you use to create aliases that are applied when a specific user starts a BASH session? (select two)

~/.profile and ~/.bashrc

After a user starts a BASH session and the scripts in /etc/profile are applied, what is the next file that could affect the shell session?

~/.bash_profile

Your default target on your Linux system is set to multi-user mode; however, you want the X Windows System to launch when you log into the system. Which file should you edit?

~/.bash_login

You are trying to debug a shell script called myscript and to aid you in this task you would like to have output of the script be recorded in a text file. Which of the following commands would satisfy your requirements?

myscript >>testfile.txt

What will be the effect of the following command? ls -l /usr/bin &gt;&gt; /tmp/list.txt

The contents of the /usr/bin directory will be redirected into a file called /tmp/list.txt, inserted after previous contents of the file.

You are trying to debug a shell script that has the command ls -s in it. You suspect an error is occuring here and want to send the results of the operation (success or error) to a file named Friday in order to examine it later. Which of the following commands should you use?

ls -s> Friday 2>&1

Which of the following commands will give the same results as cat &lt; turbo?

cat turbo

Which of the following commands sorts the contents of wordlist1 and wordlist2 and sends the result to standard output?

cat /usr/wordlist1 /usr/wordlist2 | sort

Which symbol uses the output of one command as the input of another command?

|

Which command reads from standard input and writes to standard output and files?

tee

Which of the following commands displays the contents of wordlist1 and wordlist2 then sorts the combined contents, then sends the results to the monitor and a file named sortedwordlist?

cat /usr/wordlist1 /usr/wordlist2 | sort | tee sortedwordlist

Which command overcomes the 128 KB shell command size restriction by breaking up long lists of arguments?

xargs

Which of the following commands redirects standard output to standard error?

cat txtfile 1>&2

You need to create the directory /var/oracle/database/9i. Only the directory /var currently exists. From the root of the filesystem, which command will create the directory path?

mkdir -p /var/oracle/database/9i

In the /var directory is a subdirectory called backup. You need to delete the directory backup and any files. You change directory focus to /var. Which command will delete the directory backup and its files?

rm -rf backup

You need to make an expanded listing of all the files in /etc. Which command will produce the listing?

ls -al /etc

You need to view the contents of the /home/jerrys directory. What would you enter at the command prompt to show all the contents, including hidden files and directories?

ls -al /home/jerrys

Which of the following command copies the entire /temp directory with all of its files, sub-directories, and files in the sub-directories to the /home/gshant directory. (Select two)

cp -R /temp /home/gshant and cp -r /temp /home/gshant

The /home/gshant/smp directory is empty and needs to be removed. You change directories to /home/gshant. What would you enter at the command prompt to remove the smp directory?

rmdir smp

The /home/gshant/smp directory contains several files. The directory and files need to be removed. You change directories to /home/gshant. What would you enter at the command prompt to remove the smp directory and the files it contains?

rm -r smp

Which of the following commands combines three files into a single text stream?

cat

You are logged in as root. You have the file, letter.doc, on a CD in the first compact disk drive. Which command will copy the file from the CD to your home directory.

cp /mnt/scd0/letter.doc /root

Which command would you use to rename the /home/pmallory/reports file to reports.bak?

mv /home/pmallory/reports /home/pmallory/reports.bak

Which command would you use to move a file from one location to another?

mv

Which command prints the attributes of a /boot/grub/grub.conf file?

lsattr /boot/grub/grub.conf

Which of the following commands will change the /home/gshants/smile file’s modification and last accessed times to the current time?

touch /home/gshants/smile

What would you enter at the command prompt to display a file’s type?

file

You want to view the contents of a directory, but the output of the ls -l command scrolls beyond the limit of one console window. Which of the following commands would allow you to see the full listing of the directory?

ls -l | less

Which of the following would be the result of the command ln -b ~/file1 /data/file1?

A copy of the file ~/file1 would be replaced in /data.

You previously created symbolic links in your home directory to a set of files in the /data directory using the ln -s command. The system admin has just deleted those files. What happens to the links that you created?

The symbolic links would still exist in your home directory but they would now be broken.

Drag the permission string on the left to the category on the right.

Symbolic Link: lrwxrwxrwx Hard Link: -rwxr-xr-x

Which of the following is not a characteristic of symbolic links?

Valid inode for the file data even if the original file is deleted.

Which of the following is not a characteristic of hard links?

Distinct inode

After using the ls command in the current working directory, you notice the following files:

lrwxrwxrwx 1 root root 4 2010-11-05 myfile – &gt; shantsgems

-rwxr-xr-x 1 root root 382 2010-10-05 shantsgems

What is true about the files?

myfile is a symbolic link to shantsgems

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

/bin and /proc and /etc

What is the full path to the directory that contains user data for all standard users on the system?

/home

Most Linux distributions will propose to create the root (/) and swap partitions by default. To prevent user files and system log files from filling up the / partition, which 2 additional partitions are you most strongly recommended to create? (select two)

/home and /var

You have a Linux system with 8 GB of RAM installed. You plan to use this as a server system. How much space should you plan to partition for the swap file?

8 GB

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

/boot

Which of the following directories must remain on the same partition? (select three)

/bin and /etc and /lib

For which of the following directories should you create separate partitions?

/home and /var

Which partition functions as virtual memory?

swap

During installation you need to make sure there is plenty of hard disk space allocated to the partition that is going to hold the entire Linux system. What is the mount point for this partition?

/

When manually partitioning your hard drive during installation, which directory, or mount point, should be configured with its own partition in order to keep users from using too much hard drive space (and potentially bringing the Linux system down)?

/home

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

T1a73gZ9!

When manually partitioning your hard drive during installation, which directory, or mount point, should be configured with its own partition in order to keep log files from using too much hard drive space (and potentially bringing the Linux system down)?

/var

As which user is it bad practice for linux admins to regularly login as to do non-administrative tasks?

root

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

iconv

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

LC_ALL

What is the full path to the directory that contains the locale configuration files on a Linux system?

/usr/share/locale

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

Match the locale environment variable name on the left with description on the right.

Specifies personal name format

Specifically used an override for LC_MESSAGES.

A special variable for overriding all other settings. It sets all locales to the same setting.

Defines all locale settings at once, while allowing further individual customization via the LC_* settings.

Personal name: LC_NAME Override: LANGUAGE Settings: LC_ALL Customization: LANG

What is the core process for a systemd-based Linux system?

systemd

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

bios

What is the correct order for the boot phases of a Linux computer?
Boot Loader
BIOS
Init
OS Kernel

BIOS Boot Loader OS Kernel Init

In which boot process stage is the root partition mounted?

OS Kernel

You have a system with more than one linux operating system install. During the system’s boot up process, which component loads a splash screen, thus allowing you to choose which operating system you want to run?

The Secondary Boot Loader

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

The Initial Process

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

OS Kernel

You have GRUB 2 installed on your workstation. You need to make changes to the boot menu. Which files and scripts can you edit to modify the menu entries and behavior of the boot menu?

/etc/grub.d/40_custom /etc/default/grub

You have compiled a new kernel using rpm. When you reboot, the new kernel is not the default selection on the boot menu. You use GRUB 2 boot loader. What might you need to do to fix the problem?

Edit the /etc/default/grub file directly to indicate the new kernel should be the default.

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

Edit the timeout parameter in the /etc/default/grub file to say GRUB_TIMEOUT=12

Which directory contains the configuration file for GRUB 2?

/boot/grub2/

What is the full path and filename of the GRUB 2 file that is used to editing the default behavior of the boot loader menu?

/etc/default/grub

After updating the settings in the /etc/default/grub file, you need to make sure the changes are written to the grub.cfg file to take effect. What would you enter at the command prompt to write the changes to the grub.cfg file?

grub2-mkconfig -o /boot/grub2/grub.cfg

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

GRUB_DEFAULT=

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

grub2-install –version grub-install -v

Drag the GRUB 2 file or directory on the left to the correct description on the right.
The GRUB 2 Config file (non-editable)
The GRUB 2 directory for script files
The GRUB 2 configuration files (editable)
The script that identifies kernels on the root device and creates menu entries
The script file that allows menu entries to be modified

/etc/default/grub
/boot/grub2/grub.cfg
/etc/grub.d
10_linux
40_custom

The GRUB 2 Config file (non-editable): /boot/grub2/grub.cfg The GRUB 2 directory for script files: /etc/grub.d The GRUB 2 configuration files (editable): /etc/default/grub The script that identifies kernels on the root device and creates menu entries: 10_linux The script file that allows menu entries to be modified: 40_custom

You are experiencing a problem with one particular server. Each time it boots, it goes into single user mode even though no warnings or error are reported. You want to verify that it is configured to boot to the mult-user.target unit, just as all your other servers are. This system is running systemd. Which command would you use to see which boot target is set as your default?

systemctl get-default

If a systemd system is configured to use multi-user.target as the default boot target, which file has a symbolic link, or symlink, to the multi-user.target file?

/etc/systemd/system/default.target

You are on a systemd system and you want to change from currently running target unit, without rebooting the system, to a target that supports networking, multiple users, and displays a graphical interface. What command should you enter?

systemctl isolate graphical.target

The current default boot target is multi-user.target, but you want to use this system as a desktop workstation. You need a boot target that supports multiple users, networking, and has a graphical display. This is a systemd system. What command should you enter to change the default boot target to one that meets these needs?

systemctl set-default graphical.target

Which daemon is responsible for bringing up other units and services when boot targets are changed?

systemd

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 runs poweroff.target to shut down the system in an orderly manner?

systemctl isolate poweroff.target

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

systemctl isolate rescue.target

You are working on a linux system with systemd. Which non-symlink file in the /usr/lib/systemd/system/ directory is used to start the services necessary for multiple users, networking, and a graphical display?

graphical.target

You have a systemd linux system that is configured to boot into the graphical.target by default. It is running slow. You need to reboot the system, but you want it to boot into a single-user target with no network access so you can perform troubleshooting tasks. What should you do before you reboot?

Set the default boot target to rescue.target

Your system is currently running the multi-user.target. What would you enter at the command prompt to find out if the atd.service is configured to start every time the multi-user.target is loaded?

Systemctl is-enabled atd.service

Your system is currently running the multi-user.target. You want to enable the bluetooth.service to run when the graphical.target is loaded. There are two commands you must enter from a command prompt to accomplish this task.

Systemctl isolate graphical.target and systemctl enable bluetooth.service

You are working on a systemd-based Linux distribution. Which command can you use to manage the services and targets?

systemctl

You are working on a Linux distribution that uses systemd. Which file in the /usr/lib/systemd/system/ directory is used to start the services that support multiple users, networking, and is text-based?

multi-user.target

After making changes to the configuration of the anaconda.service, you must make those changes take effect. Which single command do you enter to make this service use the new configuration? (Note: there is no reload option with this service.)

Systemctl restart anaconda.service

What would you enter at the command prompt to find out if the cups.service is running?

Systemctl status cups.service

After getting calls about users not being able to print, you check the status of the cups.service and find that it is not running. What would you enter at the command prompt to get the cups.service running?

Systemctl start cups.service

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. This is a SysV init system. Which command completely shuts down the system in an orderly manner?

init 0

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 a systemd system, and you need to perform some maintenance tasks. You need to prevent users from logging on while you do so. Which command should you do?

systemctl isolate rescue.target

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

shutdown -h now

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

/etc/shutdown.allow

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 to give them fifteen minutes to save data and exit the system. Which of the following commands should you use?

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

You have installed a new monitor on your system and you want to start using an X Window System graphical environment. You have been using the command line and text-based utilities up to this point. Which utility can you use to configure the graphical environment on your system?

xorgconfig

You want to automatically query the system’s hardware and generate a proposed X Window System Configuration file. Which command do you run?

Xorg -configure

You have run the Xorg -configure command to query your video board and monitor. This utility creates a file with a proposed X Window System configuration based on the specifications of your video hardware. Which is the path and name of this proposed configuration file?

/etc/X11/xorg.conf.new

You have an X Window System graphical environment configured and working, and you want to make changes to the mouse and keyboard settings. Which graphical utility can you run to make these changes?

xorgcfg

If you are using the XFree-86 version of X service, what command do you run to create a proposed configuration file for your new video board monitor?

XFree-86 -configure

You are using XFree86 for your X server graphical environment. The X server is configured and working, and you want to make changes to the mouse and keyboard settings. Which graphical utility can you run to make these changes?

xf86cfg

You have installed a new monitor on your system and you want to start using an XFree86 graphical environment. You have been using the command line and text-based utilities up to this point. Which utility can you use to configure a graphical environment on your system?

xf86config

You have made a few changes to the X server configuration file , and you need to implement the changes by restarting the X server. Which of the following actions will not restart the X server?

Use the startx command

Which X Window System element is the main component of the system?

X server

Which component of the X Windows System controls the placement and appearance of windows on a Linux computer?

Window Manager

What does LightDM create on your linux system?

Desktop Environment

What is the name of the file you create in the /etc/lightdm/ directory to configure customized settings for the LightDM Display Manager?

lightdm.conf

Match the directory descriptions.
/usr/share/lightdm/lightdm.conf.d
/etc/lightdm/lightdm.conf.d/
/etc/lightdm/

Files in this directory are used to override to the LightDM configuration settings.
The lightdm.conf file can be created in this directory to customize the setting for LightDM
Files in this directory contain the default configuration settings for LightDM. Files in this directory should not be edited.

/usr/share/lightdm/lightdm.conf.d: Files in this directory contain the default configuration settings for LightDM. Files in this directory should not be edited. /etc/lightdm/lightdm.conf.d/: files in this directory are used to override to the LightDM configuration settings. /etc/lightdm/: The lightdm.conf file can be created in this directory to customize the setting for LightDM.

What is another term for keyboard accessibility options on a linux system?

AccessX

Which users benefit from the sticky keys accessibility option?

Users who have difficulty pressing multiple keys at the same time.

You have a user who has difficulty typing. She is constantly pressing keys multiple times by accident. Which keyboard accessibility option should you enable?

Bounce Keys

You have a user who has difficulty using the mouse. Which keyboard accessibility option should you enable?

Mouse Keys

Which of the following statements best describes the repeat rate keyboard accessibility option?

Repeat rate affects how quickly the action associated with the key is repeatedly performed when the key is pressed and held down.

What is Emacspeak?

A screen reader

What desktop theme adjusts the background and text colors to improve readability?

high contrast

Which type of Braille device prints a hard copy of a text document using Braille characters?

Braille embosser

Which of the following statements best describes the mouse gesture visual accessibility option?

A mouse gesture allows users to configure Linux to complete a specific task when the mouse is moved in a certain pattern.

Which of the following is generally not an alternative input method for the GNOME On-screen keyboard (GOK)?

Moving the mouse in a certain pattern.

Which of the following items is a free, open-source scriptable screen reader that works with the GNOME desktop?

Orca

During installation, you must create a root user account for the system. What user account number does this account use?

0

You have been asked to temporarily fill in for an administrator who has just been fired. This administrator was known to take a lax view of security, and it is suspected that passwords are still kept in the /etc/passwd file. When viewing that file, which entry below would indicate that the passwords are there?

kolton:34uyx:431:0:Back Door:/root:/bin/bash (the second "x" spot is filled in pssword. "lax")

During a Fedora distribution installation, you choose to add a regular user account. The only other user that has been added to the system was root. What is the most likely user id associated with the new user?

500 (or 1000)

What is the UID in the line from the /etc/passwd file below? pmallory:x:514:550:Paul Mallory:/home/pmallory:/bin/bash

514 (Name:pass:UID:GID:GECOS:homeDir:shell)

In which file would you find an entry similar to the following line: sales:x:510:pclark,mmckay,hsamson

/etc/group

In the /etc/shadow file, which character in the password field indicates that a standard user account is locked?

(typed)

! ($= encrypted, * system account)

In the /etc/shadow file, which character in the password field indicates that the password is an encrypted entry?

$ (*= system account, != locked)

You have been called in to help a small company. They want to increase the security of their small network and one of the tasks you have been given to do is to move their passwords from the /etc/passwd file to the /etc/shadow file. Which utility would you use to accomplish this?

pwconv

You are viewing the /etc/passwd file, and you notice the following entry:

pclark:x:501:501:Petunia Clark:/home/pdark:/bin/bash.

What statement best describes this entry?

The pclark password is stored in the /etc/shadow file.

You need to identify which user accounts on the Linux system have encrypted passwords. Which character in the password field /etc/shadow file indicates an encrypted password is set for the user account?

$ (*= system account, != locked)

What is the full path to the directory that contains a set of configuration file templates that are copied into a new user’s home directory when it is created?

(typed)

/etc/skel

You are configuring a Linux system for 5 different users. Before you create the user accounts, you need to ensure that specific commands execute clean up tasks when the user logs out of the Linux system.

You want to reduce redundant actions by configuring the commands once for all users that will be created on the system. Where should you configure the commands?

/etc/skel/ .bash_logout (/etc/skel = default home dir)

What is the full path and filename of the file that stores BASH preferences for the gshant user account?

(typed)

/home/gshant/.bash_profile

A programmer named Brandon calls with an issue. He is currently using the C shell each time he logs in, but has been told by his manager to start using the Bash shell. Which command will change brandon’s shell to the desired setting?

usermod -s /bin/bash brandon (-s = default shell)

One of your users, Karen Scott, has recently married and is now Karen Jones. She has requested that her username be changed from kscottto kjones, but no other values change. Which of the following commands will accomplish this?

usermod -I kjones kscott (Lower L | -l = change username, -u = UID)

You have performed an audit and have found active accounts for employees who no longer work for the company. You want to disable those accounts. What command example will disable a user account?

usermod -L joer (-l = username, -d = new home dire, -u = UID)

What would be the outcome of the following command?

userdel -r jjones

user account, jjones, would be deleted along with jjones’ home directory. (not files owned by her)

An employee named Bob Smith, with a user name of bsmith, has left the company. You have been instructed by your supervisor to delete his user account along with his home directory.
Which of the following commands would produce the required outcome? (Choose all that apply.)

userdel bsmith;rm -rf/home/bsmith userdel -r bsmith (-f = force)

A user with an account name of larry has just been terminated from the company. There is good reason to believe that the user will attempt to access and damage the files in the system in the very near future. Which command below will disable or remove the user account from the system and remove his home directory?

userdel -r larry

You need to change the default home directory value used by the useradd utility when creating a user account. What is the full path and filename of the file you should edit?

(typed)

/etc/default/useradd

What is the full path to the directory that contains a set of configuration file templates that are copied into a new user’s home directory when it is created?

(typed)

/etc/skel (skel = new home dir copies)

You need to create a user account with these specific parameters:

• Use pmorrillas the login name
• Use Paul Morrill as the comment
• Use /home/pmorrill_temp as the home directory
• Use 683 as the UID

Which command should you use?

useradd -c "Paul Morrill" -d /home/pmorrill_temp -u 683 pmorrill

Which useradd option displays the default values specified in the /etc/default/useradd file.

(typed)

-D (don’t include //useradd)

Which of the following utilities would you typically use to lock a user account? (Select two. Each answer represents an independent solution.)

usermod passwd

You suspect that the gshant user account is locked. What would enter at the command prompt to see the status of the gshant user account?

(typed)

passwd -S gshant (not usermod)

You are the administrator for a small company. You need to create a new group for users in the sales department. You need to name the group sales. Which command will accomplish this?

groupadd sales

Due to a merger with another company, standardization is now being imposed throughout the company. As a result of this, the sales group must be renamed marketing. Which of the following commands will accomplish this?

groupmod -n marketing sales

You have a group named temp_sales on your system. The group is no longer needed, and you should remove the group. Which of the following commands should you use?

groupdel temp_sales

What would you enter at the command prompt to display the primary and secondary group memberships for the gshantuser account?

(typed)

groups gshant

You need to modify the group membership for the user gmyrick to add the staff group to his list of secondary group memberships. He needs to keep his existing secondary group memberships. Which command option will add gmyrick to the staff group without removing him from the other groups?

usermod -aG staff gmyrick (Remember capital G)

You have just created the lsmith user account and need to assign this new user to the secondary groups admin and acct. Enter the command you would use to add lsmith to the admin and acct secondary groups.

(typed)

usermod -G admin,acct Ismith

The user emcmann has been transferred from the accounts payable department. She was assigned to several secondary groups that gave her rights to sensitive files and systems. You need to remove her from all her current secondary groups right away. Enter the command that will remove emcmann from all her secondary groups.

(typed)

usermod -G "" emcmann

Type the full device file name for the second partition on the hard drive with the lowest ID number?

(typed)

/dev/sda2

Type the full device file name for the first partition on the hard drive with the third lowest ID number.

(typed)

/dev/sdcl (pay attention to partitions vs drives)

Which of the following device file names represents the second local terminal on the system?

/dev/tty2 (not ttyS2)

What is the file path and name of the directory that contains device files for hard drives, optical drives, and USB devices?

(typed)

/dev

You have put a new hard disk in your system and created two primary partitions (sdb1 and sdb2) and one extended partition (sdb3). You have just formatted sdb1 with ext3 and sdb2 as a swap area. When you try to format sdb3 as a swap area, you are unable to. What is the problem?

You cannot format an extended partition.

You have added a second hard disk to your Linux system. Which of the following commands will allow you to partition the new drive?

fdisk /dev/sdb

You want to view partition information for your sda device. Which commands could you use to view the partitions defined on sda? (Select two.)

fdisk /dev/sda, then press p fdisk -I

You have a system with a single hard disk. You add a new hard drive to your system. Which of the following commands would you use to partition the new drive?

fdisk /dev/sdb

Which hexadecimal code represents an extended partition?

0x85

How many logical partitions can you create on an extended partition?

Unlimited

How many primary partitions can you create on a single hard disk drive?

4

You have installed a new blank hard drive on your Linux system. This is the second drive on the system so it is represented in the file system by the /dev/sdb file. You need to create GUID partitions on this drive. What command do you use to start up the GUID disk management utility to create partitions on the /dev/sdb drive?

(typed)

gdisk /dev/sdb

With fdisk, you can create a maximum of 4 partitions per disk. What is the maximum number of partitions per disk that can be created using gdisk?

128

You have just used the gdisk utility to create 8 partitions on a new hard drive. Which of the following describes the partitions you have just created?

All 8 partitions are the same. They are just partitions. There are no primary, extended, or logical partitions.

What is the name of the partition management utility that will both create GUID partitions and create file systems on those partitions?

(typed)

parted

Which partition management utility can be used to define and change various different GUID partition configurations without committing the configuration to the disk until the w command is used?

gdisk

You are preparing to use a logical volume with LVM. Which of the following commands initializes a physical volume?

pvcreate

You are preparing to use a logical volume with LVM. Which of the following commands creates a volume group named backup on the third disk in the system?

vgcreate backup /dev/sdc (not: vgcreate /dev/sdc backup)

You are using LVM on your Linux system to manage the existing volumes. After adding and initializing the fourth hard drive to the system and creating a physical volume, what command should you use to add it to the backup volume group?

(typed)

vgextend ("add")

You are using LVM on your Linux system to manage the existing volumes. What command do you enter to scan for logical volumes on the system?

(typed)

Ivscan

You are using LVM on your Linux system to manage hard disk partitions. What command do you enter to scan for physical volumes on the system?

(typed)

pvscan

You need to create a logical volume named video in the home volume group and give it 2 TB of disk space. Which command would you use to complete this task?

Ivcreate -L 2T -n video home (-n <name> <in volume>)

After creating logical volumes with LVM, what are the next steps you need to do?

Create file systems on the volumes and mount them.

You have added a third hard disk to your Linux system. What command would you use to initialize a physical volume on this disk for later use by the Logical Volume Manager?

(typed)

pvcreate /dev/sdc (Don’t forget the drive)

During the Linux installation process you are asked to choose the file system type for your partitions. Which is the most common Linux file system to choose?

Ext3

You are assembling a workstation. The system requirements show that this system will be used primarily to store documents of small size. What is the best Linux file system to install?

Ext4

Which of these Linux file systems support journaling? (Choose three.)

Ext3 Ext4 XFS

You have successfully partitioned the forth hard drive into 2 primary partitions. You need to format the second partition with the ext3 file system. Which command will work?

mke2fs -j /dev/sdd2 (mke2fs= Ext, -j=ext3 for journaling )

Which of the following commands will create an ext2 file system on the first primary partition of the third hard drive? (Choose two.)

mkfs -t ext2 /dev/sdc1 mke2fs /dev/sdc1 (pay attention to spelling… answers are tricky)

You created a swap area on sda3, but it is not activated. Which command should you use to activate the swap partition?

(typed)

swapon /dev/sda3

You have a Linux system with two activated swap partitions: sda3 and sdb2. Which of the following commands can you use to deactivate the sda3 swap partition?

swapoff /dev/sda3 (just sda3)

Which file system is a FAT32 file system for Linux?

(typed)

VFAT (caps)

You need to create an ext4 file system on the first partition on the second hard disk drive. What command should you enter at the command prompt?

(typed)

mkfs -t ext4 /dev/sdb1 (pay attention to disk vs partition)

Which of the following is not true regarding mount points?

Mount points use the partitions represented by device files located in the /lib directory.

You have partitioned and formatted a new hard drive, sdc. You want to mount the first partition on sdc to directory /mnt/newdisk. Which command will perform the mount correctly?

mount /dev/sdcl /mnt/newdisk (pay attention to paths)

You are preparing to mount a device local to your system. Which directory holds the device files?

/dev

Partition /dev/sdb2 is mounted to /mnt/temp. You need to unmount /dev/sdb2. Which commands would you use? (Choose two.)

umount /mnt/temp umount /dev/sdb2

A user is trying to access a file system mounted at /mnt/sdbl but receives an error No such file or directory. Which commands can you use to see the current mount points? (Choose two.)

df mount

A number of new file systems have been added to the server and you want them to be active now. You also do not want to bring the server down. Which command makes the changes active?

mount -a (-a forces a reread…?)

You want to mount a number of file systems each time the system is brought up. Which configuration file should hold the configuration information for the file systems to be mounted?

/etc/fstab

Yesterday you created a new swap area for your system. Today, after rebooting the system, you find the swap area is not mounted. What should you do to ensure the swap area is mounted each time the system boots?

Edit /etc/fstab and add the swap partition.

Which file shows the currently mounted volumes?

/etc/mtab (mount tab)

You have added several new hard disks to your system. After partitioning and formatting you have modified a configuration file to mount these new file systems automatically. You want to document the change you made. What file would you document?

/etc/fstab

You are trying to umount /dev/sdd3 but are receiving a device is busy error message. What can you do to try to unmount the file system? (Choose all that apply.)

Find and close any open files on the file system, and try to unmount again. Make sure your current working directory is not on the file system and try to unmount again.

You need to mount the CD-ROM device to the /media/cdrom directory. What command should you enter at the command prompt?

(typed)

mount /dev/cdrom /media/cdrom

Which of the following directories is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable media, such as USB storage media, DVDs, CD-ROMs, and Zip disks?

/media (not /mnt)

You need to configure your Linux system to allow only the root user account to mount the CD-ROM device. Which of the following options should you add to the /etc/fstab file?

/dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto (Device, Mount pnt, type, options) (nouser= root only)

What is the full path and filename of the file that contains the file system table for a Linux system?

(typed)

/etc/fstab

You are requested to help a user who reports that he has no more local storage space. You go to his system and log in as root user. Which command will display the available disk space on all partitions? (Choose two.)

df df-h

You have created a separate partition for the sales team and mounted it to the /sales directory. The team is about to begin a new project, and they want to make sure there is enough disk space to hold upcoming files. Which command will show you the amount of free space?

df /sales

You are asked to help a user who is complaining that file system errors are being reported during boot up. When you reboot the user’s system you see errors on sda2. You want to check the file system on sda2 and fix the errors. What can you do?

Change to single user mode and run fsck /dev/sda2. (Have to change to Single User mode)

Which command allows you to use an alternative superblock when the primary superblock has been corrupted?

e2fsck -b 16385 /dev/sdal (enhanced fdck)

You need to convert the file system of /dev/sdb3 from ext2 to ext3 without affecting the data on the drive. What command and option should you enter at the command prompt?

(typed)

tune2fs -j /dev/sdb3 (-j= journaling, not data impact)

What is the effect of the tune2fs -j /dev/sdbl command?

Converts the /dev/sdbl device to ext3. (-j= journaling)

You suspect your /dev/sda3 partition is in need of repair. Which of the following e2fsck options will repair the errors without any interaction from you?

-p (-p= no questions asked)

You have an xfs file system in your Linux computer. You need to display the XFS file system parameters, such as the block size and inode data structures. Which of the following commands should you use? (Select two. Each answer is an independent solution.)

xfs_info xfs_growfs -n

You have an XFS file system in your Linux system represented by /dev/sdb1. You need to copy all the filenames on the drive to the /reviewxfs file. You must be able to read the filenames in the /reviewxfs file. Which of the following commands should you use?

xfs_metadump -o /dev/sdbl /reviewxfs (-o= shows filenames)

Which command can you enter at the command prompt to list all files and directories in the badams home directory along with a file size and a total amount of space taken up by the directory?

(typed)

du -c /home/badams (-c= lists a total amount of space used in dir)

Your ext3 file system has experienced a significant amount of corruption. To examine the file system, you want to use the debugfs utility. Which debugfs option should you use to examine the file system?

-c (-c= catastrophic mode)

You are inspecting the superblocks and block information on your file system. You need dumpe2fs to display only the blocks that are reserved as bad in the file system. Which option should you use?

-b (-b= bad)

You are setting up disk quotas for users and groups on the /home directory. What mount options do you need to include in the entry for mounting the / home directory in the /etc/fstab file?

userjquota=aquota.user and grpjquota=aquota.group (remember the j in the middle = journaling)

What is the name of the package that must be installed if you want to use disk quotas on your Linux system?

(typed)

quota

Which command should you enter at the command prompt to change the quota settings for the gshant user?

(typed)

edquota -u gshant

Which of the following commands will open the quota file for a specific user?

edquota -u (open = edit file)

Which of the following statements best describes the function of the repquota /home -vu command?

A summary of disk usage and quotas is displayed for those users who have files within /home. (not current user’s quota limits)

After creating the aquota.user and aquota.group files in the /home directory, what command do you enter to enable quotas for the /home directory?

(typed)

quotaon /home (home directory)

Which command should you enter at the command prompt to display the current user’s quota limits and disk usage?

(typed)

quota (not rep)

Which repquota option will give quota limits and disk usage for all file systems listed in /etc/mtab?

-a

You need to implement disk quotas on your Linux system. You need the quotas on the / directory. What is the full path and name of the file that must be edited to implement quotas for users and groups?

(typed)

/etc/fstab

Which command will display the disk usage and quota limits for the development group?

quota -g development

What would you enter at the command prompt to change the group ownership for the devstyle.txt file to rand in the present working directory?

(typed)

chown .rand devstyle.txt

Which of the following commands make sales the group owner of the /sales/report file? (Select two. Each answer is an independent solution.)

chown :sales /sales/report chown .sales /sales/report (chgrp, not chgroup)

You need to see who has permissions to the sales_projection_q2 file. You use Is -I sales_projection_q2 and get this information:

drwxr-xr-x 22 pclark acct 4096 Jun 19 15:01 sales_projection_q2

Who is the user shown as owner of this file? (Note: your answer is case-sensitive)

What group is shown as owner of this file? (Note: your answer is case-sensitive)

(typed 2 parts)

pclark acct

You use Is -I /home/sales/sales_projection_q2 and get this information:

drwxr-xr-x 22 pclark acct 4096 Jun 19 15:01 sales_projection_q2

Which command will change the user owner to jyoung and the group owner to sales?

chown jyoung:sales /home/sales/sales_projection_q2

You must change ownership of a script called myscript so that only the user owner has read/write access to it and only the user owner and group owner have execute permissions. Which of the following commands would accomplish this?

chmod 750 myscript

There is a directory called projects owned by the user cmarcela and the group rd. cmarcela has left the company. You need to give ownership of the projects directory, its files, and subdirectories to the user ebates, who is a member of the mgmt group. Which command should you use to change the user ownership?

chown -R ebates projects (just the user)

Which set of permissions represent the minimal permissions required to allow a user to list the contents of a directory?

r-x

You have a critical file called yearend.xls. You want to set file permissions so that only the owner of the file can modify it and only group owners can read it. Which permission listed below will accomplish that?

-rw-r—– 1 george acctg 26256 June 1 04:16 yearend.xls

You are called into the office of a newly hired manager. He has copied a file from his old place of work onto his new workstation, but is now receiving an error message that access is denied each time he tries to access the file. He is not the owner of the file, and not a member of the group the file is associated with.

Which of the following represents the least set of file permissions needed for him to be able to read and write to the file?

666 (read + write)

A user calls the help desk. Each time he creates a new text file, permissions of 640 are applied to the file and he must use chmod to set them to 644. What command should you enter in the user’s profile to set the default permission for newly created files to 644?

umask 0022 (file default is -rw-rw-rw-)

While reading about file system permissions in Linux you discover that the default permissions assigned to new files when they are created are rw-rw-rw- (666 octal) and new directories are rwxrwxrwx (777 octal). However, when you create a new file in a directory called /data the permissions assigned are rw-r-r—. Why is this?

The umask must be set to 0022 and therefore block the write permission for the group owner and everyone else.

You need to create a large number of files and would like to ensure that you, the user owner, are the only one that has read and write permissions to the files. The files will be located in a number of different directories that already contain files that you don’t want their permissions modified. How could you create these files with the correct permissions using the least amount of effort?

Type umask 0066 to change your umask. (you are going to "create them")

What is the typical default umask value?

022

You need to set the SUID permission on a file named rider. Which of the following commands will accomplish this?

chmod 4777 rider

A file named acctg needs to have the SGID permission set on it while keeping all other permissions at their present value. Which of the following commands will accomplish this?

chmod g+s acctg (category+permission: Group+Set ID) (Not s+g)

You have an application whose owner is root but you want all users to execute the application with root user permissions. Which of the following examples shows correct usage of the SUID flag?

-rwsr–r– 3 root sys 73748 Nov 2 2005 /usr/bin/applicationx (instead of -rwx-r–r– 3… | x -> s)

You have an application whose group is sys but you want all users, whether or not they are members of the sysadmin group, to execute the application with sysadmin group permissions. Which of the following examples shows correct usage of the SGID flag?

-rwxr-sr– 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx (not -rwxr-sr-s… Not sure why…)

Setting the SUID flag is a powerful and useful feature. It can have weaknesses associated with its use. Which of the following statements identifies a weakness?

Setting the SUID flag for an application or process owned by the root user is a potential security hole. (They don’t become root, just run as root)

Which of the following special permissions will prevent a file’s deletion by anyone except the file owner?

Sticky Bit (value of 1xxx)

You have just installed a new program that will be used by all users on the computer. After installation, you log in as a regular user and you try to run the program. The program stops and displays the following error:

Error: not running as root

What should you do so that all users can run this program?

Set the SUID on the program.

You are the team lead for a marketing project. Only the members of the team3 group should have read/write permissions to a document called project_data.doc, however, you want to ensure that no one on the team will delete the document by accident.

Your user name is bsmith.
A long listing of the file is as follows:

-rwxr-xr-x 1 bsmith team3 7260 June 22 2004 project_data.doc

Which of the following commands would accomplish this?

chrnod 1664 project_data.doc

You want to archive some configuration files to the floppy drive. You are using the cpio utility. Which line will create the archive on the floppy?

Is /etc/*.conf | cpio -ovd > /dev/rfd0 (has to have the >)

You want to restore files with the extension .cfg from an archive called configs.cpio. Which command will perform the restore?

cpio -ivd "*.cfg" < /mnt/hdd2/configs.cpio (cpoi command "file type" < location)

You have a tape archive mounted in /dev/rmt12. You need to get a list of the file contents. Which command will list the contents?

tar -tf /dev/rmt12 (-t= lists archive content, -f= file)

You have a SCSI tape drive st0. You want to backup the contents of /var/oracle. Which command will perform the backup?

tar -vcf /dev/st0 /var/oracle (tar command "Destination" "Desired Backup")

You need to backup Jane’s files in her /home/user/jane directory. Which command will create an archive in the /root directory? (Select two.)

tar -czvf /root/jane.tgz /home/user/jane tar -cvf /root/jane.tar /home/user/jane (tar "To" "From") (-z=gz, -j=bz, -J=xz)

You need to restore a file, yearend.xls, from the archive 013004.tar.gz’m the backup directory. The file needs to be restored to /home/accounting. Which command will perform the restore?

tar -xzvf /backup/013004.tar.gz /home/accounting/yearend.xls (needs the -z for decompression)

Which utility allows you to make an exact copy of a file?

dd (not: tar, cpio, cp)

You are compressing a file with the tar utility, but you need to ensure you can uncompress the file with the bzip2 utility. Which tar option should you use during the file compression?

-j (tar -z=gz, -j=bz, -J=xz)

You need to view the files within /home/gshant/expfile.bz2 , but you want to leave the compressed file unchanged. What bzip2 option should you use?

(typed)

-k (not the entire command) (bzip -k filename= keep orig file unchanged)

You have installed a new Linux system and you want to make a baseline of system performance. Which of these files contain baseline information? (Choose two.)

/meminfo /cpuinfo

What is the full path and filename of the file that contains information about which interrupt request (IRQ) channels are being used by each hardware device on the system?

/proc/interrupts

You need to get detailed information about the system memory. Which command will display that information?

cat /proc/meminfo

Which of the following commands will display information about the PCI devices installed on the system?

Ispci (lower L)

Which command displays information on all USB devices connected to the computer?

(typed)

lsusb (lower L)

Which command displays information about the RAID devices on the computer?

hwinfo –listmd

What is the full path to the directory that contains information about the system state and processes?

(typed)

/proc (Not /proc/)

Match the correct /proc directory content on the left with the description on the right.

1) Displays the boot options that were given to the kernel at boot time.

2) Displays information about the computer’s CPU.

3) Displays information about the current kernel version.

4) Displays all the direct memory access assignments for the computer.

1 cmdline 2 cpuinfo 3 version 4 dma

What is the full path to the directory that contains information about each kernel module installed on the computer?

(typed)

/sys/module

Which of the following commands will display which boot options were given to the kernel at boot time?

cat /proc/cmdline

Which command displays information about all loaded modules on the system?

(typed)

lsmod (lower L)

You just got a new input device named GamePad that you want to use on your computer. You don’t think that the GamePad driver (i.e., kernel module) was compiled into the kernel of your Linux distribution.

Which of the following commands will install the driver {gamepad.ko) into the kernel? (Select two.)

modprobe gamepad insmod gamepad.ko (need the whole name)

Which utility runs at startup to load modules into the kernel?

(typed)

modprobe (not the location)

Which command would check for dependencies before removing the debug module from the kernel?

modprobe -r debug (no -d)

Which command would check for dependencies before loading the gameport module in the kernel?

modprobe gameport (not depmod gameport)

Which of the following devices represent a hotplug device?

USB flash drives (Things that can be removed with power)

Which daemon allows processes to communicate which each other and relay information about hotplug devices?

D-Bus

What is the full path to the directory that allows you to name devices when they are connected to the system?

(typed)

/etc/udev/rules.d/ (not /dev or /etc/fstab)

Match the correct term on the left with the definition on the right.

1 Allows processes to communicate with each other and notify them of new hotplug devices

2 Provides all applications with data about current hardware

3 Dynamically creates device files in a virtual file system as devices are added and removed

4 Exports information about hotplug devices so that other utilities can access the information

1 D-Bus 2 hald 3 /udev 4 sysfs

Which device category do RAM chips, CPUs, expansion cards (such as PCI cards), and standard hard disk drives belong to?

Coldplug devices (coldplug cannot be removed unless no power)

You need to install the package apt-0 apt-0.5.15.cnc6-1.1.fc2.fr.i386.rmp. Which commands will perform the installation?

rpm -Uh [filename] rpm -ih [filename]

you have previously installed the package mplayer and wish to remove it from your computer. Which removal method should you use?

Run the command rpm -e mplayer

You have an RPM package called mathpac that is not working correctly. you have downloaded the latest package. Which command should you use to install the latest mathpac package?

rpm -U mathpac

You have found a patch for the Samba server on your system. The patch is a .rpm package. Which is the most correct procedure to install the package?

Download the package. Run rpm -Uvh on the package to install the update

Which command will query the system for all installed RPM packages?

rpm -qa

What would you enter at the command prompt to force RPM to override the need to install dependencies?

–nodeps

Which command will install the RPM package over the existing, installed package?

rpm –force

what command will upgrade an RPM package only if an earlier version is already installed on the system?

rpm -F

Before you install an RPM package, you want to verify the authenticity of the package and check the digital signature to ensure that it has not been altered. Which RPM option would you use?

–checksig

Without installing an RPM package, you want to check for all the packages’s uninstalled dependencies. Which command should you use?

rpm –test

Which of the following utilites should you use if you need to extract a file from an RPM package file?

rpm2cpio

Which of the following function does rpm -V command perform?

Verifies that an RPM package is free from errors

what would you enter at the command prompt to make rpm perform an MD5 checksum on the myapp5.4.rpm package?

rpm -V myapp5.4.rpm

You need to determine which files are associated with the metacity RPM package. Which command should you use?

rpm -ql metacity

What is the full path and file name for the Yum Configuration file?

/etc/yum.conf

You have installed a package called mathpac with yum. After a system upgrade, the package correctly. Which command should you try first to get the package to work?

yum update mathpac

When managing YUM, what is the full path to the directory where you should place .repo files?

/etc/yum.repos.d

What command would you enter at the command prompt to download an RPM package without installing it to the system?

yumdownloader

Which yum option displays whether updates are available for RPM packages?

list updates

You need the YUM utility to check specific URLs for rpm respositories. Where should you add the URLs?

Within the /etc/yum.repos.d/ directory Within the /etc/yum.conf file

What YUM command would you enter at the command prompt to determine which package contains the /usr/lib/libstlport_gcc.so file?

yum whatprovides /usr/lib/libstlport_gcc.so

You have users who need to do some programing projects in the Python programming language. What YUM command do you use to find out if there is a python package available to install on the Linux server?

yum list python

You used YUM to list the python packages that are available to install. You see that there is a package available that is called python. What YUM command do you use to install this python package?

yum install python

What is the full path and file name for the DNF configuration file?

/etc/dnf/dnf.conf

You have installed a package called mathpac with DNF. After a system upgrade, the package is not working correctly. Which command should you try first to get the package to work?

dnf update mathpac

You need the DNF utility to check specific URLs for RPM repositories. Where should you add the URLs?

In .repo files within the /etc/yum.repos.d/ directory

You need to remove an RPM package from your system. Which of the following commands could you use?

dnf remove

You have users who need to do some programming projects in the Ruby programming language. What DNF command do you use to find out if there is a ruby package available to install on the Linux server?

dnf list rpm

You used DNF to list the ruby packages that are available to install. You see that there is a package available that is called ruby. What DNF command do you use to install this ruby package?

dnf install ruby

You have installed a packed called mathpac with apt-get. After a system upgrade, they package is not working correctly. Which command is the most correct option to get the package to work?

apt-get upgrade mathpac

Which dpkg option installs a package recursively?

-R

Which function does the dpkg –config command perform?

Reconfigures an upacked package

Which of the following actions does the dpkg -l command perform?

All packages with names that match a specified pattern are displayed.

What dpkg command would you enter at the command prompt to search for packages that have been partially installed on the system?

dpkg -C

What dpkg command would you enter at the command prompt to list information about a currently installed Debian package?

dpkg -p

Which dpkg option completely removes a package and its configuration files?

-P

Which command reconfigures an already installed package?

dpkg-reconfigure

what statements are true regarding the apt-get utility?

apt-get uses /etc/apt/cources.list to find information about the application repositories apt-get is similar to the yup utility on an RPM distribution

You are working on a Debian distribution of Linux. You need to install a package, but you do not want to manually install all the dependencies for the package. Without using any command options, what command should you use?

apt-get

You are working on a Debian distribution of Linux. You want to retrieve information about the Debian package database on the system. Without using any command options, what command will provide the information you need?

apt-cache

Which apt-cache option shows the missing dependencies in the package cache?

unmet

Which function does the -d option perform when using the apt-get command to install a package?

Packages are downloaded to they system, but not installed

h apt-get option upgrades all installed packages to the latest versions using the information in /etc/apt/sources.list?

upgrade

Which of the following Debian package management utilities provides the front end for APT?

aptitude

What situation is most likely to cause a dependence problem?

Installing two different packages that both include /usr/lib/graphlib

What command displays all of the shared library information for the /bin/bash executable?

ldd -v /bin/bash

Which environment variable specifies additional directories to search for library files not listed in /etc/ld/so.conf?

LD_LIBRARY_PATH

What would you enter at the command prompt to display the shared library information for executables?

ldd

which of the following commands reloads the libraries for the /bin/bash executable, but does not update the cache?

ldconfig -N /bin/bash

What would you enter at the command prompt, without options, to reload the library cache every time libraries are added or removed and to update the symbolic links?

ldconfig

Which command should you use to change the location of the default file used to search for libraries?

ldconfig -f

What is the full path and file name for the file that contains a colon-, space-,tab-, newline-, or comma-delimited list of directories in which to search for libraries?

/etc/ld.so.conf

Which methods should you use to configure dynamic libraries on a Linux system?

Modify /etc/ld.so.conf to add the path of the libraries Use the LD_LIBRARY_PATH environment variable to specify addition directories to search for library files

Which directories typically hold the dynamic libraries on your system?

/usr/local/lib/ /usr/lib

Dynamic library characteristics (they are not integrated into source code)

Have a .so or .so.version extension (.so stands for shared object). Are typically stored in /usr/lib/ and /usr/local/lib/ can degrade program load time if the library isn’t already in use by another program. similar to dynamic link libraries (DLL) in windows.

Static library characteristics (integrated into the code of the application when the code is compiled)

Have an .a filename extension. are used when dynamic libraries are not available increase the size of the application

Which command displays the PPID?

ps -f (-f= detailed information, -A= all processes, -u= user ID)

A user calls with a concern about the display he is seeing after running the command: ps -ef. There are a number of processes that display getty and he is afraid that an unauthorized user is attached to the system.

How should you respond?

Assure the user that this is normal. (A getty process represents a terminal that does not currently have a user. This is normal to see on a system that is configured for more than one terminal.)

Which command displays in the most detail all the processes that are running?

ps -ef (-e is the same as -A= all processes, -f= detailed information)

You want to view all currently-running processes that include getty in the process name. Which command would you use?

ps -A | grep getty (-A= all processes, -a= shows processes of specific users, and |find- searches "files")

You answer a call from a number of users who cannot access the mail server. Which utility would you use to quickly see if the sendmail service is running?

ps (process)

Which command would you use to look for a potential resource hog on a workstation?

top (real time viewing)

You need to see a listing of running processes and system status such as memory and CPU usage. Which command will produce the listing?

top (The ps -A command produces a listing of all running processes but no information about memory or CPU. There are no commands systat or cpustat.)

Which is the default signal sent to processes by the kill utility?

-15

A developer calls with a problem. They were trying to debug a new daemon and mistakenly placed it on the production machine instead of on a lab machine. It has now entered runaway mode. The PID number is 2345 and attempts have been made to remove it with the standard kill command but it will not stop.

Which command would you use to be assured that the process will terminate?

kill -9 2345 (kill -2 first, -15 next, -9 last)

After a severe lightning strike nearby, a number of processes seem to be running on the server in runaway mode. Which utility terminates these processes by name, and not just by process ID number?

killall (pkill- search criteria, kill- PID)

You have several processes running in the background as shown from the jobs command below:

[1] + Running gedit &amp;
[2] + Stopped crontab e

What command will bring the gedit program to the foreground?

fg 1 (not fg [1])

You have a gedit process with a job ID of 6. Which command would you enter at the command prompt to send the process to the background?

(typed)

bg 6

You need to send a process to the foreground. Which command should you enter to identify the job ID for the process?

Jobs (not ps, top, or nice)

Which kill option stops and restarts the process with the same Process ID (PID)?

-SIGHUP (-SIGINT= -2, -SIGTERM=-15, -SIGKILL= -9)

What is the result of the nohup gedit &amp; command?

gedit will start in the background and persist in the background after logging out of the shell.

You have been called in to a remote site to troubleshoot a problem with a process that needs to be terminated. You are taken to the workstation with the problem and immediately realize that it is an implementation of Linux you have never worked with before.

Which option would you use with the kill utility at the command prompt to see the valid signals available with this Linux system you’re not familiar with?

(typed)

kill-I (lower L)

You need to manage a process in the foreground by pressing Ctrl+C on the keyboard. What signal code is sent to the process?

SIGINT (same as -2)

A developer calls with a problem. They were trying to debug a new daemon and mistakenly placed it on the production machine instead of on a lab machine. To ensure the CPU gives preference to other processes, you need to lower the daemon’s priority. The PID number is 2345.
Which command would you use to decrease the daemon’s priority?

renice -n 10 2345 (decrease, or make slower—backwards)

You need to determine the priority of several processes. Which command should you enter to identify the process ID and nice value for each process?

top (nice and renice make adjustments, jobs doesn’t display PID or nice)

What would you enter at the command prompt to start the gedit process with a highest priority possible?

(typed)

nice -n -20 gedit

What is the default nice value for a process not executed with the nice command?

(typed)

0 (not the priority= 80, but nice=0)

Which of the following commands starts the gedit program with a priority 1 above the default nice priority?

nice -n -1 gedit (above, or 1 faster than default… Backwards…. Default = 0)

Which command could you use to verify if a crontab file exists for user thobbs?

crontab -I -u thobbs (-r= remove, -e=edit, -a=append) (-l=list, -u=user)

You are editing the crontab file and want an entry to run every hour at five minutes past the hour. Which of the following entries will accomplish this?

5 * * /home/emmett/e * * * /home/emmett/example.sh (min, hour, day, month, dpw)

You want to keep the gshant user from editing his respective crontab file in /var/spool/cron, but still allow all other users on the system to edit their respective crontab file. What is the full path and filename of the file you should edit?

(typed)

/etc/cron.deny (define deny, allow rest)

Which file should you edit if you want to permit specific users to edit their respective crontab file, but deny all other users on the system from editing their crontab file?

/etc/cron.allow (allow takes precedence over deny, define allowed, block rest)

After logging in as root, you need to manage the crontab files for your Linux system. Which command should you use to edit the crontab file for the gshant user account?

crontab -ue gshant (-u= username, -e=edit) (Don’t use vi)

Which command should you enter at the command prompt to list the tasks in the <b>at</b> queue for the current user?

(typed)

atq (at "query")

Which daemon must be running if you want to use the at command?

atd (at "daemon") (user systemctl status / is-enabled)

You want to keep the gshant user from using the at command, but still allow all other users to use it. What is the full path and filename of the file you should edit?

(typed)

/etc/at.deny (same as cron)

Which of the following statements best describes the effects of having only the gshant user account listed in the /etc/at.allow file?

Only gshant and root can use the at command.

What should be entered at the command prompt to remove tasks 2 and 3 in the <b>at</b> queue?

(typed)

at -d 2 3 (or) atrm 2 3

If a system is down at the time a recurring regularly scheduled task is supposed to run, which task scheduling service will run the task when the system is back up again?

anacron

What is the full path and filename of the file that is used to schedule tasks for the anacron daemon?

(typed)

/etc/anacrontab (don’t forget the "tab," just like /etc/crontab)

You have an anacrontab file with the following settings:

RANDOM_DELAY=35 START_HOURS_RANGE= 17-23

#period in days delay in minutes job-identifier command
1 5 cron.daily nice run-parts /etc/cron.daily
7 20 cron.weekly nice run-parts /etc/cron.weekly
@monthly 50 cron.monthly nice run-parts /etc/cron.monthly

Between which hours of the day will tasks scheduled with anacron start to run?

If the system was down during the time period a weekly task was scheduled to run, what is the minimum amount of time anacron will wait, after the system is back up, before running the task?

If the "delay in minutes" for daily tasks is 5 minutes, how much time will anacron add to the delay of 5 minutes before it runs the scheduled daily task?

1. Between 5pm and 11pm 2. 20 Minutes 3. A randomly chosen number of minutes between 0 and 35 (1= days, 7=mins) (7=days, 20=mins)

What <b>service</b> does cron rely on to run the scripts in the /etc/cron.daily, /etc/cron.weekly, and /etc/cron.monthly directories?

(typed)

Anacron

anacron creates a timestamp file that tells you the last time a regularly scheduled job was run. What is the full path and name of the directory that contains these timestamp files?

/var/spool/anacron (Unchecked?)

What does the Iprm command do?

Removes jobs from the line printer print queue

What information about print jobs does the utility Ipq display? (Select two.)

A numerical job ID that can be used to manipulate the job from other utilities The username of the person who submitted the job

You want to send the yearend.txt file to the acctg printer. Which command would you use?

Ipr -P acctg yearend.txt (lower L) (lpr= print, lpc=management info)

User badams sends two print jobs to the Marketing printer (the default printer). He notices the printer is stalled on the first document, and uses the Iprm – command. What will be the result?

Both of his jobs will be deleted. (regular user= only they jobs will be removed)

You want to configure your CUPS from a Web browser. Which command is correct?

http://localhost:631 (always port 631)

You have connected a new printer to a systemd-based Linux server. You cannot print to the new printer from a user workstation on the network. What tasks should you do first on the server? (Select two.)

Use rpm -qi cups or dnf list cups to make sure the CUPS daemon is installed. Use systemctl status cups to make sure CUPS printing service is running.

You want to configure your CUPS from a Web browser. Which URL address and port should you enter within the Web browser’s address field?

(typed)

http://localhost:631 (forward "/", not "\")

You are using the cupsctl command to configure the /etc/cups/cupsd.conf file. Which cupsctl option will enable the sharing of the locally-connected printer to other computers on the network?

(typed)

–share-printers (must use "s"… printerS)

You are configuring the /etc/cups/cupsd.conf file. Which command should you use to prevent remote printers from being displayed on the local system?

cupsctl –no-remote-printers (not –no-remote-admin, or –no-share printers)

Which of the following lines in the /etc/cups/cupsd.conf file will configure CUPS to listen for print jobs sent only from the local system?

Listen localhost:631 (there can’t be an IP)

What should you enter at the command prompt to print 23 copies of the comparables file on the homeprint printer?

(typed)

Ipr -P homeprint -#23 comparables (printer then the number)

Which Ipr option should you use to change the page width of the print job?

-w

Which command will show the contents of all the print queues on your Linux system?

(typed)

lpq -a

Which of the following commands removes print job 11 from the hp7 printer?

cancel -P hp7 11 (not lprm)

Which of the following lines in the /etc/cups/cupsd.conf file will configure CUPS to listen for print jobs coming in on the server’s network interface with the IP address 192.168.0.1 through the IPP port?

Listen 192.168.0.1:631 (match the IP)

For what purpose would you edit the /etc/localtime file?

Set the current time zone.

You need to create a symbolic link to the /usr/share/zoneinfo/EST time zone file that permanently alters the time zone for the system. What do you enter at the command prompt to accomplish this?

(typed)

In -s /usr/share/zoneinfo/EST /etc/localtime (symbolic link | time zone file | system time zone reference file)

What is the full path to the directory on a Linux system that contains multiple files and directories used for selecting a time zone?

(typed)

/usr/share/zoneinfo (/etc/localtime = the system file reference link)

Which command should you use to change the time zone (TZ) environment variable? (Select two.)

tzconfig tz select (date= shows time, netdate= syncs time)

You need to set the system date and time using the date command. Which date option should you use?

-s

A Linux system can determine the time and date in which of the following ways? (Select two.)

It can set the system clock to the local time. It can use NTP to set time. (SMTP and NNTP don’t)

You have a large TCP/IP network and want to keep hosts’ real time clocks synchronized. What protocol should you use?

NTP (Network Time Protocol)

You are using a systemd-based Linux system and have made changes in the /etc/ntp.conf file. Which of the following commands should you use to implement these changes?

systemctl restart ntpd (not enable)

You are managing system time on your Linux computer, and you need to change the settings to point to a local NTP server IP address. What is the full path and filename of the file you should edit?

(typed)

/etc/ntp.conf (use vi to insert a new server) (/ect/localtime= time zone data)

Which of the following commands manages the NTP daemon from the command line?

ntpd (ntpq= queries, ntpdate= syncs time to prevent insane time)

Your system time is over thirty minutes different than the time on the NTP time provider. When you use the ntpd command, the time is not updated. Which ntpd option should you include?

(typed)

-g (ntpd -g= ignore insane time)

You want to set the system time with the date command to UTC time. Which date option should you use?

-u (-d= displays date specified by date, -s= sets date and time)

You want to configure the NTP daemon to receive time from pool.ntp.org. What entry should you place in the /etc/ntp.conf file?

server pool.ntp.org (long vi file with list of servers)

Which of the following commands will set the system time to match the time server on the network at 192.168.1.10?

netdate 192.168.1.10 (ip or domain name) (not date, hwclock, or ntpd)

You need to install an e-mail server. Which of the following applications are valid Linux e-mail applications? (Select two.)

Postfix Sendmail

What do you enter at the command prompt to display the contents of an MTA mail queue?

(typed)

mailq

Which of the following MTAs use the QMQP and QMTP protocols?

qmail

Which of the following MTAs are modular? (Select two.)

qmail postfix (in alphabetical order, the 2 in the middle are modular: exim, postfix, qmail, sendmail)

By default, which protocol is used by an MTA to send messages to other MTAs?

SMTP (Simple Mail Transfer Protocol)

Which of the following are common protocols used by MTAs to send messages to MUAs? (Select two.)

IMAP POP3 (From the last MTA to the R. MUA)

Recently, you updated the /etc/aliases file with several email aliases. What command do you use at the command prompt to update /etc/aliases.db file?

(typed)

newaliases

Which of the following files stores the aliasing information for MTAs?

/etc/aliases.db (not ~/.forward)

You are logged in as gshant, and you want to forward your mail to the dwant user on the local network. Which file should you edit to redirect the mail for a gshant user?

(typed)

-/.forward (~/= home dir, "."= hidden file)

What is the full path and filename of the file that contains mail for the qshant user account?

(typed)

/var/spool/mail/gshant (don’t forget the user)

Which of the following directories contains email for each user account on the system?

/var/spool/mail

Which database object in an SQL table represents attributes?

columns (record=row)

Enter the SQL command that will list all tables in the grades database.

(typed)

SHOW TABLES grades; (not SELECT * FROM grades;)

Which of the following SQL commands will group information in a list?

GROUP BY (located under the SELECT command)

Which SQL database object represents a single entity or item?

record (not primary key)

Which clause should you add to the SELECT command to filter results from an SQL database?

(typed)

WHERE

You need to show the contents of the location and price fields in the shirt table in an SQL database. Which SQL command should you use?

SELECT location, price FROM shirt; (need the "," without the "()" )

Which clause should you add to the SELECT command to sort results from an SQL database?

(typed)

ORDER BY (not SORT)

You use the following command to retrieve specific entry information from the shirt table:

<b>SELECT location, price FROM shirt</b>

However, the command is not returning any information. What should you do?

Add a semicolon to the end of the statement. (No other commands are needed)

Which of the following statements best describes the purpose of the following SQL command?

<b>DELETE FROM shirts WHERE color=’pink’ AND type=’polo’ AND gender=’male</b>;*

Records for men’s pink polo shirts will be removed from the shirts table. (not pink "or" polo… pink "and" polo)

What information is displayed by dmesg? (Choose the most correct answer.)

All kernel hardware information

You are trying to troubleshoot intermittent errors that are occurring while continuing to work on other projects. Which command displays system messages, but only the ones that are panic messages?

dmesg -n 1 (Sends only the most critical)

You just installed a new CD-ROM drive in your computer. After boot, you can’t find the CD-ROM drive anywhere. What commands could you enter to start troubleshooting? (Select two.)

journalctl dmesg (sar= CPU info, last/lasb=logon info)

Which of the following commands would allow you to determine if a service or driver failed to load during boot up? (Select two.)

dmesg journalctl -b (dmesg= boot loges/hardware errors, journalctl -b= system boot messages) (no /var/log(s))

You suspect your system has been compromised by a user through a remote login. Which file is most likely to have information related to an intrusion?

/var/log/secure (/var/log/dmesg= reports messages received during boot hardware config)

Which of the following logs is also known as the kernel ring buffer?

/var/log/dmesg

You want to review all failed login attempts on the system in the /var/log/btmp binary file. Which of the following commands should you use?

lastb (lower L) (last= last logged users /var/log/wtmp, faillog= failure logs /var/log/faillog)

What daemon is typically used by systemd Linux system for system logging?

(typed)

journald (DEAMON…. Not journalctl)

What is the full path to the directory where the system log file called the journal is maintained by the journald daemon?

(typed)

/var/log/journal/ (log "singular", don’t forget the "/" a the end)

The journald daemon maintains a system log file called the journal in the /var/log/journal/ directory.

1. What do you enter at the command prompt to read the contents of the journal?

2. What key do you press to close the journal?

(both typed)

1. journalctl 2. q

What do you enter at the command prompt to read the contents of the journal starting with the most recent entries?

(typed)

journalctl -r (-r= reverse)

What do you enter at the command prompt to not only see the most recent entries to the journal, but to also see new entries as they are being added in real time to the journal?

(typed again)

journalctl -f

Using journalctl with the -b option allows you to see messages in the journal relating to system boot events.

1. What do you enter at the command prompt to see messages from the most recent system boot?

2. What do you enter at the command prompt to see messages from the third system boot event from the beginning (or oldest messages) of the journal?

3. What do you enter at the command prompt to see messages from the third system boot event from the end (or most recent messages) of the journal?

1. journalctl -b 2. journalctl -b 3 3. journalctl -b -3

Which type of looping script executes while a condition is true?

(typed)

while (executes "while" a condition)

You are creating a script to run in a BASH shell session. What line of code should you write as the first line (also known as the standard shell declaration) in the script?

(typed)

#!/bin/bash

You are working with the myapps script in the current working directory. The current working directory is not part of the PATH environment variable. What command should you use to execute the script?

./myapps

What character should precede comments in a script?

(typed)

#

Which of the following begin and finish a while loop?

done do

Which type of script control structure is useful when a specific action needs to be done a set number of times?

for

Which command do you write in a script to declare functions?

(typed)

declare -f

Which script control structure tests whether a directory exists?

test (test is an option within if,then,else)

What is the purpose of the read command in a script?

Creates a script variable and prompts the user to type text.

Which command do you use in a script to create a sequence of numbers in a control structure?

(typed)

seq

What are you essentially doing when you create a shell function at the command prompt?

Defining a command you can use as if it were a standard command.

When you define a function at the shell prompt, where is the function saved and what happens to it when the shell session is closed?

The function is saved in memory and it is deleted from memory when the shell session closes. (saved to mem and lost)

You are writing a bash script that searches for files with a specific date stamp. You want to create a function called datestamp in that script that finds the date stamp on a given file. How do you declare a function called datestamp in this script?

function datestamp () (need the "function")

You have declared a function as follows:

function timestamp ()

1. What character must come before the lines of code that are used for the timestamp () function?

3. What character must come after the lines of code that are used for the timestamp () function?
(both typed)

1. { 2. }

When you declare a function, you include open and close parentheses after the name of the function, for example, function list (). What do the parentheses allow you to include when you invoke or call the function?

(typed)

arguments (not variables)

At the command prompt, how would you enter a command that will print the line count, word count, and byte count respectively in the /home/gshant/servepath file?

(typed)

wc /home/gshant/servepath (-c= bytes, -m-character, -l= line count, -w=word count)

Which command will display each line in a text file based on the alphabetic characters?

sort (-n= number, -r= reverse, -d= ignores the special characters)

You need to change how the formatting displays the /home/varstown file. Specifically, you need to replace each tab character with 3 spaces when you print the file to the screen. What command should you enter at the command prompt?

(typed)

expand -t 3 /home/varstown (-t= number of spaces)

Which command will merge two files on a line-by-line basis, and separate each line with a tab?

paste (join= based on fields)

You need to change the formatting of the /home/varstown file as it prints. Specifically, you need to add doublespacing to each line in the file. How should you enter the command at the command prompt?

(typed)

pr -d /home/varstown (pr= print format, -d= double space, -o #= margin)

Which of the following commands displays all lines in ~/smarts, omitting the last 10 lines?

head -n -10 ~/smarts (head -n 10= shows the 1st 10 lines)

You need to obtain specific information found in the columns of ~/smarts. Which of following commands should you use?

cut -f ~/smarts (There is no join -s) (You would use //cut -d’ ‘ -f<#> ~/smarts

Which of the following statements best describes the nl -s ": " myfile command?

nl adds the number, a colon, and a space to the front of each line in the file. (-s= specifies the text to be places between the number and the line. Default is 2 spaces)

Which text stream processing command filters identical, adjacent lines from a single file?

(types)

uniq (-d= prints only the duplicate line, -u= leaves out the duplicate lines)

Which command transposes characters in a text steam?

tr (tr=transpose)

You need to change how the /home/varstown file is displayed. Specifically, you need to replace 4 consecutive spaces with a tab when you print the file to the screen. How should you enter the command at the command prompt?

(typed)

unexpand -t 4 /home/varstown (-t= specifies number of spaces… Default is 8 spaces)

Which of the following statements best describes the <b>split -50 -d -a 3 AllNames FiftyNames- </b>command if there are 103 lines and 240 bytes in the file?

The AIINames file is split into three files containing 50 lines or less. The output is FiftyNames-001, FiftyNames-002, and FiftyNames-003. (-50= lines per split file) (-d= use numeric suffixes rather than aa/ab/ac/ad…) (-a 3= number of characters in the suffix 001/002/003…)

You are accessing the /home/shants/depsmark text file through a terminal connection. The file has long lines of text, yet your terminal only shows 75 characters per line. What command should you use to limit the lines in the file to the limits on the terminal?

fmt /home/shants/depsmark (fmt -w 75 /home/shants/depsmark) (cut= removes characters and fields, nl= places a line number on front of each line, pr=formats a text file for printing)

You are using awk to print a sorted list of the user names in /etc/passwd. Which command will accomplish the sorted output?

awk -F: ‘{print $1}’ /etc/passwd | sort (-F= fields delimiter, $1= 1st field)

You want to issue a simple command to replace all the occurrences of the string <b>foo</b> with the string <b>bar</b> in the file myfile.txt. You have decided to use <b>sed</b>. Which line will work?

sed -e ‘s/foo/bar/g’ myfile.txt (The tailing "g" allows any instance of "foo" to be changed. Otherwise, only the 1st "foo" would be changed per line)

With a growing concern for security, you convince your boss to stop allowing telnet access to the network. Remote connections will now be allowed only through the use of ssh. Which port must you allow through the firewall for ssh access?

22

You check the IP address on a host on the network. The address is 122.16.155.71 with a mask of 255.0.0.0. What is the broadcast address?

122.255.255.255 (Network=122, Host=16.155.71)

What is the default subnet mask for address 132.44.156.67?

255.255.0.0 (1-126, 128-191, 192-223)

What is the network address for the address 199.78.240.240 if the default subnet mask is used?

199.78.240.0 (1-126, 128-191, 192-223)

Which of the following IP addresses belong to the Class A network 114.0.0.0? (Select three.) Tip: Assume the network is indicated by the default portion of the IP address.

114.0.0.15 114.122.66.12 114.58.12.0 (255.0.0.0)

You have a computer that is connected to the Internet through a NAT router. You want to use a private addressing scheme for your computer. Which of the following IP addresses could you assign to the computer? (Select three.)

172.18.188.67 10.0.12.15 192.168.12.253 (10.0.0.0 to 10.255.255.255 172.16.0.0 to 172.31.255.255 192.168.0.0 to 192.168.255.255)

Which of the following protocols allows hosts to exchange messages to indicate problems with packet delivery?

ICMP (not TCP)

You are an application developer and are writing a program to exchange video files through a TCP/IP network. You need to select a transport protocol that will guarantee delivery.

Which TCP/IP protocol would you implement that provides this capability?

TCP (Transport Layer = UDP / TCP)

You want to maintain tight security on your internal network, so you restrict access to the network through certain port numbers. If you want to allow users to continue to use DNS, which port should you enable?

53

You are configuring the IP address for a host and have been asked to use the address 192.160.99.110/16. What subnet mask value would you use?

255.255.0.0 (8+8+0+0=/16)

Which of the following IP addresses is a valid IP address for a host on a public network?

142.15.6.1 (Private = 10.0.0.0 to 10.255.255.255 172.16.0.0 to 172.31.255.255 192.168.0.0 to 192.168.255.255)

You have a computer that is connected to the Internet through a NAT router. You want to use a private addressing scheme for your computer. Which of the following IP addresses could you assign to the computer? (Select all that apply.)

10.0.12.15 192.168.12.253 172.18.188.67 (10.0.0.0 to 10.255.255.255 172.16.0.0 to 172.31.255.255 192.168.0.0 to 192.168.255.255)

Your computer has an IP address of 161.13.5.15. Your computer is on a

Public network (Private = 10.0.0.0 to 10.255.255.255 172.16.0.0 to 172.31.255.255 192.168.0.0 to 192.168.255.255)

Which TCP/IP configuration parameter identifies the router that is used to reach hosts on remote networks?

Default gateway

What is the path and filename of the file in the Linux system that lists all network services, including the port assigned to the service?

/etc/services

You need to temporarily change the IP address of the network interface (enp2s0) to 192.168.1.50 where it is currently set to 10.0.1.50. Which of the following commands would achieve the desired result?

ifconfig enp2s0 192.168.1.50

If you are managing a systemd-based Linux system, which of the following commands cannot be used to bring the enp2s0 interface down?

/etc/init.d/network stop /etc/sysconfig/network-scripts/ifcfg-enp2s0 down

You need to set an IP address for enp2s0 to 192.168.15.2 with a subnet mask of 255.255.255.0. Which commands are correct? (Select two)

ip addr add 192.168.15.2/24 dev ifconfig enp2s0 192.168.15.2 netmask 255.255.255.0

The enp2s0 network interface has already been assigned the IP configuration: 172.16.1.123/16. Which command would you use to temporarily configure a second IP address of 192.168.0.123/24 for this network interface?

ip addr add 192.168.0.123/24 dev enp2s0 (ifconfig temp replaces)

Which commands display the IP address and subnet mask values configured on a workstation? (Select two)

ip addr show ifconfig

You have a TCP/IP network with 50 hosts. There have been inconsistent communication problems between hosts. You run a protocol analyzer and discover that two hosts have the same IP address assigned.

Which protocol can you implement on your network to help prevent problems such as this?

DHCP

The enp2s0 interface is currently down. What can you enter at the command line to start the enp2s0 interface?

(typed)

ifup enp2s0 (or) ip link set enp2s0 up s

You have just made IP configuration changes in the ifcfg-enp2sl file. You do not want to restart the Linux system or restart the network service to put these changes into effect. There are two ip commands you can use to put these changes into effect.

1. What is the first ip command you enter at the command line to put these changes into effect?

2. What is the second ip command you enter at the command line to put these changes into effect?

1 ip link set enp2sl down 2 ip link set enp2sl up

Which of the following describes an IPv6 address? (Select two)

Eight hexadecimal quartets 128-bit address

Which of the following correctly describe the most common format for expressing IPv6 addresses? (Select two.)

Hexadecimal numbers 32 numbers, grouped using colons

Which of the following are valid IPv6 addresses? Select all that apply.

141:0:0:0:15:0:0:1 6384:1319:7700:7631:446A:5511:8940:2552

Which of the following is a valid IPv6 address?

FEC0::AB:9007 (0-9, A-F, 1 "::")

IPv6 uses 128-bit addresses. The address contains two 64-bit components.

What is the first 64-bit component called?

What is the last 64-bit component called?

(both typed)

Prefix Interface ID

Which of the following describes link-local IPv6 addresses? (Select 3)

Link-local IPv6 addresses begin with FE8, FE9, FEA, or FEB. Link-local IPv6 addresses are not routable. Link-local IPv6 addresses must be assigned to any network interface on a Linux system.

In which IPv6 configuration method do clients use Neighbor Discovery Protocol to send router solicitation and router advertisement messages as part of the process of automatically generating the interface ID and learning the subnet prefix and default gateway?

Stateless autoconfiguration (Static assignment= manual, DHCPv6= used DHCPv6 server)

Which routing component is used to forward packets to remote networks?

Default gateway

You have replaced the default gateway on your network. The gateway had used the IP address of 201.12.3.4 and you must remove it from the routing table. Which command would you use to accomplish this?

route del default gw 201.12.3.4 (route add, route del, ip rout add, ip route del)

After an acquisition of another company, you are in a position where you must add another network to the existing routing tables. Which of the following commands would you use to accomplish this? (Select two)

ip route add 11.12.13.14/24 via 201.12.3.4 route add -net 11.12.13.14/24 gw 201.12.3.4 (ip route add= no -net) (rout add= -net for network, not -host)

As a system administrator you need to add a static route so that you can reach host 195.156.76.122 255.255.255.0 and the device eno32 to find the target network. Which commands will work? (Select two)

ip route add 195.156.76.0/24 dev eno32 route add -net 195.156.76.0 netmask 255.255.255.0 dev eno32 (ip route does not use netmask because it uses CIDR) (routeadd needs -net, netmask, and dev)

As a system administrator you are going to add a static route for host 195.157.66.221 255.255.255.0. Your default gateway is 192.168.5.1 but you want this route to use gateway 192.168.7.1. Which commands will work? (Select two)

route add -net 195.157.66.0 netmask 255.255.255.0 gw 192.168.7.1 ip route add 195.157.66.0/24 via 192.168.7.1

As a system administrator you want to block (reject) any packets from 170.122.0.0 255.255.0.0. Which command will block those packets?

route add 170.122.0.0 netmask 255.255.0.0 reject (not block)

Which of the following utilities would you use to view the routing table? (Select two)

route ip route show

Which of the following configuration files holds the name of the host?

/etc/hostname (host and domain names)

What would you enter at the command prompt to find the IP address for the xyzcomp.com domain?

(typed)

host xyzcomp.com (Not getent, dig, hostname, or nslookup) (host SINGULAR)

What would be the result of the following command?

<b>host www.somedom.com</b>

The IP address of the computer www.somedom.com would be displayed.

Which of the following files contain information that enables a Linux system to resolve IP addresses to FQDN/host names. (Choose all that apply.)

/etc/hosts /etc/resolv.conf (not /etc/services or /etc/sysconfig/network-scripts/ifup)

You are asked to troubleshoot a problem on a user’s computer. When the user types the name of any Web site, he gets a message "The page cannot be displayed".

You determine that nothing has changed on the computer. What is the likely problem?

The DNS server is down or not reachable.

Which network service would you use to get the IP address from the Fully Qualified Domain Name (FQDN) hostname?

DNS (Not NAT, DHCP, FTP)

You want to implement a protocol on your network that allows computers to find the IP address of a host from a logical name. Which protocol should you implement?

DNS (Not Telnet, DHCP, or ARP)

You are the administrator for a small network of Linux hosts. Your network does not communicate with the Internet and does not use DNS. When you add a new host named ENERGY7 to the network, which entry should be added to the /etc/hosts files?

192.168.0.34 ENERGY7 #Reception Area (IP, Name, Description)

Your ISP has changed the IP addresses of their DNS servers. What would you need to do on your Linux system to still be able to continue resolving host and fully qualified domain names if you use statically assigned IP address information?

Enter the IP addresses of the new DNS servers into the /etc/resolv.conf file. (Not /etc/hosts)

You are the system administrator of a test lab of computers running Linux. For security reasons your lab is not connected to the corporate network and therefore you are not able to resolve host names via the corporate DNS server. You do, however, want to be able to connect to the lab computers using host names, but you do not have the resources to bring up your own DNS server.

Which of the following solutions would satisfy your requirements?

Enter the IP addresses and host names for all of the lab computers in the /etc/hosts file on each of the machines in the lab.

What is the full path and filename of the file you should edit to determine the order in which name resolution is done?

(typed)

/etc/nsswitch.conf

You open the /etc/nsswitch.conf file and observe the following line:

hosts: files dns

What is the result of this configuration?

The /etc/hosts file takes precedence over information obtained from a DNS server when resolving domain names. (getent hosts <host_name> can be used to search host names using nsswitch method)

Which of the following commands would allow you to see if a remote computer is reachable?

ping

Which command could you use to see the path that a packet traveled across a network to a remote host?

Traceroute

Which utility is similar to traceroute but does not require elevated privileges?

(typed)

tracepath

You have just finished configuring a new network card in your Linux system. You would like to verify that it is configured to access the Internet. Which of the following solutions would best help you verify that you have Internet access?

Attempt to ping a site on the Internet. (outside the LAN)

You are attempting to ping another computer on the Internet by its IP address, but you are not getting a response. You do however get a response when pinging a host on your own network. Which of the following commands would help you better determine where the problem is?

Run traceroute on the IP address of the computer on the Internet. (netstat will not help in this scenario)

You would like to see how many different computers are currently connected to your local workstation. Which of the following commands would allow you to do this?

netstat (not ping, traceroute)

After arriving at work in the morning you turn on your Linux workstation and attempt to visit an Internet news site. After a few minutes your Web browser times out telling you that the Web site is unavailable. Which of the following troubleshooting steps would be helpful in determining the problem? (Choose all that apply.)

Use the ping command to ping the FQDN and IP address of the Web site you are trying to reach. Use the traceroute command to traceroute the FQDN and IP address of the Web site you are trying to reach.

You are having trouble contacting a host on another network. Ping fails, but you would like to get more information about the router in the path where the communication stops. Which of the following utilities would you use?

traceroute

You are troubleshooting a workstation that is having trouble while browsing the Internet. You want to perform some tests on name resolution. Which utility would give you the most information?

dig (more information that nslookup)

A user calls the help desk to report that she is unable to connect to the network after an upgrade of her Linux operating system. You suspect the problem is related to the network configuration. Which commands could you use to quickly see the current IP address(es) assigned to her computer? (Select two.)

ifconfig -a ip addr show (netstat -a= shows listening sockets)

Which utility would you use to view current connections and active sessions and ports on a computer?

netstat (current / active)

Which command displays network activity statistics for TCP, UDP, and IP?

netstat -s (-s = statistics for each protocol)

While troubleshooting a problem on a Linux system, you run a utility that generates the following output:
5 s3232.gw.Seat.someisp.net (63.201.72.9) 38.433 ms 38.713 ms 39.085 ms
6 stlll22.garl.Seat.someisp.net (211.242.9.121) 38.620 ms 38.593 ms 38.050 ms
7 oc48-6yy.Seat.someisp.net (14.248.154.129) 57.440 ms 56.678 ms 57.675 ms
8 t223hgh-ytry.swa.someisp.net (142.133.89.232) 103.041 ms 57.181 ms 56.619 ms
9 t8343mmd.cgssel.someisp.net (162.191.10261) 91.977 ms 93.971 ms 93.767 ms
10 twirem2.cgssfdl.ip.someisp.net (145.97.133.23) 92.463 ms 92.337 ms 93.523 ms
11 twerrml.nfffsiny.ip.someisp.net (117.116.141.38) 106.000 ms 106.007 ms 105.283 ms
12 gbed22repp0.n5ddsdsy.ip.someisp.net (123.194.132.8) 103.198 ms 105.447 ms 104.263 ms

Which of the following utilities were you using?

traceroute (each router and the time)

You are troubleshooting a connectivity problem on a Linux server. You are able to connect to another system local network, but are not able to connect to a server on a remote network.

You suspect that the default gateway information for the system may be configured incorrectly. Which of the following commands would you use to view the default gateway information on the Linux server?

netstat -r (-r= routing table/ IP address of default gateway)

Which of the following commands can be used to retrieve the IP address and/or FQDN/host name information from a DNS server? (Choose all that apply.)

host dig nslookup (not netstat)

You are the only Linux administrator for a very small company. You are constantly asked to fix one problem or another as they occur. How should you log in to the system each morning?

Logon as a regular user, then use su as needed to solve problems. (not as root)

You have logged in as a regular user when a frantic phone call comes in. The ABCD process must be started on the server now, but can only be run by root. Which command would you use to start this process?

sudo ABCD (su ABCD = think user is ABCD)

You have used su to switch to the root user account to do system administration tasks. You now want to revert back to your regular user account. Which command should you use?

exit

You are currently logged in using the badams account. You want to view the contents of the /etc/inittab file, but you are not allowed to with the badams account. Which command could you use to view the file?

su -c "cat /etc/inittab" -I (-c= command, there is no -f)

You need to configure which commands are allowed to be used with the sudo command. What is the full path and filename of the file you should edit?

(typed)

/etc/sudoers (use visudo)

What do you enter at the command prompt to edit the /etc/sudoers file?

(typed)

visudo

What is the effect of the following command?

<b>chage -M 60 -W 10 jsmith</b>

Sets the password for jsmith to expire after 60 days and gives a warning 10 days before it expires. (-m= minimum, -M= maximum, -W= warning)

What chage command should you enter at the command prompt to set the password for jsmith to expire after 60 days and gives a warning 10 days before it expires?

(typed)

chage -M 60 -W 10 jsmith (-m= minimum, -M= maximum, -W= warning)

Which chage option keeps a user from changing password every two weeks?

-m 33 (-m= minimum, -M= maximum, -W= warning)

What do enter at the command prompt to prevent the shell from using too much of the system’s resources?

(typed)

ulimit (no switch)

What effect does the ulimit -t 600 command have on a Linux system?

Limits CPU time for a process to 10 minutes. (-t= cpu time in seconds)

What is the full path and filename of the file you should edit to limit the amount of concurrent logins for a specific user?

(typed)

/etc/security/limits.conf (/limits/ = plural)

Within the /etc/security/limits.conf file, you notice the following entry:

@guests hard maxlogins 3

What effect does the line have on the Linux system?

Limits the number of max logins from the guest group to three. (@= group)

You are limiting the total amount of memory a user can use when they use the X Windows System. Which of the following limit keywords should you use?

rss (cpu= cpu time, nproc= number of concurring user processes, data= amount of RAM an application can use)

What is the purpose of the find / type f -perm -o=x -Is command?

Audit files in the root directory that have execute permissions for others. (not owner)

What is the purpose of the <b>find / type f -perm -u=s -Is</b> command?

Audit files in the root directory that have the SUID bit set.

What is the full path and filename of the file you should create to disable user login on a Linux system?

(typed)

/etc/nologin (singular)

Which configuration file should you edit to enable Pluggable Authentication Modules (PAM) to check for a file named /etc/nologin?

/etc/pam.d/login (not "nologin")

You need to block all users from logging in to the Linux system while you resolve a serious issues. You first need to force all active users to logout. Type the command you would enter to display a list of all active users?

(typed)

w

Login blocking is enabled using the Pluggable Authentication Modules (PAM) module. Type the line that needs to be in the /etc/pam.d/login file to configure PAM to check and see if a file named /etc/nologin exists?

(typed)

auth requisite pam_nologin.so (auth required pam_nologin.so= RedHat)

PAM is configured on your system to look for the presence of the nologin file in the /etc directory. If the nologin file exists, user login is disabled and only the root user can log in.
If your current working directory is root’s home directory, which command would you enter to quickly create an empty nologin file in the /etc directory?

(typed)

touch /etc/nologin

What will the netstat -a command show?

All listening and non-listening sockets

What should you enter at the command prompt to scan for open TCP ports on your Linux system?

(typed)

nmap -sT (no localhost)

You need to increase the security of your Linux system by finding and closing open ports. Which of the following commands should you use to locate open ports?

nmap (nmap= ports, netstat= network connections)

What should you enter at the command prompt to display both listening and non-listening sockets on your Linux system?

(typed)

netstat -a (-I lists listening sockets, -s displays statistics for each protocol, -i displays a table of all network interfaces.)

Removing unneeded software will increase the security of your Linux system. If your system uses RPM for package management, what can you enter at the command prompt to look for unneeded software that might be installed on your system?

(typed)

dnf list installed (Dabian= dpkg -get-selection)

Unneeded network services might provide attackers with an entry point for an attack. To view a list of services, or units, installed or running on a systemd-based system, what could you enter at the command prompt?

(typed)

systemctl list-units (chkconfig= for older init systems)

You manage a Linux server that only occasionally and at random times needs to provide ftp services. To save on resources you want to have the ftp server service running only when it is needed and stopped the rest of the time. Which of the following solutions would satisfy these requirements and require the least amount of effort?

Enable the ftp service to be managed by the xinetd service.

How would you enable the rsync service to be managed by the xinetd super daemon?

Create the rsync file in the /etc/xinetd.d (not a link)

Which super daemon is most commonly found in modern Linux distributions?

Xinetd (inetd was the old version)

Which of the following is an advantage of xinetd over inetd?

xinetd uses separate configuration files for each managed service.

What is the main purpose of the xinetd service?

To receive client requests for network services and to start and stop them on demand.

Management wants a compilation of specific data to occur every night. The only way to accomplish this is to copy files throughout all network hosts to one server via TFTP. Which file must you edit to enable xinetd to manage TFTP on the Linux server?

/etc/xinetd.d/tftp (contains spate configuration files for daemons being managed by xinetd)

You want to allow any host from westsim.com to have access to your system. What is the correct line item you would add to the /etc/hosts.allow file to accomplish this?

ALL: .westsim.com (not ALLOW: .westsim.com)

You want to allow any host from westsim.com to have access to your system except a system called testsvr.westsim.com. What is the correct line item you would add to the /etc/hosts.allow file to accomplish this?

ALL: .westsim.com EXCEPT testsvr.westsim.com (don’t use ANY, ALLOW, or NO)

Your site is dependent upon the use of the rlogin utility for remote access. For security reasons, you want to prevent the hosts in the marketing department from accessing the payroll server, but allow all others to do so. Which file should you use to create this restriction?

hosts.deny (host.allow is read 1st. If a match is found, it does not search anymore, is it part of the tcpd)

You want to limit telnet access to three specific users. How can you best accomplish this?

Enter IP address entries for the three users in the /etc/hosts.allow file.

You are modifying the tcpd control files of the xinetd super daemon. Of the two tcpd control files, what is the full path and filename of the file that is applied first?

(typed)

/etc/hosts.allow (host"S")

What should you enter at the command prompt to check the TCP wrapper configuration on your system?

(typed)

tcpdchk

You need to connect to a remote system whose host name is abc.def.com and execute a shell script called daily-backup.sh that backs up some files. The username that has permissions to execute that script is bubba.

Which command should you run to make the connection?

ssh -I bubba abc.def.com (not ssh abc.def.com:bubba)

Which is the most correct description for 3DES?

3DES is a very secure mode of the DES algorithm encryption method that encrypts data three times using a 168-bit key.

You want to change the port that SSH listens on. You are going to edit the /etc/ssh/sshd_config file. Which line, when added to the file, will change the listening port to 1066?

port 1066 (not listen)

A number of remote users call to say that they cannot connect this morning via SSH. When you look at the processes, you see that the daemon is not running. Which command would you use to solve this problem?

/etc/rc.d/init.d/sshd start (supposed to be the absolute path)

Which version of SSH supports both the Rivest, Shamir Adleman (RSA) and Digital Signature Algorithm (DSA) encryption standards?

(typed)

SSH2 (not SSHv2 line "IPv4")

Which of the following public keys is sent from the SSH server to the SSH client when they are in the process of establishing a session with the SSH1 protocol?

ssh_host_key.pub (SSH1!! SSH2 uses: ssh_host_rsa_key.pub ssh_host_dsa_key.pub)

Where does the client store SSH keys that are used for establishing an SSH session? (Select two.)

~/ .ssh / known_hosts /etc/ssh/ssh_known_hosts (/etc/ssh/sshd_config and ~/ssh/ssh_config are for configuration)

When using DSA to establish an SSH session, what is the name of the key that the SSH server will send to the client? (Tip: Enter the name of the key only.)

(typed)

ssh_host_dsa_key.pub

What is the full path and filename of the file you should edit to configure the SSH daemon on the server system?

(typed)

/etc/ssh/sshd_config (/etc/ssh/ssh_config is for client configuration)

The gshant user is attempting to connect to a remote SSH server; however, you need to override the default SSH configurations for the client system when he establishes an SSH session. Which of the following files should you edit?

/home/gshant/.ssh/config (In order: 1. command-line options 2. ~/ssh/ssh_config 2. /etc/ssh/ssh_config)

Which ssh option should you enter at the command prompt to set up an SSH tunnel for X server traffic?

(typed)

ssh -x

What is the purpose of the -N option in this command?
<b>ssh -f-N -L 2345:mail.mydomain.coni:110 [email protected]</b>

To ensure that SSH does not execute a remote command. (-f= runs SSH in the background after the password prompt. -N= ensures that SSH does not execute a remote command. -L= specifies the port numbers and server name.)

You would like to use SSH port tunneling to work on a remote system. You also need to ensure that all data that you send to the remote system is encrypted.

Which SSH configuration option, in the /etc/ssh/sshd_config file, needs to be set to yes?

AllowTCPForwarding (not AllowSSHForwarding)

When configuring the SSH daemon using the /etc/ssh/sshd_config file, which options can be set to either prevent or allow unrestricted access to all GUI features on the client? (Select two.)

ForwardX11Trusted X11Forwarding (X11Forwarding is the alternative)

Which <b>daemon</b>, or service, provides port tunneling to encrypt non-secure protocols such as email and X server traffic?

(typed)

sshd

What is the name of the hash function used to verify the public key for an SSH connection?

(typed)

MD5 checksum

Which keys are generated when you execute the ssh-keygen command with no options? (Select two.)

id_rsa.pub id rsa (dsa is not default)

As you configure your client for public key authentication, you decide to generate the DSA key pair.

You would like to configure the client to automatically provide the private key passphrase when needed so that you do not need to type the passphrase for every new SSH connection to a server.

Which command should you use in conjunction with the ssh-agent bash command? (Tip: Enter the command and options as if at the command prompt.)

(typed)

ssh-add ~/.ssh/id_dsa (dsa, not rsa)

When configuring public key authentication on your client system, which command enables the passphrase agent?

ssh-agent bash

You want to enable public key authentication on the server. Which option in the /etc/ssh/sshd_config file needs to be set?

PubkeyAuthentication yes (un-comment) (not RSAAuthentication yes)

Which utility should you use to encrypt emails, digitally sign emails, and encrypt documents? (Tip: Enter the name of the utility as if at the command prompt without options.)

(typed)

gpg

Which of the following gpg options digitally sign documents?

–clearsign (not –verify)

You believe your GnuPG key pair has been compromised and should no longer be used. Which gpg command option can you use to create a key revocation certificate for the key pair? (Tip: Type just the command option.)

(typed)

–gen-revoke (gpg revoke_output_filename –gen-revoke key_ID)

You believe your GnuPG key pair has been compromised and should no longer be used. Which two steps must you take to revoke a public key on a key server? (Select two.)

Revoke the key on a local system using the key revocation certificate. Send the revoked key to the key server.

You created a GPG key pair and you used JJones as the real name during the key generation process. Your current working directory contains a file named Payroll.txt that contains sensitive information.

1. What do you enter at the command prompt to encrypt the Payroll.txt file?

2. What is the name of the file that will be generated when you encrypt the Payroll.txt file?

(both typed)

1. gpg -e -r JJones Payroll.txt 2. Payroll.txt.gpg

Share This
Flashcard

More flashcards like this

NCLEX 10000 Integumentary Disorders

When assessing a client with partial-thickness burns over 60% of the body, which finding should the nurse report immediately? a) ...

Read more

NCLEX 300-NEURO

A client with amyotrophic lateral sclerosis (ALS) tells the nurse, "Sometimes I feel so frustrated. I can’t do anything without ...

Read more

NASM Flashcards

Which of the following is the process of getting oxygen from the environment to the tissues of the body? Diffusion ...

Read more

Unfinished tasks keep piling up?

Let us complete them for you. Quickly and professionally.

Check Price

Successful message
sending