Linux Essentials Practice Exam Quiz!

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Gerald Washington
G
Gerald Washington
Community Contributor
Quizzes Created: 1 | Total Attempts: 1,375
Questions: 40 | Attempts: 1,379

SettingsSettingsSettings
Linux Essentials Practice Exam Quiz! - Quiz

.


Questions and Answers
  • 1. 

    What's the difference between hard disk drives and solid-state drives?

    • A.

      Hard disks have moving parts and solid state drives do not.

    • B.

      Hard disk drives can fail. Solid state drives cannot.

    • C.

      Solid state drives are faster than hard disk drives

    • D.

      Solid state drives have larger storage capacity and are less expensive than hard disk 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.

    Rate this question:

  • 2. 

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

    • A.

      In the REV record for arpa.in-addr.192.168.2.1

    • B.

      In the RNAME record for 192-168-2-1.rev.arpa

    • C.

      In the PTR record for 1.2.168.192.in-addr.arpa

    • D.

      In the A record for 1.2.168.192.ipv4.arpa

    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.

    Rate this question:

  • 3. 

    Which of the following connects a hard drive to the motherboard?

    • A.

      SATA

    • B.

      RAM

    • C.

      CPU

    • D.

      NUMA

    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.

    Rate this question:

  • 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?

    • A.

      CentOS

    • B.

      Ubuntu LTS

    • C.

      OpenSUSE

    • D.

      Debian GNU

    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.

    Rate this question:

  • 5. 

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

    Correct Answer
    top
    Explanation
    top

    Rate this question:

  • 6. 

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

    • A.

      True

    • B.

      False

    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.

    Rate this question:

  • 7. 

    What command will display the following output?

    • A.

      Ls

    • B.

      Ln

    • C.

      Top

    • D.

      Free

    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.

    Rate this question:

  • 8. 

    What two things are true about the dmesg command?

    • A.

      It displays the Linux kernel's ring buffer

    • B.

      It'll send messages to other users logged into the system

    • C.

      Old information gets replaced by new information

    • D.

      It will open an email client to send messages to other users across a network

    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.

    Rate this question:

  • 9. 

    What command will display the following output?

    • A.

      Last

    • B.

      Pwd

    • C.

      Passwd

    • D.

      Whoami

    Correct Answer
    A. Last
    Explanation
    The "last" command will display the output mentioned.

    Rate this question:

  • 10. 

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

    • A.

      Standard

    • B.

      Guest

    • C.

      Root

    • D.

      Superuser

    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.

    Rate this question:

  • 11. 

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

    • A.

      Chown 654

    • B.

      Chmod 654

    • C.

      Ls -l

    • D.

      Chmod 555

    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.

    Rate this question:

  • 12. 

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

    • A.

      True

    • B.

      False

    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.

    Rate this question:

  • 13. 

    What are the default permissions on the /tmp/ directory?

    • A.

      Rwx------

    • B.

      Rwxrwxrw-

    • C.

      Rx-rx-rx-

    • D.

      Rwxrwxrwxt

    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.

    Rate this question:

  • 14. 

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

    • A.

      Useradd -m username

    • B.

      Passwd -a username

    • C.

      Useradd -o default username

    • D.

      Lsuser username

    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.

    Rate this question:

  • 15. 

    In what directory will you find the UID, username, and encrypted password?

    Correct Answer
    /etc/passwd
    Explanation
    /etc/passwd

    Rate this question:

  • 16. 

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

    • A.

      -jz

    • B.

      -g

    • C.

      -c

    • D.

      -bz

    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.

    Rate this question:

  • 17. 

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

    • A.

      Do

    • B.

      If

    • C.

      Then

    • D.

      For

    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.

    Rate this question:

  • 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/

    Rate this question:

  • 19. 

    What will the q key do on a less page?

    • A.

      Next page

    • B.

      Previous page

    • C.

      Exit

    • D.

      Go to the end

    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.

    Rate this question:

  • 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?

    • A.

      Cmd ./elog.sh

    • B.

      Exe ./elog.sh

    • C.

      Bash elog.sh

    • D.

      ./elog.sh

    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.

    Rate this question:

  • 21. 

    Type the script to sort the output of the cat command?

    Correct Answer(s)
    cat | sort
    Explanation
    cat | sort

    Rate this question:

  • 22. 

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

    • A.

      Find /home -name tux.txt

    • B.

      Search /home -name tux.txt

    • C.

      Find /home tux.txt

    • D.

      Search /home tux.txt

    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.

    Rate this question:

  • 23. 

    You try to run a shell script, and the CLI says permission denied. What is the problem?

    • A.

      The shell script is invalid.

    • B.

      The script is too long.

    • C.

      Check the file's extension.

    • D.

      The execute bit is turned off in the permissions.

    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.

    Rate this question:

  • 24. 

    What is a Linux flavor?

    • A.

      Bundle of the Linux kernel with specific utilities and other productivity software.

    • B.

      How the CPU "tastes" Linux when it is installed.

    • C.

      It tells how that specific version of Linux should be distributed.

    • D.

      The compatibility factor of a Linux distribution with certain hardware.

    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.

    Rate this question:

  • 25. 

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

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    It is stored on a removable SD card.

    Rate this question:

  • 26. 

    Who determines the conditions for modifying and distributing licensed software?

    • A.

      GNU Project

    • B.

      Open Source Initiative

    • C.

      Tarballs Incorporated

    • D.

      Free Software Foundation

    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.

    Rate this question:

  • 27. 

    Why are people apprehensive about cookies?

    • A.

      It allows sites to track user identity and locations.

    • B.

      They are too delicious and you cannot eat just one.

    • C.

      They contain important data that is lost when the cookie is deleted.

    • D.

      Cookies are public and accessible to anyone on the Internet.

    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.

    Rate this question:

  • 28. 

    What are the three basic cloud services?

    • A.

      Platform as a Service

    • B.

      Communication as a Service

    • C.

      Infrastructure as a Service

    • D.

      Security as a Service

    • E.

      Software as a Service

    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.

    Rate this question:

  • 29. 

    What character indicates that you are running a shell with root privileges?

    Correct Answer(s)
    #
    Explanation
    #

    Rate this question:

  • 30. 

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

    • A.

      More ls

    • B.

      Man ls

    • C.

      Info ls

    • D.

      History ls

    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.

    Rate this question:

  • 31. 

    What two commands could remove an empty directory?

    • A.

      Rm -r directoryname

    • B.

      Rm directoryname

    • C.

      Rd directoryname

    • D.

      Rem directoryname

    • E.

      Rmdir directoryname

    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.

    Rate this question:

  • 32. 

    Which directory contains information and documentation for installed programs?

    • A.

      /doc/

    • B.

      /usr/examples/

    • C.

      /usr/share/doc/

    • D.

      /etc/defaults/

    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.

    Rate this question:

  • 33. 

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

    • A.

      SAFE=/usr/libc: $SAFE

    • B.

      Export SAFE=/usr/libc: SAFE

    • C.

      $SAFE=/usr/libc: SAFE

    • D.

      Export SAFE=/usr/libc: $SAFE

    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.

    Rate this question:

  • 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?

    • A.

      Ls ../Documents/

    • B.

      Ls /Documents

    • C.

      Ls /home/user/Pictures/Documents

    • D.

      Ls ../documents/

    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.

    Rate this question:

  • 35. 

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

    Correct Answer
    cp *.odt /tmp/
    Explanation
    cp *.odt /tmp/

    Rate this question:

  • 36. 

    What character can split a long command across multiple lines?

    • A.

      /

    • B.

      \

    • C.

      #

    • D.

      !

    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.

    Rate this question:

  • 37. 

    Recursive directory listings include information within sub-directories.

    • A.

      True

    • B.

      False

    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.

    Rate this question:

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.