Final Comprehensive Exam (Ch1-26)
-
The two login types are:
- CLI and GUI
- URI and CLI
- URI and CLU
- GUX and CLI
-
The location of users’ default shells is stored in the ______ file.
- /etc/group
- /etc/passwd
- /etc/gshadow
- /etc/shadow
-
Applications make requests to the kernel and receive resources, such as memory, CPU, and disk in return.
True or False?
- True
- False
-
Commands are interpreted by the shell and transformed into actions by the kernel.
True or False?
- True
- False
-
Which of the following are valid command lines?
(choose two)
-l ls /etc
ls -/etc
ls /etc -l
ls -l /etc
-
The _____ option to the
uname
command will display the kernel name.- -s
- -k
- -x
- -n
-
The ______ command will display your current working directory.
uname
pwd
exit
exec
-
Shell command man pages are typically located in section ___.
- 4
- 2
- 1
- 3
-
A pair of single quotes ‘ will prevent the shell from interpreting any special character.
True or False?
- True
- False
-
Environment variables can be viewed by running:
(choose two)
- vars
- export -p
- env
- export -e
-
Environment variables cannot be created by which command?
- declare
- typeset
- export
- set
-
The path testdir/file.txt is:
- A relative path
- An absolute path
- A circular path
- An invalid path
-
The
/bin
directory contains:- Commands that have been compiled from local sources
- Nothing; it is not a valid directory
- The most fundamental commands that are essential for the operating system to function
- Essential administrative commands
-
When specifying a path, the __ character symbolizes the current directory.
- /
- .
- ~
- ..
-
Which of the following files is for all bash shell users and executed only at login?
- ~/.bashrc
- /etc/profile
- ~/.bash_profile
- /etc/bashrc
-
Assuming at least one file matching the pattern is in the current directory, the command echo ???a will display:
- All of the files in the current directory that have four characters in the file name with the first character being an “a” character.
- Only a file named ???a
- All of the files in the current directory that have four characters in the file name with the last character being an “a” character.
- All of the files in the current directory that end with an “a” character.
-
You can combine glob characters in a single pattern, for example: a??*[0-9].
True or False?
- True
- False
-
Which glob character matches zero or more characters?
- ?
- *
- .
- [
-
Which two characters represent the empty string?
- “”
- ..
- &&
- **
-
Using the
touch
command and specifying a nonexistent file…- does nothing.
- generates an error.
- creates a blank file with that name.
- prompts the user to create a file.
-
To maintain timestamps when using the
cp
command, use:- -T
- -a
- -A
- -t
-
Which option for the
rm
command will cause it to prompt before deleting files?- -l
- -p
- -a
- -i
-
The
mkdir
command cannot be used to:- Create multiple directories at once
- Create new directories
- Create sub-directories in different parent directories
- Delete a directory
-
The names of hidden files begin with the ___ character.
- >
- +
- .
- *
-
Which directory is used to store files representing attached devices?
- /dev
- /tmp
- /mnt
- /
-
The _____ command will search for files using a database of all files, which is generated on demand or scheduled.
find
updatedb
search
locate
-
Which option to the
find
command will search by file type?- -ftype
- -file
- -type
- -fstype
-
Which directory is used to store temporary files?
- /
- /tmp
- /etc
- /sysfs
-
Which directory is used to store essential libraries?
- /lib
- /var
- /bin
- /usr
-
Which command will remove consecutive duplicate lines from a file?
uniq
tr
dedup
sed
-
Which of the following commands can be used to scroll through a text file?
sed
cat
less
head
-
Which option of the
head
command will display only the first six lines of a file?(choose two)
- -n -6
- -n
- -n 6
- -6
-
The regular expression a+ is equivalent to:
- a{0,}
- a{0,1}
- a{1}
- a{1,}
-
To use regular expression characters to match themselves, you cannot:
- Put the character in the square brackets
- Use the backslash in front of the character
- Use the fgrep command
- Use the slash in front of the character
-
Which regular expression character matches one or more of the previous character?
- +
- $
- –
- *
-
If you are in
vi
command mode and want to begin inserting text at the end of the line, you can type:- I
- A
- o
- O
-
If you want to move up a line in
vi
command mode, you can press the Up Arrow Key ↑ or:- l
- k
- j
- h
-
To search forward from your cursor in your
vi
document in command mode, you can type __ followed by the pattern to search for.- /
- |
- ?
- \
-
Many commands that read text files will also read from this stream:
-
stdcon
-
stdout
-
stdin
-
stderr
-
-
Which of the following commands will take the standard output of the
echo
command and put it into the/tmp/output.txt
file:echo 2> /tmp/output.txt
echo | /tmp/output.txt
echo 2 | /tmp/output
echo > /tmp/output.txt
-
In a command pipeline, the output of one command is sent to another command as output. True or False?
- True
- False
-
A signal is:
- A command argument
- A command option
- A technique to send data to a process
- A technique to tell a process to take some sort of action
-
In order to run a command called
cmd1
in the background, you would type:bg cmd1
start -b cmd1
cmd1&
cmd1@
-
Placing a ___ character at the end of the command line will put the command in the background.
- B
- !
- &
- ?
-
The key press combination that will request a running process terminate:
- CTRL+C
- CTRL+D
- CTRL+Z
- CTRL+P
-
To change the niceness value of an existing process, you can use the _____ command.
reset
nice
renice
set
-
To execute a command called
cmd1
as a foreground process, you would type:cmd1
fg cmd1
cmd1 &
foreground cmd1
-
To execute a command with the default priority, which value do you pass to the nice command?
- 20
- 0
- -20
- 19
-
To execute a command with the highest possible priority, which value do you pass to the nice command?
- -20
- 20
- 19
- 0
-
To see how long the system has been running, you can use the _____ command.
free
nice
uptime
ps
-
To see the list of background processes that you have started in your shell, you can run:
work
process
jobs
list
-
Which command will find all processes owned by user
fred
?pgrep -u fred -l
ps -a | user fred
ps fred | grep -1 process
pgrep -i | fred
-
The
screen
command can detach and re-attach terminal sessions.True or False?
- True
- False
-
bzip2
archives are typically indicated with which file extension?- .gz
- .bz2
- .bz
- .b2
-
gzip
andbzip
are aliases for the same utility.True or False?
- True
- False
-
The
dd
command can be used to copy entire partitions.- True
- False
-
The
tar
command supports:- gzip compression only
- only uncompressed archives
- bzip compression only
- Both gzip and bzip2 compression
-
The
tar
command supports which of the following styles of option(s)? (choose three)- GNU
- DOS
- BSD
- Unix
-
By default the
gzip
command replaces uncompressed files with compressed files. True or False?- True
- False
-
Which archiving method is compatible across Linux, Microsoft Windows and Mac operating systems?
tar
zip
cpio
dd
-
Which of the following commands could be used to extract the archive,
example.tar
?tar -xz example.tar
tar -uz example.tar
tar -xf example.tar
tar -uf example.tar
-
Which of the following is not a valid argument for the
dd
command?bs
of
if
in
-
Which of the following options puts the
cpio
command into copy-in mode?- -v
- -u
- -o
- -i
-
Which option to the
bzip2
command can be used for recursive compression?- -v
- -c
- -R
- bzip2 doesn’t support recursive compression
-
Which option to the
bzip2
command can be used to report the compression ratio of an archive?- -R
- -l
- -v
- -c
-
To view the contents of
foo.gz
without uncompressing it, use:zcat foo.gz
gzip -i foo.gz
untar -u foo.gz
gunzip foo.gz
-
Which command will uncompress the file
letters.txt.xz
?unxz letters.txt.xz
untar letters.txt.xz
letters.txt.xz > letters.txt
xz -b letters.txt.xz
-
Assuming everyone has access to the directory the file is in, who can view the contents of a file with permissions of
rw-r----x
?- Everyone
- Only the group owners
- Others
- Both the user owner and group owners
- Only the user owner
-
For
rwxr-x--x
permission set, the highlighted permissions belong to:- The user owner and group owner of the file
- The group owner of the file
- All users besides the user owner and group owner
- The user owner of the file
-
For the
rwxr-x--x
permission set, the highlighted permissions belong to:- The user owner and group owner of the file
- The user owner of the file
- All users besides the user owner and group owner
- The group owner of the file
-
For the
rwxr-x--x
permission set, the highlighted permissions belong to:- The group owner of the file
- All users besides the user owner and group owner
- The user owner of the file
- The user owner and group owner of the file
-
The command,
chmod 0777 /data
will:- Remove all special permissions
- Make the
/data
directory a sticky bit directory - Make the
/data
directory a setuid directory - Make the
/data
directory a setgid directory
-
The command,
chmod a+x
will:- Add execute permission for all users
- Add execute permissions for the user owner
- Remove execute permissions for the user owner
- Remove execute permission for all users
-
The group ownership of a file may only be changed by:
- Both the root user and the owner of the file
- The owner of the file
- The root user
- Any user can change the group ownership of any file
-
The setuid permission on a file:
- Causes the file to never run as root
- Causes the file to run under the user’s identity
- Causes the file to run under the owner’s identity
- Causes the file to always run as root
-
Using the setgid permission on a directory:
- Causes files existing in the directory to be owned by the group that owns the directory
- Causes new files created in the directory to be owned by the group that owns the directory
- Causes files existing in the directory to be made executable by the group
- Causes the directory to be writable to members of the group that owns the directory
-
Which command can change the user owner of a file?
own
chpawn
chown
pawn
-
Which command is used to change permissions on a file?
chmod
chgmode
chgperm
chperm
-
A soft link is also called a _____ link.
- indirect
- true
- symbolic
- false
-
If you have a file named
/tmp/hosts
pointing to a file named/etc/hosts
and the/etc/hosts
file is deleted, then which of the following statements is true?- You can still access the data by using /tmp/hosts
- The data from /etc/hosts is automatically copied into /tmp/hosts before /etc/hosts is deleted
- It is not possible to delete the /etc/hosts file while a soft link is pointing to it
- The /tmp/hosts file now points to nothing
-
When viewing a file with the
ls -l
command, which character represents a file type of soft link?- –
- d
- f
- l
-
When you create a hard link, it increases the hard link count by one.
True or False?
- True
- False
-
Which type of link can be made to a file on another filesystem, hard or soft?
- hard
- soft
-
Which type of link can be made to directories, hard or soft?
- hard
- soft
-
Which type of link is indistinguishable by programs from regular files, hard or soft?
- hard
- soft
-
Which value represents the inode number in the following output of the
ls -li
command:87589 -rw-r--r--. 2 root root 83 Mar 4 22:45 myhosts
- 2
- 83
- 22:45
- 87589
-
What is the notification mechanism used to inform programs about a change in state of hardware devices?
- Programs query HALD directly
- DBUS sends notifications to HALD
- DBUS forwards queries from programs to HALD
- HALD uses dbus to send notifications
-
Which of the following commands is used to view the network interface controller connected on the PCI bus?
lsusb
lsmod
lsnet
lspci
-
The first stage of the boot process is:
- The firmware (BIOS/UEFI) stage
- The Bootloader (LILO/GRUB) stage
- The init phase
- The kernel phase
-
The fourth stage of the boot process is:
- The kernel
- The Bootloader stage
- The init phase
- The firmware (BIOS/UEFI) stage
-
The third stage of the boot process is:
- The kernel phase
- The firmware (BIOS/UEFI) stage
- The Bootloader stage
- The init phase
-
Which directory is used primarily for storing log messages?
- /var/tmp
- /var/spool
- /var/logging
- /var/log
-
Which of the following is not a daemon used for logging?
- rsyslogd
- klogd
- syslogd
- logd
-
In GRUB Legacy, the _____ directive indicates an operating system to boot if the default operating system fails to boot.
fallback=
redo
root
timeout=
-
In GRUB Legacy, the password directive in the title directive setting means:
- You can’t place a password directive in the title directive setting
- To edit any GRUB values, a password must first be entered
- To boot a specific operating system, a password must be entered
- The password must be entered to display a menu of operating systems that are bootable
-
For traditional init, the _____ file is where the initial default runlevel is defined.
- /etc/inittab
- /etc/sysinit
- /etc/init
- /etc/initdefault
-
What option to the
who
command will display the current runlevel?- -s
- -a
- -t
- -r
-
Which command is used to view the services that are set to start or stop automatically?
config
lsconfig
initconfig
chkconfig
-
A device name of
/dev/sda1
indicates this partition is on which type of device?- SATA
- Logical Volume
- IDE
- CDROM
-
Which directories are typically writable to all users? (choose two)
- /var/tmp
- /home
- /
- /tmp
-
Which directory structure has directories which may have heavy activity for services like mail, ftp, httpd and printing?
- /home
- /rootfs
- /var
- /root
-
After running
fdisk -cu /dev/sdb
, whatfdisk
command will allow you to delete a partition?- s
- d
- g
- r
-
After running
fdisk -cu /dev/sdb
, whatfdisk
command will allow you to list the current partition table?- p
- s
- w
- l
-
If you want to initialize swap space that you’ve just created, which command would you run?
mkswap
initswap
swapinit
swapon
-
If you want to unmount a partition, which command should you use?
dismount
umount
mount
unmount
-
The second field in the
/etc/fstab
file is used to specify:- The mount point
- The fsck order
- The device to mount
- The dump field
- The mount options
- The file system type
-
The sixth field in the
/etc/fstab
file is used to specify:- The dump field
- The device to mount
- The mount options
- The mount point
- The fsck order
- The filesystem type
-
What commands can display a list of mounted file systems? (choose two)
mount
fdisk
lspt
df
-
The _____ command will display how much space a filesystem has free?
df
free
du
init
-
What determines how many files can be stored in a filesystem?
- The number of inodes
- The number of bytes
- The Superblock size
- The number of data blocks
-
Which option to the
df
command shows how many inodes are free in a filesystem?- -f
- -i
- -free
- -inode
-
Which option to the
fsck
command forces a system check?- -FF
- -f
- -F
- -ff
-
Which option to the
fsck
command will allow you to specify the filesystem type?- -F
- -t
- -T
- -f
-
How can you determine the RPM package that owns a file?
yum provides
yum info
yum owns
yum find
-
In what directory are yum repository configuration files stored?
- /etc/yum
- /usr/share/yum
- /etc/yum.repos.d
- /var/lib/yum
-
What are the correct options for the
rpm
command to display a list of all installed packages?- -qall
- -b
- -a
- -qa
-
Which command can an administrator run to rebuild the cache of shared libraries?
ldd
ld.so
ldlist
ldconfig
-
Which of the following contents is in the
ldconfig
configuration file by default?include all
include ldconfig
include /etc/ldconfig
include ld.so.conf.d/*.conf
-
Which two directories are automatically searched for shared libraries? (choose two)
- /usr/library
- /library
- /usr/lib
- /lib
-
A bare-metal hypervisor runs directly on top of physical hardware
True or False?
- True
- False
-
Container systems do not require:
- communication with other parts of the system
- security and updating
- a hypervisor
- dependencies needed for their specific applications
-
Which of the following can be used to view details about USB devices?
(choose two)
lsusb
usbprobe
lsmod
usb-devices
- ls -usb
-
Which programs have emerged to compete with and replace the traditional
init
process:(choose two)
- Upstart
- SysVinit
- Systemd
- initramfs
-
What version of GRUB is the most modern version?
- GRUB 3
- GRUB Original
- GRUB Legacy
- GRUB 2
-
Which of the following are valid Linux bootloaders?
(choose two)
- GRUB/GRUB2
- UEFI
- LILO
- BIOS
-
Which runlevel number defines multi-user with GUI?
- 1
- 4
- 6
- 5
- 3
- 0
- 2
-
Which runlevel number defines rebooting the system?
- 3
- 4
- 2
- 1
- 6
- 0
- 5
-
Which runlevel number is defined as user-definable?
- 4
- 5
- 0
- 2
- 3
- 1
- 6
-
What option to the
fdisk
command is used to display current partitions?- -f
- -p
- -l
- -a
-
Which command is used from the command line, to edit your disk’s partition table?
gedit
parttool
dedit
fdisk
-
Which command is used to create a volume group?
createvg
create
vgcreate
vgadd
-
Which command will display UUIDs?
blkid
displayid
setid
id
-
Which two commands will show detailed information about a Debian package? (choose two)
dpkg -s
apt-cache show
apt-cache info
dpkg -i
-
A _________ is a location that contains packages and metadata that can be used for queries, installation and updates of software on a system.
- Repository
- Depot
- Store
- Cache
Subscribe
0 Comments
Newest