Linux Chapter Review Questions

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

You need to format the string 42.777 into the correct two-digit floating number. Which of the following printf command FORMAT settings is the correct one to use?

"%.2f\n"

What character or characters make up the shebang used in Linux to define the shell used for a shell script?

#!

What environment variable contains the username of the user who started the shell?

$USER

Frank wants to run his large number-crunching application in background mode on his console session. What command does he need to use to do that?

&

An administrator needs to create a full backup using the tar utility, compress it as much as possible, and view the files as they are being copied into the archive. What tar options should the admin employ?

-cJvf

You are using the ls command to look at a directory file's metadata but keep seeing metadata for the files within it instead. What command option will rectify this situation?

-d

Which diff option is the best option to allow you to quickly determine if two text files are different from one another?

-q

Katie wants to display the most recent entries in the journal log on her Linux system. What journalctl option should she use?

-r

What tar command-line options are commonly used together to extract and decompress files from a tarball file?

-zxvf

What file name extension does the CentOS Linux distribution use for packages?

.rpm

Where are the GRUB Legacy configuration files stored?

/boot/grub

Where does Linux create files to send data to and receive data from directly with devices?

/dev

What folder does the udev program use to create a permanent link to a storage device based on its serial number?

/dev/disk/by-id

What raw device file would Linux create for the second SCSI drive connected to the system?

/dev/sdb

Which file contains a list of DNS servers the Linux system can use to resolve hostnames?

/etc/resolv.conf

User environment files typically come from where?

/etc/skel/

Which directory should you place on a separate partition to separate user data from system data?

/home

What file does the Linux system use to track ports used to communicate with PCI boards?

/proc/ioports

Which folder contains template files for each time zone that Linux supports?

/usr/share/zoneinfo

What folder do most Linux distributions use to store boot logs?

/var/log

Henry needs to store the output from his script into a log file that he can read later. What character or characters should he use to do that?

>

What program does the workstation firmware start at boot time?

A bootloader

A allows your developers to easily deploy applications between development, test, and production.

A container

What server role should you implement to increase performance on your company's website?

A load balancer

Which of the following best defines a file descriptor?

A number that represents a process's open files

The grep utility can employ regular expressions in its PATTERN. Which of the following best describes a regular expression?

A pattern template you define for a utility, which uses the pattern to filter text

Which of the following best describes a desktop environment?

A series of components that work together to provide the graphical setting for the user interface

What server role should you implement to block your local network clients from accessing sports websites during business hours?

A web proxy

There are 25 files in Natasha's working directory and she only wants to add 22 of them to the index. She plans on using the git add . command to be efficient. What should she do?

Add the 3 files' names to a .gitignore file.

Tom sees an attacker continually attempt to break into a user account on his Linux system from a specific IP address. What can he do to quickly mitigate this issue?

Add the attacker's IP address to the /etc/hosts.deny file.

Bruce has set up his Git environment and finished working on his new GreenMass.sh script. What should he do next?

Add the script to the staging area.

Ned notices in the logs that a user account schedules a job every day at noon that uses all of the system resources. How can he prevent that user account from doing that?

Add the user account to the /etc/cron.deny file.

By default, if you specify no command-line options, what does the ps command display?

All processes run by the current shell

Which of the following best describes a digital signature?

An original plaintext hash, which is encrypted with a private key and sent along with the cipher text

Which web server is used in the popular LAMP stack?

Apache

When will the cron table entry 10 5 * * * myscript run the specified shell script?

At 5:10 a.m. every day

Mary wants to implement two-factor authentication using fingerprint readers for her users to authenticate with the Linux system. Which method of authentication should she look into implementing?

Biometrics

Carol needs her virtual machines to all act as nodes on her host machine's LAN and get their own IP address that they will use to send/receive network traffic. Which virtual NIC type should she configure on them?

Bridged

Ms. Ward needs to move an app container into production. She employs an orchestration tool, which uses the predefined infrastructure as code to deploy and replicate the needed production container images. What orchestration concept did Ms. Ward use?

Build automation

How do you determine the default job running in a console session?

By a plus sign next to the job number in the jobs output

Sophia needs to connect her Linux system to a new network printer on the office network. What software package does she need to ensure is installed so she can configure the new network printer?

CUPS

What software package allows a Linux server to print to a network printer?

CUPS

Ms. Danvers is designing a set of virtual machines for her company, Miracle. Currently, her host machine uses LVM but only has enough disk space for 1TB of data. Her three VMs will need 200GB of disk space immediately but are projected to grow to 300GB each within the next year. What should she do?

Configure the three VMs to use thin provisioned storage.

What method should you use to easily move an application from a development environment to a production environment without having to duplicate the operating system?

Container

You are trying to decide whether to use a hard link or a symbolic link for a data file. The file is 5GB, has mission-critical data, and is accessed via the command line by three other people. What should you do?

Create three hard links and provide the links to the three other people for data protection.

What is used to automatically assign an IP address to a client?

DHCP

What package do you need to install to allow your Linux server to provide IP addresses to clients on your local network?

DHCPd

A _______ runs in background and listens for client connection requests for a single application.

Daemon

What network setting defines the network device that routes packets intended for hosts on remote networks?

Default router

Lamar, a contractor, claims he cannot log into his account locally. He was able to do so yesterday. No one else seems to be having problems accessing the system. What should you check first?

Determine if his account is expired via the chage command.

Despite his warnings, Fred continues to see users transfer files to his Linux server using unsecure FTP. How can he stop this?

Disable the FTP application ports.

Which of the following communicates with the Linux operating system to transmit the UI wants and needs?

Display server

You have a lengthy file named, FileA.txt. What will the head -15 FileA.txt command do?

Display the first 15 lines of the file.

Which Linux container package runs an engine as a process on the host operating system and provides a command-line interface to control containers?

Docker

Natasha has created her working directory for a new project. What should she do next to set up her Git project environment?

Enter the git init command.

You are looking at a directory that you have not viewed in a long time and need to determine which files are actually directories. Which command is the best one to use?

Enter the which diff command.

If you see the named program running in background on your Linux server, what service does it provide?

Hostname resolution

Tom currently runs a cloud for his company on internal servers but needs some extra processing power to run a new application. What method of cloud service can he look into to leverage his existing cloud without needing to buy more internal servers?

Hybrid

Which type of cloud service allows you to spin up your own operating systems?

IaaS

Connie, the tech ops lead, provides the development team with a development environment that currently matches the production environment. She insists that besides the app modifications, the environment should not change. What attribute should this development environment have to meet Connie's requirement?

Immutable

In DevOps and container orchestration, non-hardware items such as the operating system and libraries and security policies are documented within the orchestration tool, implemented into the desired environment, and are called what?

Infrastructure as code

You have issued the command grep Hal on a text file you generated using information from a failed login attempts file. It returns nothing, but you just performed a test case, by purposely failing to log into the Hal account, prior to generating the text file. Which of the following is the best choice as your next step?

Issue the grep -i Hal command on the text file.

You downloaded a large important file, fortytwo.db, from your company's local website to your Linux server but got interrupted by an emergency. Now you cannot remember where you stored the file. What is the best first step to fixing this problem?

Issue the sudo updatedb command.

You are trying to find a file on your Linux server whose name is conf. Employing the locate conf command for your search shows many directories that contain the letters conf. What is the best description for why this is happening?

It is due to file globbing on the pattern name.

What format does MongoDB use to store data elements in the database?

JSON

Which authentication method issues tickets to users and helps with implementing the single sign-on feature in a network of servers?

Kerberos

What is the term commonly used for when the Linux system halts due to a system error?

Kernel panic

Jaime is interested in using a distributed database method for authorizing users to access resources located on multiple network servers. Which authentication method would be best for her to use?

LDAP

Ted wants to provide encryption at the disk level so users don't need to encrypt individual files as they store them. What Linux feature should he use?

LUKS

What type of address is used so local applications can use network protocols to communicate with each other?

Loopback address

Which part of the Linux mail process allows you to create filters to automatically redirect incoming mail messages?

MDA

Which part of the Linux mail process is responsible for sending emails to remote hosts?

MTA

Linux uses to add the file-system on a new storage device to the virtual directory.

Mount points

Which open-source database provided fast performance and became a popular choice for web applications?

MySQL

Ms. Danvers wants her three virtual machines' IP address to be kept private, but she also wants them to communicate on the host machine's network using its IP address. Which virtual NIC type should she configure on them?

NAT

What protocol should you use to mount folders from remote Linux servers on your local Linux server?

NFS

Which authentication package used to be called by the name "Yellow Pages"?

NIS

Which type of hypervisor template bundles all of the configuration files into a single file for distribution?

OVA

The cut utility often needs delimiters to process text records. Which of the following best describes a delimiter?

One or more characters that create a boundary between different data items in a record

The _________ package allows you to create a secure tunnel across a private network to access your local network remotely.

OpenSSH

Sally is interested in developing her application in the cloud without having to worry about administering an operating system. What type of cloud service should she buy?

PaaS

Fred wants to package his application so that it's guaranteed to run the same way no matter what Linux distribution his customers use. How can he do this?

Package the application as a container

Harry has modified an application to create a file in a directory and then write data to it. The program creates the file with no problems but cannot write data to it and receives a permission error. Which of the following is most likely the issue?

Permission inheritance

What SELinux mode tracks policy violations but doesn't enforce them?

Permissive

Mr. Fury is a programming professor at Galactic University. This next semester he has chosen to use virtual machines for his students' labs. The students will be creating a single program that they work on throughout the entire semester. What is the best choice of disk storage for Mr. Fury's student virtual machines?

Persistent storage

How does a server know what client request is sent to which application daemon?

Ports

When Melanie runs a shell script, she notices that it takes up all of the memory on her Linux system and she needs to stop it. How can she do that?

Press Ctrl+C while the script is running.

How can you temporarily pause a shell script from running in foreground mode in a console session?

Press the Ctrl+Z key combination.

Which cloud service method utilizes only servers owned and operated by a third party?

Public

Which of the following protocols does Xrdp employ?

Remote Desktop Protocol

Bill, the software development team leader, understands Connie's (tech ops lead) desire for a static and matching development environment. However, since they are employing containers, Bill suggests a better improvement. Which of the following should he suggest?

Replace the production container with the development container when the app is ready for production.

Which of the following orchestrated container attributes best provides high availability to an app user?

Replication

Which type of storage device uses integrated circuits to store data with no moving parts?

SSD

The _________ software package allows your Windows workstations to mount a folder stored on a Linux server.

Samba

Nick needs to run a report at midnight every day on his Linux system. How should he do that?

Schedule the job using cron.

Mr. Abbot is recording requirements for the new orchestration tool. He needs the tool to automatically deploy and replicate any containers that have crashed. What is this called?

Self-healing

Fred wants to block users from logging in directly with the root user account from any console or terminal session. How can he do that?

Set the default login shell for the root user to /usr/sbin/nologin.

Barbara wants to ensure that the journal log files will be saved after the next reboot of her Linux system. What systemd-journald configuration setting should she use?

Storage=persistent

A user has logged into the tty3 terminal. Which of the following user environment files is executed first if found in the user's home directory?

The .bash_profile file

The last command, by default, pulls its data from what file?

The /var/log/wtmp file

You create an account using the appropriate utility, except for some reason the account's home directory was not created. Which of the following most likely caused this to occur?

The CREATE_HOME directive is not set.

Peter's system has a memory-intensive application running on it continually. To help improve performance, he has replaced the old hard drives with solid-state drives instead of increasing RAM. Which of the following is most likely true about this situation?

The SSD for swap will become degraded storage.

You have completed a full archive and sent it to a remote system using the sftp utility. You employ the md5sum program on both the local archive and its remote copy. The numbers don't match. What most likely is the cause of this?

The archive was corrupted when it was transferred.

When setting his Git configuration options, Bruce employs the --global option on his commands. What does this mean?

The configuration information is stored in ∼/.gitconfig.

Miles needs to change his present working directory to the /home/miles directory. He does not own the directory, nor is he a member of its group. Assuming needed parent directory permissions are set, what needs to take place for this to successfully occur?

The execute (x) permission needs to be added.

The system admin took an archive file and applied a compression utility to it. The resulting file extension is .gz. Which compression utility was used?

The gzip utility

Which of the following commands will allow you to switch temporarily from your account's default group to another group with whom you have membership?

The newgrp command

The cat -E MyFile.txt command is entered, and at the end of every line displayed is a $. What does this indicate?

The text file records end in the ASCII character LF.

Which of the following commands will display CPU load data along with information concerning users who are currently logged into the system?

The w command

Which type of hypervisor interfaces directly with the host system hardware?

Type 1

Henry already has installed Red Hat Linux on his server but now needs to install virtual machines. What type of hypervisor package should he use?

Type II

Which character set uses 7 bits to store characters?

Unicode

You are trying to peruse a rather large text file. A coworker suggests you use a pager. Which of the following best describes what your coworker is recommending?

Use a utility that allows you to view one text page at time.

Which field contains the same data for both a /etc/passwd and /etc/shadow file record?

User account's username

Which of the following does not describe the less utility?

You can press the X key to exit from the utility.

The firewalld service uses _____, which is a predefined rule set.

Zones

What command allows you to run a shell script at a specific time?

at

A short text-based control file is no longer working properly with the program that reads it. You suspect the file was accidentally corrupted by a control code update you performed recently, even though the file's control codes are all correct. Which command should you use next on the file in your problem investigation?

cat -v

Which of the following commands will display the file SpaceOpera.txt to output as well as save a copy of it to the file SciFi.txt?

cat SpaceOpera.txt | tee SciFi.txt

Nancy wants to write a rsyslogd rule that separates event messages coming from the system job scheduler to a separate log file. Which syslog facility keyword should she use?

cron

Jane needs to check on what jobs are scheduled to run automatically for her user account. What command should she use to list the cron table entries for her user account?

crontab

You have a text file, monitor.txt, which contains information concerning the monitors used within the data center. Each record ends with the ASCII LF character and fields are delimitated by a comma (,). A text record has the monitor ID, manufacture, serial number, and location. To display each data center monitor's monitor ID, serial number, and location, use which cut command?

cut -d "," -f 1,3,4 monitor.txt

You need to create a low-level backup of all the data on the /dev/sdc drive and want to use the /dev/sde drive to store it on. Which dd command should you use?

dd of=/dev/sde if=/dev/sdc

When you install a USB device on a Linux system, it appears that the device is not being detected. Which of the following is the best command to troubleshoot this particular situation?

depmod

Which command would you use to find the mail server for a domain?

dig

The______command allows us to examine the most recent boot messages?

dmesg

Which Linux command displays the contents of the kernel ring buffer?

dmesg

You need to edit quota grace periods. Which of the following commands should you use?

edquota -t

What syslog severity level has the highest priority ranking in rsyslogd?

emerg

What option sets the wireless access point name in the iwconfig command?

essid

Which command displays the duplex settings for an Ethernet card?

ethtool

What filesystem is the latest version of the original Linux filesystem?

ext4

Barbara has an application running in background mode in her console session and needs to bring it to foreground mode. What command should she use to do that?

fg

Yesterday a coworker, Michael, was fired for nefarious behavior. His account and home directory were immediately deleted. You need to audit the server to see if he left any files out in the virtual directory system. Which of the following commands is the best one to use in this situation?

find / -nouser

You want to search for a particular file, main.conf, using the find utility. This file most likely is located somewhere in the /etc/ directory tree. Which of the following commands is the best one to use in this situation?

find /etc -name main.conf

The program is a handy tool for repairing corrupt filesystems.

fsck

What program allows you to fix corrupt hard drive partitions?

fsck

What is the most common compiler used for open-source Linux applications?

gcc

Sally needs to view the ACL permissions assigned to a file on her Linux server. What command should she use?

getfacl

Which of the following commands allows you to switch to a new Git branch called testing?

git checkout testing

Which partitioning tool provides a graphical interface?

gparted

You need to figure out what configuration file(s) hold a host name directive. Which of the following commands is the best one to use?

grep

You are a system administrator on a CentOS Linux server. You need to view records in the /var/log/messages file that start with the date May 30 and end with the IPv4 address 192.168.10.42. Which of the following is the best grep command to use?

grep -i "May 30?192.168.10.42"

What command must you run to save changes to a GRUB Legacy boot menu?

grub-install

Which ifconfig format correctly assigns an IP address and netmask to the eth0 interface?

ifconfig eth0 up 192.168.1.50 netmask 255.255.255.0

Mera, a Linux system admin, believes a new application on her system is producing too much I/O for a particular partition, causing the system's processor to appear sluggish. Which tool should she use to test her problem cause theory?

iostat

What command can you use to both display and set the IP address, netmask, and default router values?

ip

Virginia Potts is administering a Linux system with a firewall. She has already set up an IPset and named it BlockThem. A new attack has begun to occur from the 72.32.138.96 address. Along with super user privileges, what command should Ms. Potts issue to add this IPv4 address to the IPset?

ipset add BlockThem 72.32.138.96

What command displays all of the available wireless networks in your area?

iwlist

For an application to use PAM, it needs to be compiled with which PAM library?

libpam

What Linux command displays all of the localization environment variables and their values?

locale

What Systemd utility allows you to change the localization on your Linux system?

locale

You are looking at a directory that you have not viewed in a long time and need to determine which files are actually directories. Which command is the best one to use?

ls -F

Ted is tasked with documenting the SELinux security context assigned to a group of files in a directory. What command should he use?

ls -Z

Mary confirms via the sealert utility that her application cannot access the file flash.txt. What command should she use next?

ls -Z flash.txt

A user cannot delete one of her files but is able to delete other files in her directory. John, a system admin, is attempting to troubleshoot this issue. What command should he use first on the file?

lsattr

Joel installed a new PCI card in his Linux system but is now getting a conflict with another device on the system. What command can he use to display the interrupts, I/O ports, and DMA channels in use by all of the existing devices?

lsdev

You have just created an empty directory called MyDir. Which command most likely did you use?

mkdir -v MyDir

What tool do you use to create a new filesystem on a partition?

mkfs

You need to determine the dependencies of the unloaded xyz module. Which is the best utility to employ to accomplish this task?

modinfo

You need to remove the xyz module and all of its dependencies. Which is the best command to employ?

modprobe -r

What popular open source web server can also perform as a load balancer?

nginX

Jessica has an application that crunches lots of numbers and uses a lot of system resources. She wants to run the application with a lower priority so it doesn't interfere with other applications on the system. What tool should she use to start the application program?

nice

What command do you use to disconnect a shell script from the current console so that it can continue to run after the console exits?

nohup

The network engineer, Keenser, believes the choices of name servers in the system's /etc/resolv.conf file are inefficient. Which of the following tools can he employ to test new server choices?

nslookup

Which software program should you load on your Linux server to synchronize its time with a standard time server?

ntpd

What tool allows you to send ICMP messages to a remote host to test network connectivity?

ping

Hank needs to stop an application from running on his Linux system. He knows the name of the application file, but not the process ID assigned to it. What tool can he use to stop the application?

pkill

A text file, StarGateAttacks.txt, needs to be specially formatted for review. Which of the following commands is the best command to accomplish this task quickly?

pr

You have two short text files that have maximum record lengths of 15 characters. You want to review these files side by side. Which of the following commands would be the best to use?

pr -mtl 20

A problem has occurred concerning group quotas on three filesystems. You need to quickly remove all filesystems' quota limits to temporarily resolve this issue. What is the best command to employ?

quotaoff -a

Jimmy noticed his Linux system was running slow. He ran the top command and found out that a data-intensive application was consuming most of the CPU time. He doesn't want to kill the application but wants to give it a lower priority so it doesn't take up too much CPU time. What tool should he use to change the priority of the running application?

renice

A long-time server administrator has left the company, and now you are in charge of her system. Her old user account directory tree, /home/Zoe/, has been backed up. Which command is the best one to use to quickly remove her files?

rm -rI /home/Zoe

You need to unload the abc module from the Linux kernel. This module does not have any dependencies. What is the best utility to use?

rmmod

You have a file that is over 10GB in size, and it needs to be backed up to a locally attached drive. What is the best utility to use in this situation?

rsync

Which two software packages are used in Linux to maintain log files?

rsyslogd journald

Which of the following is not a systemd target unit?

runlevel7.target

What are the equivalent symbolic mode permissions for the octal mode value of 644?

rw-r--r--

Mary wants to view her system's processor performance over time. Which is the best utility for her to employ?

sar

A customer has complained that a service on your SysV init system is not working. Which of the following commands is the best command to use to check the service?

service status

Which of the following commands will put any generated error messages into the black hole?

sort SpaceOpera.txt 2> /dev/null

Which command displays which ports the processes use on Linux systems?

ss

Ben updates his Ubuntu system's packages using the sudo apt-get upgrade command, and now the Apache Web service is not working properly. What command should he run?

sudo apt-get check

Peter Quill is a Linux system administrator of a system using the iptables service. Mr. Quill wants to add a rule to block only incoming ping packets and not send a rejection message to the source. What command should he employ?

sudo iptables -A INPUT -p icmp -j DROP

Which of the following is an example of UFW simple syntax for blocking all incoming and outgoing OpenSSH connections without providing a blocking message?

sudo ufw deny 22/tcp

Which of the following commands will allow you to view the various rules in a UFW firewall with their associated numbers?

sudo ufw status numbered

What protocol became a de facto standard in Linux for tracking system event messages?

syslog

A blind coworker who is programming on the Linux server is suddenly having odd problems with his braille display device. You determine that you need to restart the braille service. Assuming the appropriate systemd unit file is available, which command would you use?

systemctl restart brltty

Harry has finished writing his application source code but needs to package it for distribution. What tool should he use so that it can be extracted in any Linux distribution?

tar

Which command displays the current date, system time, hardware time, and time zone?

timedatectl

Charles noticed that his Linux system is running slow and needs to find out what application is causing the problem. What tool should he use to show the current CPU utilization of all the processes running on his system?

top

Jasmine has created a new bash shell script and wants to run it from the command line. What chmod permissions should she assign to the file to run it as a shell script?

u+x

What program runs in the background to automatically detect and mount new storage devices?

udev

Which program allows you to reload the defined rules for detecting and installing new devices?

udevadm

Your boss has asked you to remove KSingh's account and all his home directory files from the system immediately. Which command should you use?

userdel -r KSingh

Which of the following commands is the best one to add JKirk as a member to a new group called the NCC-1701 group and not remove any of the account's previous group memberships?

usermod -aG NCC-1701 JKirk

What character or combination of characters do you use to redirect the output of one command to another command?

|

Which of the following files may be involved in authenticating with SSH keys?

~/.ssh/id_rsa

The OpenSSH application keeps track of any previously connected hosts and their public keys in what file?

~/.ssh/known_hosts


Kaugnay na mga set ng pag-aaral

Java SE 11 Programmer I Exam - Chapter VIII

View Set

Physiology 2 final, practice questions

View Set

GO! Excel 2016 Chapter 3 Practice Exam

View Set

Mortgages, Financing A Car, Financial Math Sem 2, Leasing vs. Buying a Car, Test, mortgages, buying vs.renting a home, Buying vs. Renting a Home Practice/Quiz, Topic Test - Mathematical Models with Applications, Annuities - Mathematical Models with A...

View Set

Adult Nursing: Integumentary System

View Set