1.
What's the difference between hard disk drives and solid-state drives?
Correct Answer(s)
A. Hard disks have moving parts and solid state drives do not.
C. Solid state drives are faster than hard disk drives
Explanation
The correct answer is that hard disks have moving parts and solid-state drives do not, and that solid-state drives are faster than hard disk drives. This is because hard disks use spinning magnetic disks and mechanical read/write heads to store and retrieve data, which introduces latency and limits their speed. On the other hand, solid-state drives use flash memory chips to store data, which allows for much faster read and write speeds. Additionally, the absence of moving parts in solid-state drives makes them more durable and less prone to mechanical failures compared to hard disk drives.
2.
How is the name for the IP 192.168.2.1 stored on a DNS server when using reverse DNS lookup?
Correct Answer
C. In the PTR record for 1.2.168.192.in-addr.arpa
Explanation
The name for the IP 192.168.2.1 is stored in the PTR record for 1.2.168.192.in-addr.arpa.
3.
Which of the following connects a hard drive to the motherboard?
Correct Answer
A. SATA
Explanation
SATA (Serial Advanced Technology Attachment) is the correct answer as it is the interface that connects a hard drive to the motherboard. SATA is a standard interface used for connecting storage devices like hard drives and solid-state drives to the computer's motherboard. It provides a high-speed data transfer rate and is widely used in modern computers for connecting storage devices. RAM (Random Access Memory) is a type of computer memory, CPU (Central Processing Unit) is the main processing unit of a computer, and NUMA (Non-Uniform Memory Access) is a computer architecture design.
4.
You work for a company that wants to transition all of their servers to Red Hat Enterprise. You have no prior experience using Red Hat and you cannot afford a license. You need a free alternative to learn the new system. What version of Linux could you install?
Correct Answer
A. CentOS
Explanation
CentOS is the correct answer because it is a free and open-source operating system that is based on the same source code as Red Hat Enterprise Linux (RHEL). It provides a similar environment to RHEL, making it an ideal choice for learning and transitioning to Red Hat Enterprise.
5.
What command can I use to display running processes order by CPU and RAM consumption?
Correct Answer
top
Explanation
top
6.
The host command can be used to resolve a DNS name to an IP address.
Correct Answer
A. True
Explanation
The host command is a utility in computer networking that is used to perform DNS lookups. It allows users to resolve a domain name to its corresponding IP address. By entering a DNS name as an argument, the host command retrieves and displays the associated IP address. Therefore, the statement "The host command can be used to resolve a DNS name to an IP address" is true.
7.
What command will display the following output?
Correct Answer
D. Free
Explanation
The "free" command is used to display the amount of free and used memory in the system. It provides information about the total, used, and free memory, as well as the memory used by buffers and cache. Therefore, running the "free" command will display the output mentioned in the question.
8.
What two things are true about the dmesg command?
Correct Answer(s)
A. It displays the Linux kernel's ring buffer
C. Old information gets replaced by new information
Explanation
The dmesg command is used to display the Linux kernel's ring buffer, which contains information about the system's hardware, device drivers, and kernel events. This allows users to view messages related to the system's operation and troubleshoot any issues. Additionally, the ring buffer is a fixed-size buffer, meaning that when it becomes full, old information is replaced by new information to ensure the buffer does not overflow.
9.
What command will display the following output?
Correct Answer
A. Last
Explanation
The "last" command will display the output mentioned.
10.
A user's UID is 0. What type of user is this?
Correct Answer
C. Root
Explanation
A user with a UID of 0 is typically referred to as the "root" user. The root user has the highest level of administrative privileges on a system and has unrestricted access to all files and commands. This user is often used for system administration tasks and can make changes that affect the entire system.
11.
You want to change permissions on a regular file to -rw-r-xr--. What command will you use?
Correct Answer
B. Chmod 654
Explanation
The correct answer is "chmod 654". The chmod command is used to change the permissions of a file or directory. In this case, the permissions are being changed to -rw-r-xr--, which corresponds to the numeric value 654. Therefore, the command "chmod 654" is the correct choice to change the permissions to the desired value.
12.
Every file can be owned by only one user and group.
Correct Answer
A. True
Explanation
This statement is true because in most operating systems, including Unix-based systems, each file is associated with a single owner and group. The owner is usually the user who created the file, and the group is a collection of users who have certain permissions to access and modify the file. This ownership system helps in managing file permissions and ensuring proper access control.
13.
What are the default permissions on the /tmp/ directory?
Correct Answer
D. Rwxrwxrwxt
Explanation
The correct answer is "rwxrwxrwxt". In Linux, the permissions on the /tmp/ directory are typically set to "rwxrwxrwxt". The "rwx" indicates that the owner of the directory has read, write, and execute permissions. The "rwx" after the first dash indicates that the group has the same permissions. The "rw-" after the second dash indicates that other users have read and write permissions. The "t" at the end of the permissions indicates that the sticky bit is set, which means that only the owner of a file can delete or rename it within the /tmp/ directory.
14.
You want to create a new user with default configuration files. What command would you use?
Correct Answer
A. Useradd -m username
Explanation
The correct answer is "useradd -m username". This command is used to create a new user with default configuration files. The "-m" option ensures that the user's home directory is created with default files. By specifying the username after the command, a new user with the given username will be created.
15.
In what directory will you find the UID, username, and encrypted password?
Correct Answer
/etc/passwd, /etc/shadow
Explanation
/etc/passwd- This file contains the username, UID, and other details about each user account on the system. Originally, it also contained the encrypted password, but for security reasons, this practice has largely been phased out in favor of storing encrypted passwords in a separate file.
/etc/shadow- This file stores the encrypted passwords for the users in a system, along with other information related to account expiration and password aging. This file is not accessible to regular users, as it contains sensitive information.
16.
You need to do compression with the tar command. What option will allow you to handle compression?
Correct Answer
A. -jz
Explanation
The option "-jz" is the correct answer because it enables compression when using the tar command. The "-j" flag is used to specify the compression method as bzip2, and the "-z" flag is used for gzip compression. By combining these two flags, the tar command will compress the files or directories being archived.
17.
You need to create a loop in a shell script. What argument will allow this?
Correct Answer
D. For
Explanation
The "for" argument is used to create a loop in a shell script. It allows you to iterate over a set of values or elements and perform a series of commands or actions for each iteration. By using the "for" loop, you can automate repetitive tasks and process multiple items efficiently in a shell script.
18.
You want to create an archive file work.tar from the contents of the ./work/ directory. Type in the complete command to do so.
Correct Answer
tar -cf work.tar ./work/
Explanation
tar -cf work.tar ./work/
19.
What will the q key do on a less page?
Correct Answer
C. Exit
Explanation
The "q" key on a less page is used to exit or quit the less program. When the user presses the "q" key, it will close the less page and return to the command prompt or the previous program that was running.
20.
You need to run a shell script named elog.sh in the root directory. What two commands could be used to execute the shell script?
Correct Answer(s)
C. Bash elog.sh
D. ./elog.sh
Explanation
The two commands that could be used to execute the shell script are "bash elog.sh" and "./elog.sh". The "bash elog.sh" command specifies the shell interpreter (bash) to execute the script (elog.sh). The "./elog.sh" command executes the script directly by specifying its relative path (./) from the current directory.
21.
Type the script to sort the output of the cat command?
Correct Answer(s)
cat | sort
Explanation
cat | sort
22.
Which command will search for the file tux.txt under the /home directory?
Correct Answer
A. Find /home -name tux.txt
Explanation
The correct answer is "find /home -name tux.txt". This command uses the "find" command to search for a file named "tux.txt" under the "/home" directory. The "-name" option is used to specify the name of the file being searched for.
23.
You try to run a shell script, and the CLI says permission denied. What is the problem?
Correct Answer
D. The execute bit is turned off in the permissions.
Explanation
The problem is that the execute bit is turned off in the permissions. This means that the user does not have the necessary permission to execute the shell script. To fix this, the user needs to change the permissions of the script to allow execution.
24.
What is a Linux flavor?
Correct Answer
A. Bundle of the Linux kernel with specific utilities and other productivity software.
Explanation
A Linux flavor refers to a bundle of the Linux kernel with specific utilities and other productivity software. This means that it is a specific version or variant of Linux that includes additional software and tools beyond just the kernel. This allows users to have a complete and functional operating system with all the necessary tools and applications for their specific needs.
25.
The Raspberry Pi's operating system is stored on rewritable flash storage built into the system.
Correct Answer
B. False
Explanation
It is stored on a removable SD card.
26.
Who determines the conditions for modifying and distributing licensed software?
Correct Answer
D. Free Software Foundation
Explanation
The Free Software Foundation determines the conditions for modifying and distributing licensed software. They are a nonprofit organization that advocates for the freedom to use, study, modify, and distribute software. They have created the GNU General Public License (GPL), which is a widely used free software license that sets out the conditions for distributing and modifying software. The Free Software Foundation's goal is to promote and protect software freedom, ensuring that users have the freedom to control and adapt the software they use.
27.
Why are people apprehensive about cookies?
Correct Answer
A. It allows sites to track user identity and locations.
Explanation
People are apprehensive about cookies because they allow sites to track user identity and locations. This tracking can raise concerns about privacy and security, as users may not want their online activities to be monitored and their personal information to be collected without their consent. Additionally, the ability to track user locations can be seen as an invasion of privacy, as it allows websites to gather information about the physical whereabouts of individuals. Therefore, the ability of cookies to enable tracking is a valid reason for people to be apprehensive about them.
28.
What are the three basic cloud services?
Correct Answer(s)
A. Platform as a Service
C. Infrastructure as a Service
E. Software as a Service
Explanation
The three basic cloud services are Platform as a Service (PaaS), Infrastructure as a Service (IaaS), and Software as a Service (SaaS). PaaS provides a platform for developers to build, test, and deploy applications without worrying about infrastructure management. IaaS offers virtualized computing resources such as servers, storage, and networking, allowing users to manage and control their own applications and data. SaaS delivers software applications over the internet on a subscription basis, eliminating the need for users to install and maintain software on their own devices. These three services offer different levels of abstraction and functionality to meet various cloud computing needs.
29.
What character indicates that you are running a shell with root privileges?
Correct Answer(s)
#
Explanation
#
30.
What two commands will give you more information about the ls command?
Correct Answer(s)
B. Man ls
C. Info ls
Explanation
The correct answer is "man ls, info ls". The "man" command is used to display the manual pages for a specific command, providing detailed information about its usage, options, and examples. The "info" command is similar to "man" but provides a more extensive and structured documentation system. Both commands would give more information about the "ls" command, which is used to list the files and directories in a directory.
31.
What two commands could remove an empty directory?
Correct Answer(s)
A. Rm -r directoryname
E. Rmdir directoryname
Explanation
The two commands that could remove an empty directory are "rm -r directoryname" and "rmdir directoryname". The "rm -r directoryname" command removes a directory and its contents recursively, while the "rmdir directoryname" command removes an empty directory.
32.
Which directory contains information and documentation for installed programs?
Correct Answer
C. /usr/share/doc/
Explanation
The directory /usr/share/doc/ contains information and documentation for installed programs. This directory is commonly used to store documentation files, such as user manuals, README files, and changelogs, that provide information about the installed programs. It is a standard location for program documentation in many Linux distributions.
33.
You want to add the /usr/libc directory to the SAFE variable. What command will accomplish this?
Correct Answer
D. Export SAFE=/usr/libc: $SAFE
Explanation
The correct answer is "export SAFE=/usr/libc: $SAFE". This command sets the value of the SAFE variable to "/usr/libc" and exports it so that it is available to other processes. The ": $SAFE" part appends the previous value of the SAFE variable to the new value, ensuring that the existing value is not overwritten.
34.
You are in the /home/user/Pictures/ directory of your user account. What command will display the contents of the /home/user/Documents/ directory?
Correct Answer
A. Ls ../Documents/
Explanation
The command "ls ../Documents/" will display the contents of the /home/user/Documents/ directory. The ".." in the command represents the parent directory, so by using it before "/Documents/", we are navigating to the parent directory of the current directory (/home/user/Pictures/) and then accessing the Documents directory within it.
35.
What command will copy all files ending in .odt to the /tmp/ directory?
Correct Answer
cp *.odt /tmp/
Explanation
cp *.odt /tmp/
36.
What character can split a long command across multiple lines?
Correct Answer
B. \
Explanation
The backslash character "\" can be used to split a long command across multiple lines. When a backslash is placed at the end of a line, it indicates that the command continues on the next line. This is useful for improving readability and organizing complex commands.
37.
Recursive directory listings include information within sub-directories.
Correct Answer
A. True
Explanation
Recursive directory listings include information within sub-directories because when a directory is listed recursively, it means that not only the files and folders in the current directory are listed, but also the contents of any sub-directories within that directory are included. This allows for a comprehensive view of all the files and folders within a directory and its sub-directories.