Font size
WorksheetsLinux - Final Exam Review
Total questions: 155
Worksheet time: 1hrs 20mins
What does the git clone command do in Git?
Uploads local changes to a remote repository.
Downloads a copy of a remote Git repository to your local machine.
Switches branches in your Git repository.
Creates a new branch in your local repository.
Which Git command is used to upload your local changes to a remote repository?
git commit
git push
git pull
git add
Which Git command is used to create, list, or delete branches in your repository?
git branch
git tag
git commit
git push
What is the purpose of the .gitignore file in a Git repository?
To list branches in the repository.
To create new tags for specific commits.
To specify files and directories that should be ignored by Git.
To save changes to the local repository.
Which advanced Git feature helps facilitate code review and collaboration in team-based development workflows?
Git merge.
Git rebase.
Git pull.
Pull requests (PRs).
Which file format is known for its human-readable syntax, making it suitable for defining and organizing configurations in a clear and concise manner in Infrastructure as Code (IaC)?
XML (eXtensible Markup Language)
JSON (JavaScript Object Notation)
YAML (YAML Ain't Markup Language)
CSV (Comma-Separated Values)
Which tool adopts a human-readable YAML syntax for configuration files and is known for its agentless architecture?
Puppet
Chef
Ansible
SaltStack
Which tool employs a Ruby-based DSL for describing system configurations and follows a declarative approach to configuration management?
Ansible
Puppet
Chef
SaltStack
SaltStack distinguishes itself with powerful remote execution capabilities. What language is used for its configuration files?
YAML
JSON
Ruby
Python
What does "initiating a container" involve?
Building a container image
Launching its processes to bring it to life
Deploying instances based on existing container images
Connecting to a running container for interaction
What does "deploying a container" involve?
Halting the processes of a container
Launching container processes based on existing images
Exposing specific ports within a container
Creating and launching instances of a container based on existing container images
What is the significance of "exposing ports" in containers?
Accessing logs of container activities
Halting the processes of a container
Making specific ports within a container accessible externally
Creating and launching instances of a container
Explain what a container is.
What directory in Linux Contains files that change while the system is being used, such as log files and cache data?
Where are essential executable files for the system located?
/lib
/bin
/usr
/sbin
9. The /media directory serves as:
a location for temporary files
a mount point for removable media
a directory for user documents
a system configuration directory
What Linux command will display your current directory?
Which option displays all files and directories, including hidden ones, using the ls command?
-a
-l
-R
-al
What command is used to create a new file in Linux?
touch
cat
mkdir
cp
How is the cp command used to copy a directory and its contents?
cp -dR source_directory destination_directory
cp source_directory -R destination_directory
cp source_directory destination_directory -R
cp -r source_directory destination_directory
What is the purpose of variables in shell scripting?
To generate arbitrary strings using curly braces.
To manipulate and expand the values of variables.
To perform arithmetic operations within double parentheses.
To store and manipulate data, acting as placeholders for values.
What does the | (Pipe) command do in shell scripting?
Connects the output of one command as the input to another command.
Executes the command following it ONLY IF the preceding command fails.
Redirects standard output to a file.
Appends the standard output to the end of a file.
What does the > (Output Redirection) command do in shell scripting?
Redirects the standard output to a file, overwriting it if it exists.
Appends the standard output to the end of a file.
Redirects the input from a file to a command.
Combines standard output and standard error to a specified file.
What is nano?
An advanced text editor
A programming language
A simple text editor
A system administration tool
What is a notable characteristic of vi(m)?
It requires mastering keyboard commands
It has a graphical user interface
It supports mouse interactions
It is primarily used for word processing
Which tool is useful for searching patterns within text files and supports regular expressions?
wc
cut
grep
tr
What does the tail command do?
Translates or deletes characters in a stream of data
Displays the last few lines of a file
Counts lines, words, and characters in a file or input stream
Displays the first few lines of a file
Why is the file command useful?
It ignores file extensions.
It determines file compression levels.
It prints detailed file status.
It is used for creating websites.
What is the drawback of a Full Backup?
It takes less time
It requires less storage space
It is time-consuming
It only copies modified data
What does a Differential Backup back up?
Everything on the system
Only modified data since the last full backup
Only modified data since the last incremental backup
Only system configurations
Which utility offers a higher compression rate and has options to adjust the compression rate?
gzip
bzip2
xz
zip
Which of the following is an example of metadata for a .mp3 file?
File size
Compression algorithm
Color profile
GPS coordinates
What is the primary function of the find command?
Transforming text streams
Searching for patterns within text files
Extracting specific sections from each line
Searching files and directories in a directory hierarchy
Which partition table is more modern and versatile, supporting larger capacities and better data integrity?
Master Boot Record (MBR)
Filesystem in Userspace (FUSE)
Redundant Array of Independent Disks (RAID)
GUID Partition Table (GPT)
Which command is used to list all Universal Serial Bus (USB) devices connected to the system?
lspci
dmidecode
lsusb
mkfs
Why is disk partitioning important in Linux systems?
To complicate the installation process
To allocate disk space inefficiently
To enhance system performance and manage files effectively
To create obstacles in system recovery
What utility is used to create, modify, or delete partitions on a storage drive in Linux?
parted
partprobe
mkfs
fdisk
Which command is used to update the kernel with changes in the partition table?
partprobe
mkfs
select
resizepart
Which command in Linux is used to format a partition with a specific file system?
What is a mount point in Linux?
A physical storage device
A logical connection between a directory and a filesystem
An entry in /var/log/messages
A file in the /etc/systemd/system directory
Which of the following statements BEST describes the purpose and requirement of a mount point in Linux?
Which command is used to grow an XFS file system, specifying a new size for the mount point?
xfs_info
xfs_growfs
xfs_expand
xfs_resize
Where can mount parameters for a device be found in Linux?
/var/log/messages
/etc/systemd/system directory
/etc/fstab
/etc/mount
What tool is used to grow the EXT4 filesystem?
mkfs
e2fsck
e2image
What does the xfs_admin command allow you to do with an XFS file system?
Grow the file system
Change parameters such as label and UUID
Copy the contents of the file system
Perform a consistency check
Which command is used to create logical volumes within a volume group in LVM?
lvresize
lvcreate
vgcreate
pvcreate
When adjusting the size of a logical volume in LVM, which command should be used?
lvextend
lvresize
lvchange
vgextend
Which protocol enables file sharing between systems on a network and is commonly used in Unix and Linux environments?
Network File System (NFS)
Server Message Block (SMB)
Common Internet File System (CIFS)
mdadm
Which command provides a user-friendly way to view and understand the storage layout of a Linux system.
What information does the blkid command retrieve about block devices in Linux?
Adapter status and link speed
Universally Unique Identifiers (UUIDs) and file system types
Device name, type, bus, and target
Error statistics for Fiber Channel connections
What is the impact of high latency in a storage system?
It limits the data transfer rate between the storage system and the components requesting data.
It increases the time taken for a storage system to respond to requests, leading to delays in data access and retrieval.
It reduces the number of read and write operations a storage device can perform per second.
It causes the exhaustion of inodes, preventing the creation of new files.
What do capacity issues in storage involve?
The exhaustion of inodes.
Running out of storage space on a storage device.
Problems within the structure of the filesystem.
Mismatched filesystem types or versions.
What could be a consequence of running out of storage space on a storage device?
High latency.
I/O wait.
Data loss, application crashes, or system instability.
Slow data transfers.
What are inodes in the context of storage?
The time it takes for a storage system to respond to a request.
Data structures that track files and directories.
The number of read and write operations a storage device can handle per second.
The limited data transfer rate between the storage system and requesting components.
What can happen if a file system is mounted as read-only but needs to be modified?
I/O errors.
Data loss.
Disk failures.
Issues when attempting to write or update files.
Which RAID Version involves mirroring 2 drives for redundancy?
Which RAID version will withstand the loss of more than one drive?
True or False? A deleted file in Linux still exists on the storage device.
True
False
Which firmware interface is the modern replacement for BIOS?
GRUB2
UEFI
mkinitrd
Dracut
Which command installs the GRUB2 bootloader to the system's boot sector or EFI system partition?
grub2-mkconfig
grub2-update
grub2-install
mkinitrd
What is the initial RAM disk image called?
vmlinuz
initrd.img
udev
initramfs
What does PXE stand for?
Power-On Self-Test
Preboot eXecution Environment
Portable X Environment
Postboot eXecution Engine
What is indicated by a kernel panic in an operating system?
An irrecoverable error within the operating system's kernel
Normal startup of the operating system
Standard hardware setup
Loading of the GRUB2 bootloader
Which device type is associated with serial ports, keyboards, and mice?
Block devices
Special character devices
Character devices
UEFI devices
What is a zombie process, and how can it affect system performance?
A process that consumes an excessive amount of system resources, causing performance degradation.
A process that has completed execution but still has an entry in the process table, consuming minimal resources.
A process waiting for I/O operations to complete, leading to system slowdown.
A process that is ready to run, indicating a high demand for CPU time.
What does high CPU utilization indicate, and what are some potential causes?
It indicates the average number of processes in the run queue over a specific time period. Causes include heavy system load and potential performance issues.
It indicates that the CPU is not actively executing any processes. Causes include system idleness and low demand.
It indicates the CPU consistently working at or near its maximum capacity, potentially leading to sluggish system performance. Causes include runaway processes, zombie processes, malware, and background processes.
It indicates the time the CPU spends waiting for I/O operations to complete. Causes include I/O bottlenecks and slow storage.
What is the purpose of the renice command?
To monitor and manage CPU time spent on user processes.
To dynamically adjust CPU priorities for running processes.
To identify and address runaway processes.
To troubleshoot interface errors in networking.
Why is it important to monitor and manage the CPU in a computer system?
To diagnose issues with SSL/TLS connections.
To resolve network interface errors.
To ensure system health, optimize performance, and pinpoint causes of instability.
To scan for open ports and detect remote services.
What are the consequences of having high run queues and elevated load averages on a system's performance?
They indicate optimal system performance and minimal system demand.
They point to possible I/O bottlenecks and slow storage performance.
They imply the system is experiencing heavy load, which may cause performance degradation and reduced responsiveness.
They show a queue of processes waiting for execution and high competition for CPU resources.
What is free memory in computing, and what can happen when it is exhausted?
The portion of RAM used to store recently accessed data, leading to improved system performance. Exhaustion results in file caching issues.
The portion of RAM currently not being used by any active processes. Exhaustion can lead to system slowdowns or instability.
The portion of RAM used to store frequently used files, application code, or parts of the operating system. Exhaustion can cause memory leaks.
The portion of RAM used for memory management by the operating system. Exhaustion results in out-of-memory (OOM) errors.
What is swapping in the context of CPU and memory management?
Swapping is a technique used to manage CPU priorities dynamically.
Swapping is the process of moving data between RAM and secondary storage devices when physical RAM is insufficient.
Swapping is a memory management technique used to optimize file caching.
Swapping is a tool for adjusting CPU priorities.
How does swapping help prevent out-of-memory (OOM) errors, and what is a potential drawback?
Swapping helps by preventing memory leaks. The drawback is decreased file cache efficiency.
Swapping helps by extending memory capacity using slower storage devices. The drawback is increased file cache consumption.
Swapping helps by optimizing CPU priorities. The drawback is decreased system responsiveness.
Swapping helps by moving data between RAM and secondary storage devices. The drawback is potential slowdowns and reduced overall system responsiveness, known as "thrashing."
What are lscpu and lsmen commands used for in Linux?
They are used for managing file cache and preventing memory exhaustion.
They are tools for adjusting CPU priorities dynamically.
lscpu displays detailed information about the CPU, and lsmen displays information about the system's RAM layout.
lscpu displays information about the system's RAM layout, and lsmen displays detailed information about the CPU.
Which package manager is used in Debian-based Linux distributions such as Debian, Ubuntu, and Kali?
YUM
APT
DNF
ZYpp
What is the low-level package management tool used primarily in Red Hat-based distributions for installing, querying, and managing individual RPM packages?
DNF
APT
RPM
dpkg
Which component of the OS is responsible for managing hardware resources and providing essential system services?
Package manager
Kernel
Runtime
Snap package
What are the typical steps involved in updating configuration files?
Open the file, make changes, and save.
Create a backup, locate the file, review existing settings, modify as needed, save changes, and restart the service.
Test the changes, monitor for issues, and create documentation.
All of the above.
In RPM-based systems, what extension is used for a backup of a configuration file when it is replaced by a new version?
.rpmbak
.rpmsave
.rpmold
.rpmorig
Which utility allows users to interact with Linux kernel runtime parameters?
sysctl
modprobe
insmod
lsmod
Where are kernel parameters set that persist across reboots?
/etc/kernel.conf
/etc/sysctl.conf
/etc/modules.d/
/etc/param.conf
What command provides information about a kernel module, including its description, dependencies, and parameters?
insmod
modprobe
modinfo
rmmod
Which protocol is primarily used to securely access a remote computer over a network?
SSH (Secure Shell)
FTP (File Transfer Protocol)
HTTP (Hypertext Transfer Protocol)
SMTP (Simple Mail Transfer Protocol)
Why is synchronizing system clocks using Network Time Protocol (NTP) essential?
For customizing SSH ports
For log storage configuration
For maintaining time consistency across a network
For managing key-based authentication
Which command-line utility allows for the configuration of a system clock and its settings in Linux?
sysctl
timedatectl
localectl
chronyctl
Where does the make install command typically install the software by default?
/usr/bin
/usr/local/bin
/opt/bin
/bin
Which SSH configuration file is responsible for server-side settings?
~/.ssh/known_hosts
/etc/ssh/ssh_config
/etc/ssh/sshd_config
~/.ssh/config
Which command is used for generating secure key pairs in SSH?
ssh-copy-id
ssh-add
ssh-keygen
ssh-config
What is the command to update repositories in Ubuntu Linux distributions?
Which systemctl command is used to restart a service?
systemctl start
systemctl enable
systemctl restart
systemctl status
Which systemctl command is used to enable a service to start automatically at boot time?
systemctl start
systemctl enable
systemctl mask
systemctl disable
What is cron used for in Unix-like operating systems?
Enabling and disabling services
Scheduling recurring tasks at fixed times, dates, or intervals
Managing system stability
Interacting with crontab files
What does the Sleeping process state indicate?
The process has completed its execution
The process is actively executing instructions
The process is in a state of dormancy, waiting for a specific event
The process is halted or suspended
What is the purpose of the pgrep command?
To list open files
To adjust process priorities
Search for processes based on their name or attributes
To send signals to processes based on their name
Which command obtains the process ID of a running program based on its name?
pidof
pkill
pls
pq
Which command within iproute2 is used to display or change the IPv4 and/or IPv6 address of a network interface?
ip link
ip address
ip route
ip rule
Which file contains configuration information for the Domain Name System (DNS) resolver, specifying DNS servers to be used and other resolver settings?
/etc/systemD.conf
/etc/hosts
/etc/nsswitch.conf
/etc/resolv.conf
Which utility, included in the Bind-utils package, is a command-line tool for querying DNS name servers and provides detailed information about DNS queries and responses?
nslookup
resolvectl
dig (Domain Information Groper)
host
Which command-line tool is commonly used for querying DNS servers for information about domain names and IP addresses and is helpful for troubleshooting DNS-related issues?
host
nslookup
dig
resolvectl
Which tool is a command-line packet analyzer used for capturing and displaying network traffic in real-time?
A. Wireshark
B. netstat
C. traceroute
D. tcpdump
What is the graphical user interface (GUI) network protocol analyzer?
A. tshark
B. traceroute
C. Wireshark
D. mtr
What is the primary function of the traceroute command in networking?
Determines the availability of a network host
Monitors and logs network traffic
Provides detailed network configuration information
Identifies the path packets take to reach a target host
Which command-line tool is used to test the reachability of a host on a network and measure round-trip time for packets?
tcpdump
netstat
ping
traceroute
What is the primary purpose of Secure Shell (SSH) when connecting to a remote server?
To view data being sent and received
To provide an unencrypted means for communication
To encrypt communication for secure data transfer
To resolve issues with network sniffers
Which command-line tool allows you to retrieve files from remote servers using FTP, FTPS, HTTP, or HTTPS protocols?
cURL
Netcat
rsync
wget
What is a key feature of cURL that makes it preferred for automation?
Supports only HTTP protocol
Requires user interaction for every transfer
Can transfer multiple files at once
Uses self-signed certificates for security
Which command is used in Linux systems to copy files between servers securely and uses the same authentication and security as SSH?
SFTP
rsync
netcat
scp
Which of the following adds security to FTP?
FTPS
SFTP
STP
FTSP
What is rsync commonly used for?
Managing user accounts
Text editing
Backups and remote file transfers
Network configuration
What is the primary purpose of the Nmap tool?
Scanning remote systems, identifying open ports, and detecting services.
Testing SSL/TLS connections.
Troubleshooting interface errors.
Allocating bandwidth based on organizational priorities.
What problem might occur if DNS servers are down or unreachable?
Incorrect IP address assignments.
Issues with communication due to unresolved domain names.
Network congestion.
Expired security certificates.
What can high latency in a network result in?
Slow upload or download speeds.
VLAN misconfigurations.
Reduced overall network performance and slower response times.
Communication failures due to inaccurate DNS configurations.
What is the purpose of testing remote systems using Nmap and openssl s_client?
Troubleshooting name resolution issues.
Identifying open ports and detecting services.
Resolving subnetting problems.
Troubleshooting interface errors.
What is the purpose of the hostnamectl command in systemd?
Querying and changing the system hostname and related settings
Configuring DNS resolver settings
Querying DNS resource records
Troubleshooting DNS-related issues
Which command is used to create a new user group on a Linux system?
sudo useradd
sudo groupadd
sudo userdel
sudo groupdel
What command is used to check if a user is currently logged in?
id
who
uname
w
How can a user account be deleted, including its home directory?
sudo userdel -r username
sudo userdel username
sudo userdel -h username
sudo userremove -r username
Which command is used to set a password for a user account in Linux?
sudo passwd -u username
sudo userpasswd username
sudo passset username
sudo usermod -p password username
Where is account information stored for each user in Linux, including the username, user ID, group ID, and home directory?
/etc/profile
/etc/passwd
/etc/shadow
/etc/skel
Which file contains securely stored credential information, including salted and hashed passwords?
/etc/profile
/etc/passwd
/etc/shadow
/etc/skel
What file sets the global environment variables and paths common to all users' login sessions in Linux?
/etc/passwd
/etc/profile
/etc/skel
/etc/shadow
Which command allows a user to switch to a different user and execute a command as that user?
sudo
su -
pkexec
visudo
Which command is used to open and edit the "sudoers" file?
visudo
sudoedit
nano /etc/sudoers
editsudoers
What are some typical challenges Linux users face during the login process?
Account lockouts due to multiple failed login attempts
How can you view a user's password information, including expiration date, in Linux?
Which file is executed upon login to in Linux to customize the behavior and environment of the Bash shell for a specific user?
Why is logging in as root on a Linux system a security threat?
Root grants unrestricted access to the entire system, increasing the risk of exploitation and damage.
What is the primary purpose of a public key in PKI?
Decrypting data
Creating digital signatures
Encrypting data
Randomizing wildcards
Which component of a cryptographic key pair is used for decrypting data?
Public key
Private key
Self-signed certificate
Digital signature
What is a self-signed certificate?
A certificate signed by a Certificate Authority (CA).
A certificate used for encryption purposes only
A certificate signed by the entity that creates it
A certificate suitable for public-facing websites
What is the primary purpose of tokens in authentication?
Managing directory information
Providing centralized authentication
Adding an additional layer of security by requiring something the user possesses
Customizing authentication processes
How does multi-factor authentication (MFA) enhance security?
By requiring only a password
By requiring users to provide multiple forms of identification
By using smart cards for authentication
By centralizing user authentication
What is the primary purpose of Single Sign-On (SSO) authentication?
Requiring users to provide multiple forms of identification
Centralizing user authentication
Customizing authentication processes
Streamlining user access to multiple applications without re-entering credentials
What is the primary purpose of Secure Boot in UEFI firmware?
Improving boot times
Preventing unauthorized access attempts
Loading only immutable and signed software
Enforcing password strength
What type of firmware interface is used in modern computers to replace the traditional BIOS?
firewalld
UEFI
PAM
Lynis
What is the primary purpose of system logs in Linux?
Enforcing password strength
Performing basic checks
Monitoring and detecting security issues
Setting default umask
In Linux access control, what is the purpose of the "Other" category?
It refers to the system administrator
It contains permissions for any user that is not the owner or in the assigned user group
It defines access for the root user
It represents a special category for system processes
What command is used to view the assigned rights of files and directories in Linux?
showpermissions
accesscontrol
ls -l
chmod
What is the correct order of the permissions triplet in the octal format for a file in Linux?
Group, Owner, Other
Other, Group, Owner
Owner, Group, Other
Other, Owner, Group
Which command is used to change the owner of a file in Linux?
chgrp
chmod
chown
chuser
How is the value "4" represented in the octal permissions triplet?
rw-
r--
r-x
-w-
What does the command chmod 744 example.txt do?
Gives execute permission to the owner, read and write to the group, and read-only to others
Gives all permissions to the owner, read-only to the group and others
Gives read, write, and execute permissions to the owner, read-only to the group and others
Gives read and write permissions to the owner, read-only to the group and others
What does stateful inspection mean in the context of firewalls?
Filtering packets based solely on static criteria
Keeping track of the state of active connections
Blocking specific applications or protocols
Categorizing rules based on services
What is a common cause of name resolution failures on Linux systems?
What can lead to an application crash on a Linux system?
Cleared log files
Resource exhaustion
Which command can be used to set the correct time and time zone on a Linux system?
What is a common cause of journal issues on Linux systems?
Insufficient disk space
What command is used to display the user manual of any command in Linux?
info
doc
man
help
Which command lists files and directories in the current directory?
list
show
dir
ls
Which command is used to create a new directory?
createdir
makedir
newdir
mkdir
What does the 'cd' command do?
Delete directory.
Copy directory.
Create directory.
Change directory.
Which command is used to remove files in Linux?
delete
erase
rm
remove
Which command is used to change the owner of a file?
chown
useradd
usermod
chmod
What does the 'tar' command do?
Compresses files.
Deletes files.
Creates and extracts archive files.
Moves files.
Which command is used to display the current working directory?
cd
ls
dir
pwd
What does the 'top' command display?
System processes and resource usage.
Disk usage.
File permissions.
User accounts.
