Introduction

Linux has become one of the fastest growing operating systems used in server environments. Most companies utilize some type of Linux system within their infrastructure, and Linux is one of the major players in the cloud computing world. The ability to build and manage Linux systems is a skill that many companies are now looking for. The more you know about Linux, the more marketable you’ll become in today’s computer industry.

The purpose of this book is to provide you with the knowledge and skills you need to succeed in the Linux world.

What Is Linux+?

The CompTIA Linux+ exam has become a benchmark in the computer industry as a method of demonstrating skills with the Linux operating system. Obtaining CompTIA Linux+ certification means that you’re comfortable working in a Linux environment and have the skills necessary to install and maintain Linux systems.

Previously, CompTIA had partnered with the Linux Professional Institute (LPI) to produce the Linux+ certification exams. With the release of exam XK0-004 in early 2019, CompTIA has gone solo and created its own exam. The updated Linux+ certification is now a single exam that covers more hands-on components of operating a Linux system. The updated Linux+ exam focuses on five core areas of Linux:

  • Hardware and system configuration
  • Systems operation and maintenance
  • Security
  • Troubleshooting and diagnostics
  • Automation and scripting

The XK0-004 exam uses performance-based, multiple-choice, and multiple-answer questions to identify employees who can perform the job of Linux system administrator. The exam covers tasks associated with all major Linux distributions, not focusing on any one specific distribution. It consists of 90 questions, and you will have 90 minutes to complete it.

Why Become Linux Certified?

With the growing popularity of Linux (and the increase in Linux-related jobs) comes hype. With all of the hype that surrounds Linux, it’s become hard for employers to distinguish employees who are competent Linux administrators from those who just know the buzzwords. This is where Linux+ certification comes in.

With a Linux+ certification, you will establish yourself as a Linux administrator who is familiar with the Linux platform and can install, maintain, and troubleshoot any type of Linux system. By changing the exam to be more performance based, CompTIA has established the new Linux+ exam as a way for employers to have confidence in knowing their employees who pass the exam will have the skills necessary to get the job done.

How to Become Certified

The Linux+ certification is available for anyone who passes the XK0-004 exam. There are no prerequisites to taking the exam, but CompTIA recommends having either the A+ and Network+ certifications or a similar amount of experience, along with at least 12 months of hands-on Linux administrator experience.

Pearson VUE administers the exam. The exam can be taken at any Pearson VUE testing center. To register for the exam, call Pearson VUE at (877) 619-2096, or register online at http://home.pearsonvue.com/comptia.

After you take the exam, you will be immediately notified of your score. If you pass, you will get a certificate in the mail showing your Linux+ certification credentials along with a verification number that employers can use to verify your credentials online.

images The new Linux+ exam is part of CompTIA’s Continuing Education (CE) track of exams. The new Linux+ exam is valid for three years, but it can be renewed by acquiring an appropriate number of Continuing Education Units (CEUs) and paying a yearly fee.

Who Should Buy This Book

While anyone who wants to pass the Linux+ certification exams would benefit from this book, that’s not the only reason for purchasing it. This book covers all the material someone new to the Linux world would need to know to start out in Linux. After you’ve become familiar with the basics of Linux, the book will serve as an excellent reference for quickly finding answers to everyday Linux questions.

The book is written with the assumption that you have a familiarity with basic computer and networking principles. While no experience with Linux is required to benefit from this book, it will help if you know your way around a computer in either the Windows or macOS worlds, such as how to use a keyboard, use optical disks, and work with USB thumb drives.

It will also help to have a Linux system available to follow along with. Many chapters contain a simple exercise that will walk you through the basic concepts presented in the chapter. This provides the crucial hands-on experience that you’ll need, to both pass the exam and do well in the Linux world.

images While the CompTIA Linux+ exam is Linux distribution neutral, it’s impossible to write exercises that work in all Linux distributions. That said, the exercises in this book assume you have either Ubuntu 18.04 LTS or CentOS 7 available. You can install either or both of these Linux distributions in a virtual environment using the Oracle VirtualBox software, available at https://virtualbox.org.

How This Book Is Organized

This book consists of 30 chapters organized around the different objective areas of the Linux+ exam:

  • Chapter 1, “Preparing Your Environment,” helps you with finding and installing a Linux distribution to use for experimenting with Linux and working on the exercises in the book.
  • Chapter 2, “Sifting Through Services,” introduces you to the different server applications and uses you’ll commonly see used in Linux.
  • Chapter 3, “Managing Files, Directories, and Text,” covers the basic Linux commands for working with files and directories from the command line.
  • Chapter 4, “Searching and Analyzing Text,” discusses the different tools Linux provides for working with text files.
  • Chapter 5, “Explaining the Boot Process,” takes you into the inner processes of how the Linux operating system starts, showing you how to customize the Linux boot process.
  • Chapter 6, “Maintaining System Startup and Services,” walks through how the Linux system starts applications at boot time by discussing the two different methods used for controlling program startups.
  • Chapter 7, “Configuring Network Connections,” shows how to get your Linux system working on a local area network, along with the different tools available to help troubleshoot network problems on your Linux system.
  • Chapter 8, “Comparing GUIs,” discusses the different graphical desktop environments available in Linux.
  • Chapter 9, “Adjusting Localization Options,” shows how to change the character set and date/time formats for your Linux system to accommodate the different formats used in various countries.
  • Chapter 10, “Administering Users and Groups,” explores how Linux handles user accounts and how you can assign users to groups to manage access to files and directories.
  • Chapter 11, “Handling Storage,” examines the different storage methods and formats available in the Linux system.
  • Chapter 12, “Protecting Files,” dives into the world of data backups, archiving, and restoring.
  • Chapter 13, “Governing Software,” explains how Linux manages software applications and how to install software packages on the various Linux distribution types.
  • Chapter 14, “Tending Kernel Modules,” discusses how Linux uses kernel modules to support hardware and how you can manage the kernel modules on your Linux system.
  • Chapter 15, “Applying Ownership and Permissions,” explores the multiple methods available for protecting files and directories on a Linux system. It discusses the standard Linux-style permissions as well as the more advanced SELinux and AppArmor applications used to provide more advanced security for Linux systems.
  • Chapter 16, “Looking at Access and Authentication Methods,” explores the different methods Linux can use to authenticate user accounts, both locally and in network environments.
  • Chapter 17, “Implementing Logging Services,” shows how Linux logs system events and how you can use the Linux system logs for troubleshooting problems on your Linux system.
  • Chapter 18, “Overseeing Linux Firewalls,” walks through how to protect your Linux system in a network environment.
  • Chapter 19, “Embracing Best Security Practices,” discusses various common methods you can implement to make your Linux environment more secure.
  • Chapter 20, “Analyzing System Properties and Remediation,” explores the different methods you have available to troubleshoot different types of Linux problems. This includes network issues, storage issues, and operating system issues.
  • Chapter 21, “Optimizing Performance,” discusses how Linux handles running applications and the tools you have available to control how those applications behave.
  • Chapter 22, “Investigating User Issues,” explores how to troubleshoot and fix common user-related issues, such as the inability to access specific files or directories on the system.
  • Chapter 23, “Dealing with Linux Devices,” walks through the different types of hardware devices Linux supports and how best to get them working on your Linux system.
  • Chapter 24, “Troubleshooting Application and Hardware Issues,” focuses on different troubleshooting methods for solving storage, application, and network problems that may occur on your Linux system.
  • Chapter 25, “Deploying Bash Scripts,” discusses how to create your own scripts to automate common tasks in Linux.
  • Chapter 26, “Automating Jobs,” follows up on the topic of Bash scripts by showing you how to schedule your scripts to run at specific times of the day, week, month, or year.
  • Chapter 27, “Controlling Versions with Git,” explores the world of software version control and demonstrates how you can use the common Git version control software to manage your own applications and scripts.
  • Chapter 28, “Understanding Cloud and Virtualization Concepts,” walks through the basics of what the cloud is and how to use Linux to create your own cloud computing environment.
  • Chapter 29, “Inspecting Cloud and Virtualization Services,” demonstrates how to implement cloud computing software in Linux.
  • Chapter 30, “Orchestrating the Environment,” discusses how you can use containers and orchestration engines in your Linux environment to control application development environments and deploy applications in controlled environments.

What’s Included in the Book

We’ve included several study learning tools throughout the book:

  • Assessment test. At the end of this introduction is an assessment test that you can take to check your level of Linux skills. Take the test before you start reading the book; it will help you determine the areas in which you need extra help. The answers to the questions appear on a separate page after the last question in the test. Each answer includes an explanation and a note telling you the chapter in which the material appears.
  • Objective Map and Opening List of Objectives. An objective map shows you where each of the Linux+ exam objectives is covered in this book. Also, each chapter opens with a note as to which objective it covers. Use these to see exactly where each of the exam topics is covered.
  • Exam Essentials. At the end of each chapter, after the summary, is a list of exam essentials covered in the chapter. These are the key topics you should take from the chapter as you prepare for the exam.
  • Chapter Review Questions. To test your knowledge as you progress through the book, there are review questions at the end of each chapter. As you finish each chapter, answer the review questions, and then check your answers against the answers provided in Appendix A. You can then go back and reread any sections that detail the topics of the questions you missed.

images The assessment test, review questions, and other testing elements included in this book are not derived from the actual Linux+ exam questions, so don’t memorize the answers to these questions and assume you will pass the exam. You should learn the underlying topics, as described in the text of the book. This will help you answer the questions provided with this book and pass the exam. Learning the underlying topics is also the approach that will serve you best in the workplace, the ultimate goal of the certification.

To get the most out of this book, you should read each chapter from start to finish and then check your memory and understanding with the chapter review questions. Even if you’re already familiar with a topic, it will help to review the material in the chapter. In Linux there are often multiple ways to accomplish a task. It will help to at least be familiar with the different methods to help with the Linux+ exam.

Interactive Online Learning Environment and Test Bank

The interactive online learning environment that accompanies the book provides a test bank with study tools to help you prepare for the certification exam and increase your chances of passing it the first time. The test bank includes the following:

  • Sample Tests. All of the questions in this book are provided, including the assessment test, which you’ll find at the end of this introduction, and the chapter tests that include the review questions at the end of each chapter. In addition, there is a practice exam. Use these questions to test your knowledge of the study guide material. The online test bank runs on multiple devices.
  • Flashcards. Questions are provided in digital flashcard format (a question followed by a single correct answer). You can use the flashcards to reinforce your learning and provide last-minute test prep before the exam.
  • Other Study Tools. A glossary of key terms from this book and their definitions are available as a fully searchable PDF.

images Go to http://www.wiley.com/go/sybextestprep to register and gain access to this interactive online learning environment and test bank with study tools.

Conventions Used in This Book

This book uses certain typographic styles in order to help you quickly identify important information and avoid confusion over the meaning of words such as onscreen prompts. In particular, look for the following styles:

  • Italicized text indicates key terms that are described at length for the first time in a chapter. (Italics are also used for emphasis.)
  • A monospaced font indicates the contents of configuration files, messages displayed at text-mode Linux shell prompts, filenames, text-mode command names, and Internet URLs.
  • Italicized monospace text indicates a variable, or information that differs from one system or command run to another, such as the name of a file or a process ID number.
  • Bold monospace text is information that you’re to type into the computer, usually at a Linux shell prompt. This text can also be italicized to indicate that you should substitute an appropriate value for your system. (When isolated on their own lines, commands are preceded by non-bold monospace $ or # command prompts, denoting regular user or system administrator user, respectively.)

In addition to these text conventions, which can apply to individual words or entire paragraphs, a few conventions highlight segments of text, as in the following examples:

images A note indicates information that’s useful or interesting but that’s somewhat peripheral to the main text. A note might be relevant to a small number of networks, for instance, or it may refer to an outdated feature.

images A tip provides information that can save you time or frustration and that may not be entirely obvious. A tip might describe how to get around a limitation or how to use a feature to perform an unusual task.

images Warnings describe potential pitfalls or dangers. If you fail to heed a warning, you may end up spending a lot of time recovering from a bug, or you may even end up restoring your entire system from scratch.

A sidebar is like a note but longer. The information in a sidebar is useful, but it doesn’t fit into the main flow of the text.

images

A case study is a real-world scenario is a type of sidebar that describes a task or example that’s particularly grounded in the real world. This may be a situation we or somebody we know has encountered, or it may be advice on how to work around problems that are common in real-world, working Linux environments.

Exercise

An exercise is a procedure that you should try on your own computer to help you learn about the material in the chapter. Don’t limit yourself to the procedures described in the exercises, though. Try other commands and procedures to truly learn about Linux.

The Exam Objectives

The exam objectives define the topics you can expect to find in the CompTIA Linux+ exam. The exam developers have determined that these topics are relevant to the skills necessary to become a competent Linux administrator and have based the exam questions on your ability to demonstrate your knowledge in these topics. The official CompTIA Linux+ XK0-004 exam topics are listed here, along with references to where you can find them covered in the book.

1.0 Hardware and System Configuration

1.1 Explain Linux boot process concepts. (Chapter 5)

  • Describe Linux boot loaders
  • Discuss the different boot options
  • Know the file locations required for booting
  • Know the required boot modules and files
  • Explain how to work with a kernel panic

1.2 Given a scenario, install, configure, and monitor kernel modules. (Chapter 14)

  • Know the commands used to install and manage kernel modules
  • Know the locations of the files used for kernel modules

1.3 Given a scenario, configure and verify network connection parameters. (Chapter 7)

  • Be aware of the different network tools available for troubleshooting network issues
  • Know the location of files used for network configuration
  • Understand network card bonding, and the different types of load balancing

1.4 Given a scenario, manage storage in a Linux environment. (Chapter 11)

  • Describe the basic partition concepts
  • Explain the Linux file system hierarchy
  • Know the Linux device mapper system
  • Know the command line tools used for managing and repairing filesystems
  • Know the location of files used to manage the files system
  • Describe the different file system types supported in Linux

1.5 Compare and contrast cloud and virtualization concepts and technologies. (Chapters 28 and 29)

  • Describe cloud and virtualization templates
  • Explain bootstrapping
  • Describe storage methods used in clouds
  • Know the different network methods used in virtualization
  • Describe the different types of hypervisors
  • Know the tools used or managing virtualization in Linux

1.6 Given a scenario, configure localization options. (Chapter 9)

  • Know the location of files used for localization
  • Know the command tools used for localization
  • Know the environment variables used for localization
  • Describe the different character sets used for localization

2.0 Systems Operation and Maintenance

2.1 Given a scenario, conduct software installations, configurations, updates, and removals. (Chapter 13)

  • Describe the different package types used in Linux
  • Know the installation tools used for installing packages
  • Describe the process of building an application from source code
  • Know the tools used for building an application from source code
  • Describe how repositories are used in Linux
  • Know the commands used to retrieve packages and source code files from remote sites

2.2 Given a scenario, manage users and groups. (Chapter 10)

  • Know the commands used to create, modify, and delete users and groups
  • Know how to query users and find your user id
  • Set disk quotas for users on the system
  • Create profiles to apply to all user accounts
  • Know where Linux stores user and group account information

2.3 Given a scenario, create, modify, and redirect files. (Chapters 3 and 4)

  • Know the common text editors available in Linux
  • Know the commands to read files
  • Understand and use output redirection
  • Know the Linux text processing commands
  • Know the commands used for file and directory operations

2.4 Given a scenario, manage services. (Chapter 7)

  • Understand how Systemd works and how to manage services using it
  • Understand how InitV works and how to manage services using it

2.5 Summarize and explain server roles. (Chapter 2)

  • Know the different applications Linux servers can use to provide network services
  • Understand how clients connect to network services
  • Describe how to manage and troubleshoot network services on a Linux server

2.6 Given a scenario, automate and schedule jobs. (Chapter 26)

  • Know how to start and stop a job in background mode
  • Know how to schedule a job to start at a later time

2.7 Explain the use and operation of Linux devices. (Chapter 23)

  • Describe the different types of hardware devices
  • Know the different tools to monitor and configure Linux hardware devices
  • Know the file locations Linux uses to provide information about hardware devices
  • Describe how Linux handles hot pluggable devices

2.8 Compare and contrast Linux graphical user interfaces. (Chapter 8)

  • Know the different X11 server packages used in Linux
  • Know the different desktop manager packages commonly used in Linux
  • Describe how to use a remote desktop
  • Describe how to perform console redirection
  • Know the different accessibility tools available in Linux

3.0 Security

3.1 Given a scenario, apply or acquire the appropriate user and/or group permissions and ownership. (Chapter 15)

  • Describe and use file and directory permissions
  • Understand context-based permissions
  • Explain how to use privilege escalation
  • Describe the different user types in Linux

3.2 Given a scenario, configure and implement appropriate access and authentication methods. (Chapter 16)

  • Describe how Linux and applications use the Pluggable Authentication Method (PAM) to authenticate users
  • Describe how to access a Linux command line using TTY, PTY, and SSH connections
  • Explain how Public Key Infrastructure (PKI) can be used for authentication
  • Understand how to use Virtual Private Networks (VPN) to connect as a client to a Linux system

3.3 Summarize security best practices in a Linux environment. (Chapter 19)

  • Describe the different types of user security available in Linux
  • Explain the different types of system security you can apply to help protect your Linux system
  • Understand how network security can help protect your Linux system from attacks

3.4 Given a scenario, implement logging services. (Chapter 17)

  • Know the different Linux log files and what type of information they contain
  • Describe the two most popular logging methods used in Linux

3.5 Given a scenario, implement and configure Linux firewalls. (Chapter 18)

  • Describe how firewalls use Access Control Lists (ACL)
  • Explain the different firewall software packages commonly used in Linux
  • Understand how IP forwarding is used in a firewall environment
  • Describe common dynamic rule sets used in firewalls

3.6 Given a scenario, backup, restore, and compress files. (Chapter 12)

  • Describe how to archive files in Linux
  • Explain the different types of compression available in Linux
  • Understand the different backup types, and when to use each one
  • Explain the importance of off-site storage
  • Describe how performing integrity checks on backup files is necessary

4.0 Linux Troubleshooting and Diagnostics

4.1 Given a scenario, analyze system properties and remediate accordingly. (Chapter 20)

  • Describe network configuration and monitoring in Linux
  • Describe storage configuration and monitoring in Linux
  • Describe CPU and memory configuration and monitoring in Linux
  • Explain how to recover from a lost root password

4.2 Given a scenario, analyze system processes in order to optimize performance. (Chapter 21)

  • Describe how Linux handles application processes
  • Know how to start and stop application processes
  • Know how to view application processes

4.3 Given a scenario, analyze and troubleshoot user issues. (Chapter 22)

  • Know how to assign, modify, and remove permissions on files and directories
  • Know how to provide access to resources for both local and remote users
  • Understand how Linux uses inodes to track files, and how it can set file quotas
  • Understand the role SELinux plays in protecting files and directories
  • Describe how environment variables and the shell can cause problems for users

4.4 Given a scenario, analyze and troubleshoot application and hardware issues. (Chapter 24)

  • Describe how SELinux can affect access to hardware and applications
  • Know how to troubleshoot and fix storage issues
  • Understand how firewalls can restrict access to network resources
  • Describe the role permissions play with applications
  • Explain how software dependencies can cause problems when running applications
  • Describe how to troubleshoot hardware issues

5.0 Automating and Scripting

5.1 Given a scenario, deploy and execute BASH scripts. (Chapter 25)

  • Understand Linux environment variables and shell variables
  • Know how to create and run shell scripts
  • Know the different programming features available in shell scripts

5.2 Given a scenario, carry out version control using Git. (Chapter 27)

  • Understand the Git package and how to use it
  • Know the files associated with a package managed by Git

5.3 Summarize orchestration processes and concepts. (Chapter 30)

  • Know how agents play a role in orchestration
  • Describe how infrastructure automation plays a role in orchestration
  • Know how to build automation for an orchestration package

Assessment Test

  1. What software package allows a Linux server to share folders and printers with Windows and Mac clients?

    1. Postfix
    2. Apache
    3. Samba
    4. Kerberos
    5. Docker
  2. Which software package allows developers to deploy applications using the exact same environment in which they were developed?

    1. Postfix
    2. Apache
    3. Samba
    4. Kerberos
    5. Docker
  3. The cat -n File.txt command is entered at the command line. What will be the result?

    1. The text file File.txt will be displayed.
    2. The text file File.txt will be displayed along with any special hidden characters in the file.
    3. The text file File.txt will be displayed along with any special symbols representing end-of-line characters.
    4. The text file File.txt will be displayed along with line numbers.
    5. The text file File.txt will be displayed in reverse order.
  4. Which of the following are stream editors? (Choose all that apply.)

    1. vim
    2. sed
    3. awk
    4. gawk
    5. nano
  5. Which command in GRUB2 defines the location of the /boot folder to the first partition on the first hard drive on the system?

    1. set root=hd(0,1)
    2. set root=hd(1,0)
    3. set root=hd(1,1)
    4. set root=hd(0,0)
    5. set root=first
  6. If you see read or write errors appear in the system log, what tool should you use to correct any bad sections of the hard drive?

    1. mount
    2. unmount
    3. fsck
    4. dmesg
    5. mkinitrd
  7. The init program is started on a Linux system and has a process ID number. What typically is that process’s ID number?

    1. 0
    2. 1
    3. 2
    4. 10
    5. Unknown
  8. You need to determine the default target of a systemd system. Which of the following commands should you use?

    1. grep initdefault /etc/inittab
    2. runlevel
    3. systemctl is-enabled
    4. systemd get-target
    5. systemctl get-default
  9. The Cinnamon desktop environment uses which windows manager?

    1. Mutter
    2. Muffin
    3. Nemo
    4. Dolphin
    5. LightDM
  10. Your X11 session has become hung. What keystrokes do you use to restart the session?

    1. Ctrl+C
    2. Ctrl+Z
    3. Ctrl+Q
    4. Ctrl+Alt+Delete
    5. Ctrl+Alt+Backspace
  11. What folder contains the time zone template files in Linux?

    1. /etc/timezone
    2. /etc/localtime
    3. /usr/share/zoneinfo
    4. /usr/share/timezone
    5. /usr/share/localtime
  12. What systemd command allows you to view and change the time, date, and time zone?

    1. timedatectl
    2. localectl
    3. date
    4. time
    5. locale
  13. Which of the following files contain user account creation directives used by the useradd command? (Choose all that apply.)

    1. The /etc/default/useradd file
    2. The /etc/useradd file
    3. The /etc/adduser.conf file
    4. The /etc/login.defs file
    5. The /etc/login.def file
  14. You need to display the various quotas on all your filesystems employing quota limits. Which of the following commands should you use?

    1. edquota -t
    2. quotaon -a
    3. quotacheck -cu
    4. quotacheck -cg
    5. repquota -a
  15. What drive and partition does the raw device file /dev/sdb1 reference?

    1. The first partition on the second SCSI storage device
    2. The second partition on the first SCSI storage device
    3. The first partition on the second PATA storage device
    4. The second partition on the first PATA storage device
    5. The second partition on the second SATA storage device
  16. What tool creates a logical volume from multiple physical partitions?

    1. mkfs
    2. pvcreate
    3. lvcreate
    4. fdisk
    5. vgcreate
  17. Which of the following can be used as backup utilities? (Choose all that apply.)

    1. The gzip utility
    2. The zip utility
    3. The tar utility
    4. The rsync utility
    5. The dd utility
  18. 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.)

    1. The rsync utility
    2. The md5sum utility
    3. The sftp utility
    4. The scp utility
    5. The sha512sum utility
  19. What tool should you use to install a .deb package file?

    1. dpkg
    2. tar
    3. gcc
    4. rpm
    5. gzip
  20. What tool do you use to install a .rpm package file?

    1. dpkg
    2. tar
    3. gcc
    4. rpm
    5. gzip
  21. The lsmod utility provides the same information as what other utility or file(s)?

    1. The modinfo utility
    2. The /proc/modules file
    3. The /etc/modules.conf file
    4. The insmod utility
    5. The /run/modprobe.d/*.conf files
  22. Which utility should be used to remove a module along with any dependent modules?

    1. The rmmod utility
    2. The modinfo utility
    3. The cut utility
    4. The depmod utility
    5. The modprobe utility
  23. What special bit should you set to prevent users from deleting shared files created by someone else?

    1. SUID
    2. GUID
    3. Sticky bit
    4. Read
    5. Write
  24. What command can you use to change the owner assigned to a file?

    1. chmod
    2. chown
    3. chage
    4. ulimit
    5. chgrp
  25. The ______ directory contains the various PAM configuration files.

    1. The /etc/pam/ directory
    2. The /etc/pam_modules/ directory
    3. The /etc/modules/ directory
    4. The /etc/pam.d/ directory
    5. The /etc/pam_modules.d/ directory
  26. Which of the following can override the settings in the ~/.ssh/config file?

    1. The settings in the /etc/ssh/ssh_config file.
    2. The ssh utility’s command-line options.
    3. You cannot override the settings in this file.
    4. The settings in the /etc/ssh/sshd_config file.
    5. The settings in the sshd daemon’s configuration file.
  27. What command can you use to display new entries in a log file in real time as they occur?

    1. head
    2. tail
    3. tail -f
    4. head -f
    5. vi
  28. What command do you use to display entries in the systemd-journald journal?

    1. journalctl
    2. syslogd
    3. klogd
    4. systemd-journald
    5. vi
  29. The /etc/services file may be used by firewalls for what purpose?

    1. To designate what remote services to block
    2. To store their ACL rules
    3. To map a service name to a port and protocol
    4. To determine if the port can be accessed
    5. To designate what local services can send out packets
  30. Which of the following is true about netfilter? (Choose all that apply.)

    1. It is used by firewalld
    2. It is used by UFW.
    3. It provides code hooks into the Linux kernel for firewall technologies to use.
    4. It is used by iptables.
    5. It provides firewall services without the need for other applications.
  31. Which of the following is a measurement of the maximum amount of data that can be transferred over a particular network segment?

    1. Bandwidth
    2. Throughput
    3. Saturation
    4. Latency
    5. Routing
  32. Which tool will allow you to view disk I/O specific to swapping?

    1. ipcs -m
    2. cat /proc/meminfo
    3. free
    4. swapon -s
    5. vmstat
  33. What command-line command allows you to view the applications currently running on the Linux system?

    1. lsof
    2. kill
    3. ps
    4. w
    5. nice
  34. What command-line commands allow you to send process signals to running applications? (Choose two.)

    1. renice
    2. pkill
    3. nice
    4. kill
    5. pgrep
  35. 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?

    1. Add the file line to the $HOME/.profile file instead.
    2. Nothing. A user’s prompt cannot be changed in a subshell.
    3. Add export prior to PS1 on the same line in the file.
    4. Change her default shell to /bin/dash for this to work.
    5. Change the last field in her password record to /sbin/false.
  36. 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?

    1. The directory does not have display (d) set for other permissions.
    2. The directory does not have execute (x) set for other permissions.
    3. The directory does not have write (w) set for other permissions.
    4. The directory does not have list (l) set for other permissions.
    5. The directory does not have read (r) set for other permissions.
  37. Which directories contain dynamic files that display kernel and system information? (Choose two.)

    1. /dev
    2. /proc
    3. /etc
    4. /sys
    5. /dev/mapper
  38. What directory contains configuration information for the X Windows System in Linux?

    1. /dev
    2. /proc
    3. /etc/X11
    4. /sys
    5. /proc/interrupts
  39. How would you fix a “mount point does not exist” problem?

    1. Employ the fsck utility to fix the bad disk sector.
    2. Employ the badblocks utility to fix the bad disk sector.
    3. Use super user privileges, if needed, and create the directory via the vgchange command.
    4. Use super user privileges, if needed, and create the directory via the mkdir command.
    5. Use super user privileges, if needed, and create the directory via the mountpoint command.
  40. 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.)

    1. The firewall-cmd command
    2. The ufw command
    3. The iptables command
    4. The getacl command
    5. The setacl command
  41. Which Bash shell script command allows you to iterate through a series of data until the data is complete?

    1. if
    2. case
    3. for
    4. exit
    5. $()
  42. Which environment variable allows you to retrieve the numeric user ID value for the user account running a shell script?

    1. $USER
    2. $UID
    3. $BASH
    4. $HOME
    5. $1
  43. What does placing an ampersand sign (&) after a command on the command-line do?

    1. Disconnects the command from the console session
    2. Schedules the command to run later
    3. Runs the command in background mode
    4. Redirects the output to another command
    5. Redirects the output to a file
  44. When will the cron table entry 0 0 1 * * myscript run the specified command?

    1. At 1 a.m. every day
    2. At midnight on the first day of every month
    3. At midnight on the first day of every week
    4. At 1 p.m. every day
    5. At midnight every day
  45. Which of the following packages will provide you with the utilities to set up Git VCS on a system?

    1. git-vcs
    2. GitHub
    3. gitlab
    4. Bitbucket
    5. git
  46. If you do not tack on the -m option with an argument to the git commit command, what will happen?

    1. The command will throw an error message and fail.
    2. The commit will take place, but no tracking will occur.
    3. You are placed in an editor for the COMMIT_EDITMSG file.
    4. Your commit will fail, and the file is removed from the index.
    5. Nothing. This is an optional switch.
  47. At a virtualization conference, you overhear someone talking about using blobs on their cloud-based virtualization service. Which virtualization service are they using?

    1. Amazon Web Services
    2. KVM
    3. Digital Ocean
    4. GitHub
    5. Microsoft Azure
  48. “A networking method for controlling and managing network communications via software that consists of a controller program as well as two APIs” describes which of the following?

    1. Thick provisioning
    2. Thin provisioning
    3. SDN
    4. NAT
    5. VLAN
  49. 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.)

    1. Mesos
    2. Kubernetes
    3. Splunk
    4. Swarm
    5. AWS
  50. Which of the following is used in container orchestration? (Choose all that apply.)

    1. Automated configuration management
    2. Self-healing
    3. DevOps
    4. Agentless monitoring
    5. Build automation
  51. What type of cloud service provides the full application environment so that everyone on the Internet can run it?

    1. PaaS
    2. Private
    3. Public
    4. SaaS
    5. Hybrid
  52. What type of hypervisor is the Oracle VirtualBox application?

    1. PaaS
    2. SaaS
    3. Type II
    4. Type I
    5. Private
  53. What file should you place console and terminal file names into to prevent users from logging into the Linux system as the root user account from those locations?

    1. /etc/cron.deny
    2. /etc/hosts.deny
    3. /etc/securetty
    4. /etc/login.warn
    5. /etc/motd
  54. What Linux program logs user file and directory access?

    1. chroot
    2. LUKS
    3. auditd
    4. klist
    5. kinit
  55. 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?

    1. cd
    2. exit
    3. cd ~
    4. cd -
    5. return
  56. To copy a directory with the cp command, which option do you need to use?

    1. -i
    2. -R
    3. -v
    4. -u
    5. -f

Answers to Assessment Test

  1. C. The Samba software package allows Linux servers and clients to communicate with Windows and Mac clients or servers using the Microsoft SMB protocol, so option C is correct. The Postfix software package provides email service for Linux servers, not Windows services, so option A is incorrect. The Apache package is a web server; it doesn’t allow Linux servers to share folders with Windows and Mac clients, so option B is incorrect. The Kerberos package provides authentication services; it does not allow Linux servers to share folders, so option D is incorrect. The Docker package provides container services for deploying applications on a Linux server; it does not allow the Linux server to share folders with Windows or Mac clients, so option E is incorrect.
  2. E. 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. The Postfix package provides email services for a Linux server; it doesn’t deploy applications, so option A is incorrect. The Apache package provides web server services for a Linux server; it doesn’t deploy application environments, so option B is incorrect. The Samba package allows a Linux server to interact in a Windows network with Windows clients and servers; it does not provide an environment for deploying applications, so option C is incorrect. The Kerberos package provides authentication services for Linux servers; it doesn’t deploy applications, so option D is incorrect.
  3. D. The cat -n File.txt command will display the File.txt text file along with line numbers. Therefore, option D is correct. The command in option A will simply display the File.txt file. Thus, option A is a wrong answer. To see any special hidden characters within the File.txt file, you would need to enter the command cat -A File.txt. Therefore, option B is an incorrect choice. End-of-line characters need a different cat command option, such as the -E switch. Therefore, option C is a wrong choice. The cat command does not have a switch that will allow a text file’s contents to be displayed in reverse order. Thus, option E is an incorrect choice.
  4. B, C, D. The sed, awk, and gawk utilities are all stream editors. Therefore, options B, C, and D are correct. Both vim and nano are considered to be text editors. Therefore, options A and E are incorrect choices.
  5. A. 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 and option A is correct. Option B (1,0) defines the second hard drive and an incorrect partition number, so it is incorrect. Option C defines the first partition but the second hard drive, so it is incorrect. Option D defines the first hard drive but an incorrect partition, so it is incorrect. Option E uses the keyword first, which is not recognized by GRUB2, so it is incorrect.
  6. C. The fsck program can perform a filesystem check and repair multiple types of filesystems on partitions, so option C is correct. The mount program is used to append a partition to a virtual directory; it can’t correct a partition that contains errors, so option A is incorrect. The unmount command removes a partition from the virtual directory, so option B is incorrect. Option D (the dmesg command) displays boot messages, and option E (the mkinitrd command) creates an initrd RAM disk, so both are incorrect.
  7. B. 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. Therefore, option B is the correct answer. The Linux kernel has the 0 PID number, and thus, option A is a wrong answer. Options C, D, and E are also incorrect choices.
  8. E. The systemctl get-default command will display a systemd system’s default target. Therefore, option E is the correct answer. The grep initdefault /etc/inittab command will extract the default runlevel for a SysV init system. Thus, option A is a wrong answer. The runlevel command will display a SysV init system’s previous and current runlevel. Therefore, option B is an incorrect answer. The systemctl is-enabled command shows whether or not a particular service, whose name is passed as a command argument, is configured to start at system boot. Thus, option C is a wrong choice. Option D is a made-up command and therefore the wrong answer.
  9. B. The Cinnamon desktop environment uses the Muffin windows manager. Therefore, option B is the correct answer. Mutter is the windows manager for the GNOME Shell desktop environment, though Muffin did fork from that project. Thus, option A is a wrong answer. Nemo is the file manager for Cinnamon, and therefore, option C is a wrong choice. Dolphin is the file manager for the KDE Plasma desktop environment. Thus, option D is a wrong choice. LightDM is the display manager for Cinnamon, and therefore, option E is also an incorrect choice.
  10. E. The Ctrl+Alt+Backspace will kill your X11 session and then restart it, putting you at the login screen (display manager.) Therefore, option E is the correct answer. The Ctrl+C combination sends an interrupt signal but does not restart an X11 session. Thus, option A is a wrong answer. The Ctrl+Z keystroke combination sends a stop signal, but it will not restart the X11 session. Therefore, option B is also an incorrect answer. The Ctrl+Q combination will release a terminal that has been paused by Ctrl+S. However, it does not restart an X11 session, so it too is a wrong choice. The Ctrl+Alt+Delete keystroke combination can be set to do a number of tasks, depending upon your desktop environment. In some cases, it brings up a shutdown, logout, or reboot menu. However, it does not restart the X11 session, so option D is an incorrect choice.
  11. C. Both Debian-based and Red Hat–based Linux distributions store the time zone template files in the /usr/share/zoneinfo folder, so option C is correct. The /etc/timezone and /etc/localtime files contain the current time zone file for Debian- and Red Hat–based systems, not the time zone template files, so options A and B are incorrect. The /usr/share/timezone and /usr/share/localtime folders don’t exist in either Debian-based or Red Hat–based Linux distributions, so options D and E are also incorrect.
  12. A. 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, so option A is correct. The localectl program is also part of the systemd package, but it handles localization information and not time and date information, so option B is incorrect. The date command allows you to view and change the time and date but not the time zone setting, so option C is incorrect. The time command displays the elapsed CPU time used by an application, not the current time, date, and time zone, so option D is incorrect. The locale command allows you to view the localization settings for the Linux system, not the time, date, or time zone, so option E is also incorrect.
  13. A, D. The /etc/default/useradd file and /etc/login.defs file are files that contain user account creation directives used by the useradd command. Therefore, options A and D are the correct answers. Option B’s /etc/useradd file is a made-up file name, and thus option B is a wrong choice. The /etc/adduser.conf file is only on Linux distributions that use the adduser utility to create accounts. Thus, option C is an incorrect answer. The /etc/login.def file is a made-up file name, and thus option E is also an incorrect choice.
  14. E. The repquota -a command will display the various quotas on all your filesystems employing quota limits. Therefore, option E is the correct answer. The edquota -t command will edit quota grace periods for the system. Therefore, option A is a wrong answer. The quotaon -a command will automatically turn on quotas for all mounted non-NFS filesystems in the /etc/fstab file, but it does not display filesystems’ quotas. Thus, option B is an incorrect choice. The quotacheck utility creates either the aquota.group file, if the -cg options are used, or the aquota.user file, if the -cu switches are used, or both files if -cug is employed. However, it does nothing for displaying filesystems’ quotas. Thus, options C and D are incorrect answers.
  15. A. Option A is the correct answer because 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. So /dev/sdb1 references the first partition on the second SCSI or SATA device. Option B would be referenced by the /dev/sda2 file, so it is incorrect. Option C would be referenced by the /dev/hdb1 file, so it is incorrect. Option D would be referenced by /dev/hda2, so option D is incorrect, and option E would be referenced by /dev/sdb2, so it is incorrect.
  16. C. 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, so option C is correct. The mkfs program creates a filesystem on a partition, but doesn’t create a logical volume, so option A is incorrect. The pvcreate program identifies a physical volume from a partition but doesn’t create the logical volume, so option B is incorrect. The fdisk program creates and modifies physical partitions, not logical volumes, so option D is incorrect. The vgcreate program creates a volume group for grouping physical partitions, but doesn’t create the logical volume, so option E is incorrect.
  17. B, C, D, E. The zip, tar, rsync, and dd utilities all can be used to create data backups. Therefore, options B, C, D, and E are correct answers. The gzip utility can be used after a backup is created or employed through tar options to compress a backup, so option A is the only wrong choice.
  18. B, E. 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. Therefore, options B and E are the correct answers. The utilities mentioned in options A, C, and D will allow you to securely transfer files but not check a file’s integrity. Therefore, options A, C, and D are incorrect choices.
  19. A. The dpkg program is used for installing and removing Debian-based packages that use the .deb file format, so option A is correct. The tar program is used for creating and extracting tape archive formatted files that use the .tar file extension, so option B is incorrect. The gcc program is used for compiling source code into executable programs, so option C is incorrect. The rpm program is used for installing and removing Red Hat–based packages that use the .rpm file format, so option D is incorrect. The gzip program compresses files and adds the .gz file extension to them, so option E is incorrect.
  20. D. The rpm program is used for installing and removing Red Hat–based packages that use the .rpm file format, so option D is correct. The dpkg program is used for installing and removing Debian-based packages that use the .deb file format, so option A is incorrect. The tar program is used for creating and extracting tape archive formatted files that use the .tar file extension, so option B is incorrect. The gcc program is used for compiling source code into executable programs, so option C is incorrect. The gzip program compresses files and adds the .gz file extension to them, so option E is incorrect.
  21. B. The /proc/modules file has the same information that is displayed by the lsmod utility (though the lsmod utility formats it much nicer). Therefore, option B is the correct answer. The modinfo utility provides detailed module data, while lsmod only shows brief information. Thus, option A is a wrong answer. The /etc/modules.conf file is a kernel module configuration file, and it does not provide the same information as the lsmod utility. Therefore, option C is also an incorrect answer. The insmod command is used to dynamically load kernel modules, and thus it is a wrong answer. The /run/modprobe.d/*.conf files are kernel module configuration files, and they do not provide the same information as the lsmod utility. Therefore, option E is also an incorrect choice.
  22. 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. Therefore, option E is the correct answer. The rmmod utility will remove a kernel module but not any of its dependencies. Thus, option A is a wrong answer. The modinfo command does not unload kernel modules but instead displays detailed information concerning a specified module. Therefore, option B is an incorrect choice. The cut utility is used to filter text files and display the filtered text to STDOUT. It is not involved in kernel module removal, and thus option C is a wrong choice. The depmod utility is used to create a list of modules and their dependencies. But it is not used to remove modules. Therefore, option D is an incorrect choice.
  23. C. The sticky 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, so option C is correct. The SUID bit allows a standard user to run an application with the file owner permissions but doesn’t block users from deleting shared files, so option A is incorrect. The GUID bit is used on a directory to ensure that all files created in the directory have the same group as the directory, but it doesn’t prevent users in that group from deleting files, so option B is incorrect. The Read and Write standard permission bits control access to read to a file or write to a file, but they don’t block users from deleting a file, so options D and E are both incorrect.
  24. B. The chown command allows you to set both the owner and group assigned to a file, so option B is correct. The chmod command allows you to change the permissions for the file, but not the owner of the file, so option A is incorrect. The chage command manages password aging for user accounts, not owners of files, so option C is incorrect. The ulimit command allows the administrator to restrict system resources assigned to users but doesn’t assign users to files, so option D is incorrect. The chgrp command allows you to change the group assigned to a file but not the owner, so option E is incorrect.
  25. D. The /etc/pam.d/ directory contains the various PAM configuration files. Therefore, option D is the correct answer. The other directory names are made up. Thus, options A, B, C, and E are incorrect answers.
  26. B. The settings within the ~/.ssh/config file can be overridden by various ssh utility options provided at the command line. Therefore, option B is the correct answer. The settings in the /etc/ssh/ssh_config file can be overridden by both the settings in the ~/.ssh/config file and the ssh utility’s command-line options, so option A is a wrong answer. The /etc/ssh/sshd_config file is the sshd daemon’s configuration file, and it deals with providing the SSH services, not in setting the configuration for the SSH client. Therefore, both options D and E are incorrect choices.
  27. C. The -f option of the tail command displays new additions to a file in real time, so option C is correct. The head and tail commands by themselves just list the existing entries in a file, so options A and B are incorrect. The head command doesn’t support the -f option, so option D is incorrect. The vi editor also only displays existing data in a file and not newly added data, so option E is incorrect.
  28. A. The systemd-journald application uses its own binary file format for the journal file and requires the journalctl file to read it, so option A is correct. The syslogd and klogd applications are syslog loggers and not able to read the systemd-journald journal file, so options B and C are incorrect. The systemd-journald application itself only adds event messages to the journal and doesn’t read it, so option D is incorrect. Since the journal file is in binary format, you can’t read it using standard text editor programs, so option E is incorrect.
  29. C. The /etc/services file may be used by a firewall, such as UFW, to map a particular service name to its port and protocol. Thus, option C is the correct answer. The file is not used to designate remote services to block or store a firewall’s ACL rules. Therefore, options A and B are wrong answers. The Linux firewall applications do not use the /etc/services file to determine if a port can be accessed or what local services can send out packets. Thus, options D and E are incorrect choices.
  30. A, B, C, D. 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. Therefore, options A, B, C, and D are all correct answers. Unfortunately, netfilter cannot provide firewall services on its own. Thus, option E is the only incorrect choice.
  31. A. Bandwidth is a measurement of the maximum data amount that can be transferred between two network points over a period of time. Therefore, option A is the correct answer. Throughput is a measurement of the actual data amount that is transferred between two network points, and thus option B is a wrong answer. Saturation occurs when network traffic exceeds capacity, but it is not a measurement. Thus, option C is an incorrect answer. Latency is the time between a source sending a packet and the packet’s destination receiving it. Therefore, option D is a wrong choice. Routing is the process of forwarding IP packets to the appropriate destination. Thus, option E is also an incorrect answer.
  32. E. The vmstat utility provides a lot of memory statistics, including disk I/O specific to swapping. Therefore, option E is the correct answer. The ipcs -m command allows you to see shared memory segments instead of disk I/O specific to swapping. Thus, option A is the wrong answer. The cat /proc/meminfo command displays detailed information concerning a system’s RAM. Therefore, option B is an incorrect answer. The free command shows memory items such as free memory, used memory, and buffer/cache usage. Thus, option C is a wrong choice. The swapon -s command displays swap space elements such as type, name, and priority. Therefore, option D is also an incorrect choice.
  33. C. The ps command with the proper options displays the active applications running on the Linux system, so option C is correct. The lsof command displays the files currently open by applications but not all of the running applications, so option A is incorrect. The kill command stops a running application based on its process ID; it doesn’t display all of the running applications, so option B is incorrect. The w command displays all of the current users on the system but not all of the running applications, so option D is incorrect. The nice command allows you to start a new application with a specified priority level, but it doesn’t allow you to display the currently running applications, so option E is incorrect.
  34. B, D. The pkill and kill commands allow you to send Linux process signals to running applications, so options B and D are correct. The renice command allows you to change the priority level of a running application but not send process signals to it, so option A is incorrect. The nice command allows you to start an application with a specified priority level but not send process signals to applications that are already running, so option C is incorrect. The pgrep command allows you to display running applications, but it doesn’t send process signals to them, so option E is incorrect.
  35. C. 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. Thus, option C is the correct answer. Since Annika’s environment file exists, the $HOME/.profile file is not used. Thus, option A is a wrong answer. A user prompt can be changed in a subshell, so option B is also an incorrect answer. Changing Annika’s default shell will not fix this issue, so option D is a wrong choice. If Annika changes the last field in her password record to /sbin/false, she will no longer be able to log into the system using her account. Therefore, option E is an incorrect choice.
  36. E. 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. Therefore, option E is the correct answer. There is no display (d) permission setting, so option A is a wrong answer. The execute (x) permission allows a user to change their present working directory to that directory as long as all the parent directories also have that permission set. Thus, option B is a wrong choice. The write (w) permission allows a user to create files within that directory, so option C is an incorrect answer. There is no list (l) permission setting, so option D is also an incorrect choice.
  37. B, D. The Linux kernel uses the /proc and /sys directories to produce dynamic files that contain information about the kernel and system, so options B and D are correct. The /dev folder contains files for communicating with devices, not kernel and system information, so option A is incorrect. The /etc directory contains application configuration files, not files created by the kernel for displaying kernel and system information, so option C is incorrect. The /dev/mapper directory is used for virtual files mapped to physical device files for LVM and LUKS, not kernel information, so option E is incorrect.
  38. C. 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, so option C is correct. The /dev directory contains device files used to send and receive data from devices, not the X Windows configuration files, so option A is incorrect. The kernel uses the /proc and /sys directories to create dynamic files that show kernel and system information, not contain X Windows configuration files, so options B and D are incorrect. The /proc/interrupts file contains information about hardware interrupts currently used by hardware devices on the system, not X Windows configuration files, so option E is incorrect.
  39. D. This problem concerns a missing directory. Therefore, to fix it, use super user privileges, if needed, and create the directory via the mkdir command. Thus, option D is the correct answer. The problem does not concern a bad disk sector (and you cannot fix bad disk sectors with the badblocks utility), so options A and B are wrong answers. You would employ the vgchange command for a missing volume in a logical volume but not a missing directory. Therefore, option C is an incorrect answer. While the mountpoint command does allow you to see if a particular directory is a mount point, it does not allow you to create a missing directory. Thus, option E is an incorrect choice as well.
  40. A, B, C. Since the problem involves a remote server, you need to investigate the firewall access control lists (ACLs) on both the local and remote systems. Therefore, depending upon their firewall employed, you may use the firewall-cmd, ufw, or iptables command in the troubleshooting process. Thus, options A, B, and C are the correct answers. The getacl and setacl commands deal with file inheritance issues, and therefore options D and E are incorrect choices.
  41. C. The for command allows you to iterate through a series of data one by one until the data set is exhausted, so option C is correct. The if and case statements perform a single test on an object to determine if a block of commands should be run; they don’t iterate through data, so options A and B are incorrect. The exit command stops the shell script and exits to the parent shell, so option D is incorrect. The $() command redirects the output of a command to a variable in the shell script, so option E is incorrect.
  42. B. The $UID environment variable contains the numeric user ID value of the user account running the shell script, so option B is correct. The $USER environment variable contains the text user name of the user account running the shell script, not the numerical user ID value, so option A is incorrect. The $BASH environment variable contains the path to the executable Bash shell, so option C is incorrect. The $HOME environment variable contains the location of the home directory of the user account running the shell, so option D is incorrect. The $1 positional variable contains the first parameter listed on the command-line command when the shell script was run, so option E is incorrect.
  43. C. The ampersand sign (&) tells the shell to run the specified command in background mode in the console session, so option C is correct. The nohup command is used to disconnect the command from the console session, so option A is incorrect. The at command is used to schedule a command to run later, so option B is incorrect. The pipe symbol (|) redirects the output from the command to another command, so option D is incorrect. The greater-than symbol (>) redirects the output from the command to a file, so option E is incorrect.
  44. B. 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. That makes option B correct, and options A, C, D, and E incorrect.
  45. E. This git package provides utilities to set up Git VCS on a system, so option E is the correct answer. The git-vcs package is made up, so option A is a wrong answer. The GitHub, gitlab, and Bitbucket packages are also made up, but they have similar names as cloud-based remote repositories used with Git (GitHub, GitLab, BitBucket). Therefore, options B, C, and D are also incorrect choices.
  46. C. 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. Thus, option C is the correct answer. All the other options are made up and therefore incorrect.
  47. E. The Microsoft Azure cloud-based virtualization service provides blobs, which are large unstructured data storage that offered over the Internet and can be manipulated with .NET code. Therefore, option E is the correct answer. Amazon Web Services (AWS) and Digital Ocean are both cloud-based virtualization services, but they do not employ storage called blob, so options A and C are wrong answers. KVM is a hypervisor, not a cloud-based virtualization service, so option B is an incorrect answer. GitHub is a cloud-based remote repository used in version control, so option D is also an incorrect choice.
  48. C. 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. Thus, option C is the correct answer. Thick provisioning and thin provisioning refer to virtual storage configurations, not networking methods, so options A and B are wrong answers. Network address translation (NAT) is a virtualization network adapter configuration, which operates similarly to a NAT router in a network. Therefore, option D is an incorrect answer. A VLAN is a virtual (logical) LAN configuration, and thus, option E is an incorrect choice as well.
  49. B, D. Only Kubernetes and Swarm are orchestration systems. Therefore, options B and D are correct answers. Mesos needs Marathon to implement an orchestration engine, so option A is a wrong answer. Splunk can be used as a monitoring tool in an orchestrated environment, but it is not an orchestration system, so option D is also a wrong choice. Amazon Web Services (AWS) is cloud-based virtualization services on which you can use orchestration tools, but it is not an orchestration engine. Thus, option E is also an incorrect choice.
  50. A, B, D, E. 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. Thus, option C is an incorrect choice.
  51. D. The Software as a Service (SaaS) cloud service type provides full applications, allowing anyone to connect to your application, so option D is correct. The Platform as a Service (PaaS) cloud service type doesn’t include an application; you must provide it yourself, so option A is incorrect. Private, public, and hybrid are all methods of implementing cloud services, not cloud service types, so options B, C, and E are all incorrect.
  52. C. The Oracle VirtualBox hypervisor installs on top of a host operating system, making it a Type II hypervisor, so option C is correct. PaaS and SaaS are types of cloud services, not hypervisors, so options A and B are incorrect. A private cloud service is a method for implementing cloud services in an internal network, not a type of hypervisor, so option E is incorrect.
  53. C. The /etc/securetty file provides a list of locations from which users can’t log in using the root user account, so option C is correct. The /etc/cron.deny file prevents users from scheduling jobs, not logging in as the root user account, so option A is incorrect. The /etc/hosts.deny file blocks access from remote network hosts; it doesn’t block root access from local terminals or the console, so option B is incorrect. The /etc/login.warn and /etc/motd files contain messages that are displayed at login time; they don’t block users from logging in as the root user account, so options D and E are incorrect.
  54. C. The auditd program monitors system activity, including user file and directory access, and logs events based on rules you create. Thus, option C is correct. The chroot utility restricts applications to a specific location in the virtual filesystem but doesn’t log user file and directory access, so option A is incorrect. The LUKS system encrypts disk partitions but doesn’t log user file and directory access, so option B is incorrect. The klist and kinit programs are used for Kerberos user authentication, not logging user file and directory access, so options D and E are both incorrect.
  55. D. The cd - command will return your process to its previous directory in the virtual directory system, so option D is the correct answer. The cd and cd ~ commands both return your process to your home directory, which was not necessarily the previous directory. Therefore, options A and C are wrong answers. The exit command causes your process to exit its current shell, not return to the previous directory, so option B is also an incorrect answer. The return command is used in Bash shell scripts to return from a function or return from a sourced script. Thus, option E is also an incorrect choice.
  56. B. The -R option used with the cp command allows you to copy a directory’s contents. You can also employ the -r or --recursive options to achieve the same results. Therefore, option B is the correct answer. The -i option will ask before overwriting a preexisting directory but not copy recursively, so option A is a wrong answer. The -v option will provide verbose information for the copy, which is helpful, but does not allow a recursive copy to occur. Thus, option C is also an incorrect answer. The -u option is handy in that it will only allow the cp command to overwrite preexisting files with the same name, if the files being copied are newer. However, it is not used to recursively copy, so option D is also an incorrect answer. The -f option forces a copy to occur and overwrites any preexisting files with the same name but does not force a recursive copy. Thus, option E is an incorrect choice.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset