Assessment Test Flashcards

1
Q
What software package allows a Linux server to share folders and printers with Windows and MAC clients?
A. Postfix
B. Apache
C. Samba
D. Kerberos
E. Docker
A

C. Samba
The Samba software package allows Linux servers and clients to communicate with Windows and Mac clients or severs using the Microsoft SMB protocol, so option C is correct.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
Which software package allows developers to deploy applications using the exact same environment in which they were developed?
A. Postfix
B. Apache
C. Samba
D. Kerberos
E. Docker
A

E. Docker
The Docker package provides a method for developers to capture the entire development environment for an application and deploy it into a production environment as a container, so option E is correct.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The cat -n File.txt command is entered at the command line. What will be the result?
A. The text file File.txt will be displayed.
B. The text file File.txt will be displayed along with any special hidden characters in the file.
C. The text file File.txt will be displayed along with ant special symbols representing end-of-line characters.
D. The text file File.txt will be displayed along with line numbers.
E. The text file File.txt will be displayed in reverse order.

A

D. The text file File.txt will be displayed along with line numbers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
Which of the following are stream editors? (Choose all that apply.)
A. vim
B. sed
C. awk
D. gawk
E. nano
A
B. sed
C. awk
D. gawk
Utilities are stream editors
Note: Both vim & nano are considered to be text editors.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
Which command in GRUB2 defines the location of the /boot folder to the first partition on the first hard drive on the system?
A. set root=hd(0,1)
B. set root=hd(1,0)
C. set root=hd(1,1)
D. set root=hd(0,0)
E. set root=first
A

A. set root=hd(0,1)
GRUB2 identifies the hard drives starting at 0, but the partitions start at 1, so the first partition on the first hard drive would be 0,1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
If you see read or write error appear in the system log, what tool should you use to correct any bad sections of the hard drive?
A. mount
B. unmount
C. fsck
D. dmesg
E. mkinitrd
A

C. fsck

The fsck program can perform filesystem check and repair multiple types of filesystems on partitions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
The init program is started on a Linux system and has a process ID number. What typically is that process's ID number?
A. 0
B. 1
C. 2
D. 10
E. Unknown
A

B. 1
The init program is typically started immediately after the Linux system has traversed the boot process, and it has a process ID (PID) number of 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
You need to determine the default target of a systemd system. Which of the following commands should you use?
A. grep initdefault /etc/inittab
B. runlevel
C. systemctl is-enabled
D. systemd get-target
E. systemctl get-default
A

E. systemctl get-default

The systemctl get-default command will display a systemd system’s default target.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
The Cinnamon desktop environment uses which window manager?
A. Mutter
B. Muffin
C. Nemo
D. Dolphin
E. LightDM
A

E. LightDM

The Cinnamon desktop environment uses the Muffin window manager.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
Your X11 session has become hung. What keystrokes do you use to restart the session?
A. Ctrl+C
B. Ctrl+Z
C. Ctrl+Q
D. Ctrl+Alt+Backspace
E. Ctrl+Alt+Backspace
A

E. Ctrl+Alt+Backspace
The Ctrl+Alt+Backspace will kill your X11 session and then restart it, putting you at the login screen (display manager.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
What folder contains the time zone template files in Linux?
A. /etc/timezone
B. /etc/localtime
C. /usr/share/zoneinfo
D. /usr/share/timezone
E. /usr/share/localtime
A

C. /usr/share/zoneinfo
Both Debian-based and Red Hat-based Linux distributions store the time zone template files in the /usr/share/zoneinfo folder.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
What systemd command allows you to view and change the time, date, and time zone?
A. timedatectl
B. localectl
C. date
D. time
E. locale
A

A. timedatectl
The timedatectl program is part of the systemd package and allows you to both view and change the current time, date, and time zone for the Linux system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
Which of the following files contain user account creation directives used by the useradd command? (Choose all that apply.)
A. The /etc/default/useradd file
B. The /etc/useradd file
C. The /etc/adduser.conf file
D. The /etc/login.defs file
E. the /etc/login.def file
A

A. The /etc/default/useradd file
D. The /etc/login.defs file
The /etc/default/useradd file and /etc/login.defs file are files that contain user account creation directives used by the useradd command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
You need to display the various quotas on all your filesystems employing quota limits. Which of the following commands should you use?
A. edquota -t
B. quotaon -a
C. quotacheck -cu
D. quotacheck -cg
E. repquota -a
A

E. repquota -a

The repquota -a command will display the various quotas on all your filesystems employing quota limits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What drive and partition does the raw devices file /dev/sdb1 reference?
A. The first partition on the second SCSI storage device
B. The second partition on the first SCSI storage device
C. The first partition on the second PATA storage device
D. The second partition on the first PATA storage device
E. The second partition on the second SATA storage device

A

A. The first partition on the second SCSI storage device
Linux uses the /dev/sdxx format for SCSI and SATA raw devices. The device is represented by a letter, starting with a, and the partition is represented by a number starting at 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
What tool creates a logical volume from multiple physical partitions?
A. mkfs
B. pvcreate
C. lvcreate
D. fdisk
E. vgcreate
A

C. lvcreate
The lvcreate program creates a logical volume from multiple partitions that you can use as a single logical device to build a file system and mount it to the virtual directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
Which of the following can be used as backup utilities? (Choose all that apply.)
A. The gzip utility
B. The zip utility
C. The tar utility
D. The rsync utility
E. The dd utility
A

B. The zip utility
C. The tar utility
D. The rsync utility
E. The dd utility

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
A system administrator has created a backup archive and transferred the file to another system across the network. Which utilities can be used to check the archive files integrity? (Choose all that apply.)
A. The rsync utility
B. The md5sum utility
C. The sftp utility
D. The scp utility
E. The sha512sum utility
A

B. The md5sum utility
E. The sha512sum utility
Both the md5sum and sha512sum utilities produce hashes on files, which can be compared to determine if file corruption occurred, such as when transferring a file over the network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
What tool should you use to install a deb package file?
A. dpkg
B. tar
C. gcc
D. rpm
E. gzip
A

A. dpkg

The dpkg program is used for installing and removing Debian-based packages that use the DEB file format.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
What tool do you use to install an RPM package file?
A. dpkg
B. tar
C. gcc
D. rpm
E. gzip
A

D. rpm

The rpm program is used for installing and removing Red Hat-based packages that use the RPM file format.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q
The lsmod utility provides the same information as what other utility or file(s)?
A. The modinfo utility
B. The /proc/modules file
C. The /etc/modules.conf file
D. The insmod utility
E. The /run/modprobe.d/*.conf files
A

B. The /proc/modules file

has the same information that is displayed by the lsmod utility (though the lsmod utility formats it much nicer).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q
Which utility should be used to remove a module along with any dependent modules?
A. The rmmod utility
B. The modinfo utility
C. The cut utility
D. The depmod utility
E. The modprobe utility
A
E. The modprobe utility
along with its -r switch is the utility to employ for removing (unloading) a kernel module along with any of its dependencies.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q
What special bit should you set to prevent users from deleting shared files created by someone else?
A. SUID
B. GUID
C. Sticky bit
D. Read
E. Write
A

C. Sticky bit
The stick bit assigned to a directory restricts all of the files in that directory so that only the file owner can delete the file, even if a user account is in the group that has write permissions.

24
Q
What command can you use to change the owner assigned to a file?
A. chmod
B. chown
C. chage
D. ulimit
E. chgrp
A

B. chown

The chown command allows you to set both the owner and group assigned to a file.

25
Q
Which directory contains the various PAM configuration files?
A. The /etc/pam directory
B. The /etc/pam_modules/ directory
C. The /etc/modules/ directory
D. The /etc/pam.d/ directory
E. The /etc/pam_modules.d/ directory
A

D. The /etc/pam.d/ directory

The /etc/pam.d/ directory contains the various PAM configuration files.

26
Q

Which of the following can override the settings in the ~/.ssh/config file?
A. The settings in the /etc/ssh/ssh_config file.
B. The ssh utility’s command-line options.
C. You cannot override the settings in the file.
D. The settings in the /etc/ssh/sshd_config file
E. The settings in the sshd daemon’s configuration file.

A

D. The settings in the /etc/ssh/sshd_config file

27
Q
What command can you use to display new entries in a log file in real time as they occur?
A. head
B. tail
C. tail -f
D. head -f 
E. vi
A

C. tail -f

28
Q
What command do you use to display entries in the systemd-journald journal?
A. journalctl
B. syslogd
C. klogd
D. systemd-journald
E. vi
A

A. journalctl
The systemd-journald application uses its own binary file format for the journal file and requires the journalctl file to read it.

29
Q

The /etc/services file may be used by firewalls for what purpose?
A. To designate what remote services to block
B. To store their ACL rules
C. To map a service name to a port and protocol
D. To determine if the port can be accessed
E. To designate what local services can send out packets

A

C. To map a service name to a port and protocol.
The /etc/services file may be used by a firewall, such as UFW, to map a particular service name to its port and protocol.

30
Q

Which of the following is true about netfilter? (Choose all that apply.)
A. It is used by firewalld.
B. It is used by UFW.
C. It provides code hooks into the Linux kernel for firewall technologies to use.
D. It is used by iptables.
E. It provides firewall services without the need for other applications.

A

A. It is used by firewalld.
B. It is used by UFW.
C. It provides code hooks into the Linux kernel for firewall technologies to use.
D. It is used by iptables.

Used by firewalld, UFW, and iptables, netfilter provides code hooks into the Linux kernel for firewall technologies to use in order to implement fully functional firewall capabilities.

31
Q
Which of the following is a measurement of the maximum amount of data that can be transferred over a particular network segment?
A. Bandwidth
B. Throughput
C. Saturation
D. Latency
E. Routing
A

A. Bandwidth
Bandwidth is a measurement of the maximum data amount that can be transferred between two network points over a period of time.

32
Q
Which tool will allow you to view disk I/O specific to swapping?
A. ipcs -m
B. cat /proc/meminfo
C. free
D. swapon -s
E. vmstat
A

E. vmstat

The vmstat utility provides a lot of memory statistics, including disk I/O specific to swapping.

33
Q
What command-line command allows you to view the applications currently running on the Linux system?
A. lsof
B. kill
C. ps
D. w
E. nice
A

C. ps

The ps command with the proper options displays the active applications running on the Linux system,

34
Q
What command-line commands allow you to send process signals to running applications? (Choose two.)
A. renice
B. pkill
C. nice
D. kill
E. pgrep
A

B. pkill
D. kill
The pkill and kill commands allow you to send Linux process signals to running applications,

35
Q

Annika puts the file line PS1=”My Prompt: “ into her account’s $HOME/.bash_profile file. This setting changes her prompt the next time she logs into the system. However, when she starts a subshell, it is not working properly. What does Annika need to do to fix this issue?
A. Add the file line to the $HOME/.profile file instead.
B. Nothing. A user’s prompt cannot be changed in a subshell.
C. Add export prior to PS1 on the same line in the file.
D. Change her default shell to /bin/dash for this to work.
E. Change the last field in her password record to /sbin/false.

A

C. Add export prior to PS1 on the same line in the file.
The problem is directly related to a missing export command prior to the PS1=”My Prompt: “ in Annika’s environment file. When this environment variable is exported and when it is set, it will be set in any started subshells.

36
Q

A user, who is not the owner or a group member of a particular directory, attempts to use the ls command on the directory and gets a permission error. What does this mean?
A. The directory does not have display (d) set for other permissions.
B. The directory does not have execute (x) set for other permissions.
C. The directory does not have write (w) set for other permissions.
D. The directory does not have list (l) set for other permissions.
E. The directory does not have read (r) set for other permissions.

A

E. The directory does not have read (r) set for other permissions.

In order for a user to list files in a directory, the directory needs to have read (r) set for other permissions if the user is not the directory’s owner or does not belong to the directory’s set group.

37
Q
Which directories contain dynamic files that display kernel and system information? (Choose two.)
A. /dev
B. /proc
C. /etc
D. /sys
E. /dev/mapper
A

B. /proc
D. /sys
The Linux kernel uses the /proc and /sys directories to produce dynamic files that contain information about the kernel and system.

38
Q
What directory contains configuration information for the X Windows System in Linux?
A. dev
B. /proc
C. /etc/X11
D. /sys
E. /proc/interrupts
A

C. /etc/X11
The /etc/X11 directory contains configuration files used by both the X.org and XFree86 applications for controlling the X Windows graphical environment on the Linux system.

39
Q

How would you fix a “mount point does not exist” problem?
A. Employ the fsck utility to fix the bad disk sector.
B. Employ the badblocks utility to fix the bad disk sector.
C. Use super user privileges, if needed, and create the directory via the vgchange command.
D. Use super user privileges, if needed, and create the directory via the mkdir command.
E. Use super user privileges, if needed, and create the directory via the mountpoint command.

A

D. Use super user privileges, if needed, and create the directory via the mkdir command.
This problem concerns a missing directory. Therefore, to fix it, use super user privileges, if needed, and create the directory via the mkdir command.

40
Q
Peter is trying to complete his network application, Spider, but is running into a problem with accessing a remote server's files and there are no network problems occurring at this time. He thinks it has something to do with the remote server's ACLs being too restrictive. You need to investigate this issue. Which of the following might you use for troubleshooting this problem? (Choose all that apply.)
A. The firewall-cmd command
B. The ufw command
C. The iptables command
D. The getacl command
E. The setacl command
A

A. The firewall-cmd command
B. The ufw command
C. The iptables command
Since the problem involves a remote server, you need to investigate the firewall access control lists (ACLs) on both the local and remote systems.

41
Q
Which Bash shell script command allows you to iterate through a series of data until the data is complete?
A. if
B. case
C. for
D. exit
E. $()
A

C. for

The for command allows you to iterate through a series of data one by one until the data set is exhausted,

42
Q
Which environment variable allows you to retrieve the numeric user ID value for the user account running a shell script?
A. $USER
B. $UID
C. $BASH
D. $HOME
E. $1
A

B. $UID

The $UID environment variable contains the numeric user ID value of the user account running the shell script,

43
Q

What does placing an ampersand sign (&) after a command on the command line do?
A. Disconnects the command from the console session
B. Schedules the command to run later
C. Runs the command in background mode
D. Redirects the output to another command
E. Redirects the output to a file

A

C. Runs the command in background mode
The ampersand sign (&) tells the shell to run the specified command in background mode in the console session,

Blum, Richard; Bresnahan, Christine. CompTIA Linux+ Study Guide (pp. lxi-lxii). Wiley. Kindle Edition.

44
Q

When will the cron table entry 0 0 1 * * myscript run the specified command?
A. At 1 a.m. every day
B. At midnight on the first day of every month
C. At midnight on the first day of every week
D. At 1 p.m. every day
E. At midnight every day

A

B. At midnight on the first day of every month
The cron table format specifies the times to run the script by minute, hour, day of month, month, and day of week. Thus the format 0 0 1 * * will run the command at 00:00 (midnight) on the first day of the month for every month.

45
Q
Which of the following packages will provide you with the utilities to set up Git VCS on a system?
A. git-vcs
B. GitHub
C. gitlab
D. Bitbucket
E. git
A

E. git

This git package provides utilities to set up Git VCS on a system, so option E is the correct answer.

46
Q

If you do not tack on the -m option with an argument to the git commit command, what will happen?
A. The command will throw an error message and fail.
B. The commit will take place, but no tracking will occur.
C. You are placed in an editor for the COMMIT_EDITMSG file.
D. Your commit will fail, and the file is removed from the index.
E. Nothing. This is an optional switch.

A

C. You are placed in an editor for the COMMIT_EDITMSG file.
If the -m option with an argument is not tacked onto the git commit command, you are placed into the vim editor to edit the COMMIT_EDITMSG file.

47
Q
At a virtualization conference, you overhear someone talking about using blobs on their cloud-based virtualization service. Which virtualization service are they using?
A. Amazon Web Services
B. KVM
C. Digital Ocean
D. GitHub
E. Microsoft Azure
A

E. Microsoft Azure
The Microsoft Azure cloud-based virtualization service provides blobs, which are large unstructured data storage that is offered over the Internet and can be manipulated with .NET code.

48
Q
What is a networking method for controlling and managing network communications via software that consists of a controller program as well as two APIs?  A. Thick provisioning
B. Thin provisioning
C. SDN
D. NAT
E. VLAN
A

C. SDN
A software-defined network (SDN) is a networking method for controlling and managing network communications via software that consists of a controller program as well as two APIs.

49
Q
Your company decides it needs an orchestration system (also called an engine). Which of the following is one you could choose? (Choose all that apply.)  
A. Mesos
B. Kubernetes
C. Splunk
D. Swarm
E. AWS
A

B. Kubernetes
D. Swarm

Only Kubernetes and Swarm are orchestration systems.

50
Q
Which of the following is used in container orchestration? (Choose all that apply.)
A. Automated configuration management
B. Self-healing
C. DevOps
D. Agentless monitoring
E. Build automation
A

A. Automated configuration management
B. Private
D. SaaS
E. Build automation

The concepts listed in options A, B, D, and E are all used in container orchestration. While DevOps benefits from container orchestration and often employs it, it is not used within container orchestration.

51
Q
What type of cloud service provides the full application environment so that everyone on the Internet can run it?
A. PaaS
B. Private
C. Public
D. SaaS
E. Hybrid
A

D. SaaS
The software-as-a-service (SaaS) cloud service type provides full applications, allowing anyone to connect to your application,

52
Q
What type of hypervisor is the Oracle VirtualBox application?
A. PaaS
B. SaaS
C. Type II
D. Type I
E. Private
A

C. Type II

The Oracle VirtualBox hypervisor installs on top of a host operating system, making it a Type II hypervisor,

53
Q
What file should you place console and terminal filenames in to prevent users from logging into the Linux system as the root user account from those locations?
A. /etc/cron.deny
B. /etc/hosts.deny
C. /etc/securetty
D. /etc/login.warn
E. /etc/motd
A

C. /etc/securetty

The /etc/securetty file provides a list of locations from which users can’t log in using the root user account,

54
Q
What Linux program logs user file and directory access?
A. chroot
B. LUKS
C. auditd
D. klist
E. kinit
A

C. auditd
The auditd program monitors system activity, including user file and directory access, and logs events based on rules you create.

55
Q
You've moved your present working directory to a new location in the Linux virtual directory structure and need to go back to the previous directory where you were just located. Which command should you employ?
A. cd
B. exit
C. cd ~
D. cd -
E. return
A

D. cd -

The cd - command will return your process to its previous directory in the virtual directory system,

56
Q
To copy a directory with the cp command, which option do you need to use?
A. -i
B. -R
C. -v
D.-u
E. -f
A

B. -R

The -R option used with the cp command allows you to copy a directory’s contents. You can also employ the -r or –recursive option to achieve the same results.