Linux Essentials Practice Exam Quiz!

  • CompTIA Linux+
  • LPI Linux Essentials
Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Gerald Washington
G
Gerald Washington
Community Contributor
Quizzes Created: 1 | Total Attempts: 2,342
| Attempts: 2,342 | Questions: 40
Please wait...
Question 1 / 40
0 %
0/100
Score 0/100
1. Recursive directory listings include information within sub-directories.

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.

Submit
Please wait...
About This Quiz
Linux Essentials Practice Exam Quiz! - Quiz

This Linux Essentials Practice Exam Quiz assesses knowledge on key system administration topics like storage types, DNS configurations, and command-line tools. It's ideal for those preparing for certifications or transitioning to Linux-based systems.

2. What will the q key do on a less page?

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.

Submit
3. Match the following.
Submit
4. You try to run a shell script, and the CLI says permission denied. What is the problem?

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.

Submit
5. Which of the following connects a hard drive to the motherboard?

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.

Submit
6. A user's UID is 0. What type of user is this?

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.

Submit
7. Why are people apprehensive about cookies?

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.

Submit
8. The host command can be used to resolve a DNS name to an IP address.

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.

Submit
9. What is a Linux flavor?

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.

Submit
10. What command will display the following output?

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.

Submit
11. You want to change permissions on a regular file to -rw-r-xr--. What command will you use?

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.

Submit
12. What are the three basic cloud services?

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.

Submit
13. What two commands will give you more information about the ls command?

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.

Submit
14. 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?

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.

Submit
15. You want to create a new user with default configuration files. What command would you use?

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.

Submit
16. What's the difference between hard disk drives and solid-state 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.

Submit
17. You need to create a loop in a shell script. What argument will allow this?

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.

Submit
18. Which command will search for the file tux.txt under the /home directory?

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.

Submit
19. What command will display the following output?

Explanation

The "last" command will display the output mentioned.

Submit
20. What command can I use to display running processes order by CPU and RAM consumption?

Explanation

top

Submit
21. What character can split a long command across multiple lines?

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.

Submit
22. Which directory contains information and documentation for installed programs?

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.

Submit
23. 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?

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.

Submit
24. What two things are true about the dmesg command?

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.

Submit
25. Match the following.
Submit
26. What character indicates that you are running a shell with root privileges?

Explanation

#

Submit
27. Every file can be owned by only one user and group.

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.

Submit
28. What two commands could remove an empty directory?

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.

Submit
29. You are in the /home/user/Pictures/ directory of your user account. What command will display the contents of the /home/user/Documents/ directory?

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.

Submit
30. What are the default permissions on the /tmp/ directory?

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.

Submit
31. How is the name for the IP 192.168.2.1 stored on a DNS server when using reverse DNS lookup?

Explanation

The name for the IP 192.168.2.1 is stored in the PTR record for 1.2.168.192.in-addr.arpa.

Submit
32. The Raspberry Pi's operating system is stored on rewritable flash storage built into the system.

Explanation

It is stored on a removable SD card.

Submit
33. Who determines the conditions for modifying and distributing licensed software?

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.

Submit
34. You want to add the /usr/libc directory to the SAFE variable. What command will accomplish this?

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.

Submit
35. You need to do compression with the tar command. What option will allow you to handle compression?

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.

Submit
36. Type the script to sort the output of the cat command?

Explanation

cat | sort

Submit
37. What command will copy all files ending in .odt to the /tmp/ directory?

Explanation

cp *.odt /tmp/

Submit
38. Match the following ports and protocols
Submit
39. In what directory will you find the UID, username, and encrypted password?

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.

Submit
40. You want to create an archive file work.tar from the contents of the ./work/ directory. Type in the complete command to do so.

Explanation

tar -cf work.tar ./work/

Submit
View My Results

Quiz Review Timeline (Updated): Sep 16, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Sep 16, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 23, 2019
    Quiz Created by
    Gerald Washington
Cancel
  • All
    All (40)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Recursive directory listings include information within...
What will the q key do on a less page?
Match the following.
You try to run a shell script, and the CLI says permission denied....
Which of the following connects a hard drive to the motherboard?
A user's UID is 0. What type of user is this?
Why are people apprehensive about cookies?
The host command can be used to resolve a DNS name to an IP address.
What is a Linux flavor?
What command will display the following output?
You want to change permissions on a regular file to -rw-r-xr--. What...
What are the three basic cloud services?
What two commands will give you more information about the ls command?
You work for a company that wants to transition all of their servers...
You want to create a new user with default configuration files. What...
What's the difference between hard disk drives and solid-state...
You need to create a loop in a shell script. What argument will allow...
Which command will search for the file tux.txt under the /home...
What command will display the following output?
What command can I use to display running processes order by CPU and...
What character can split a long command across multiple lines?
Which directory contains information and documentation for installed...
You need to run a shell script named elog.sh in the root directory....
What two things are true about the dmesg command?
Match the following.
What character indicates that you are running a shell with root...
Every file can be owned by only one user and group.
What two commands could remove an empty directory?
You are in the /home/user/Pictures/ directory of your user account....
What are the default permissions on the /tmp/ directory?
How is the name for the IP 192.168.2.1 stored on a DNS server when...
The Raspberry Pi's operating system is stored on rewritable flash...
Who determines the conditions for modifying and distributing licensed...
You want to add the /usr/libc directory to the SAFE variable. What...
You need to do compression with the tar command. What option will...
Type the script to sort the output of the cat command?
What command will copy all files ending in .odt to the /tmp/...
Match the following ports and protocols
In what directory will you find the UID, username, and encrypted...
You want to create an archive file work.tar from the contents of the...
Alert!

Advertisement