Linux Essentials Certification Exam Practice Test!

Reviewed by Godwin Iheuwa
Godwin Iheuwa, MS (Computer Science) |
Database Administrator
Review Board Member
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.
, MS (Computer Science)
By Gdeisat
G
Gdeisat
Community Contributor
Quizzes Created: 7 | Total Attempts: 116,238
| Attempts: 111,071 | Questions: 80
Please wait...
Question 1 / 80
0 %
0/100
Score 0/100
1. Which of the following can be used to access the command line?

Explanation

Terminal is the correct answer because it is a command line interface that allows users to interact with the operating system by typing commands. It provides a text-based environment where users can execute commands, run scripts, and navigate through directories. Unlike graphical user interfaces like XWindow or Firefox, the terminal provides direct access to the command line, making it a powerful tool for advanced users and system administrators. BIOS and Xargs are not used to access the command line, as BIOS is responsible for booting the computer and Xargs is a command used to build and execute command lines from standard input.

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

Those beginning their Linux careers may find the Linux Essentials certification an excellent place to start before jumping into the more advanced LPIC certifications. Linux Essentials cover necessary... see moreskills, such as command-line editing and the Linux operating system. This quiz will give you a chance to revise for the exam. All the best!
see less

2. Which of the following commands can be used to create a file?

Explanation

The correct answer is touch. The touch command is commonly used in Unix and Linux operating systems to create an empty file. It can also be used to update the access and modification timestamps of an existing file. The other options, build, nico, create, and mkfile, are not valid commands for creating a file.

Submit
3. What is the number called that is used to identify a process?

Explanation

The number used to identify a process is called PID, which stands for Process ID. A PID is a unique numerical identifier assigned to each running process in a computer system. It allows the operating system to keep track of and manage different processes effectively. By using PIDs, the operating system can identify and control individual processes, allocate system resources, and handle process-related activities such as scheduling, termination, and communication.

Submit
4. Which function does a shell program serve?

Explanation

A shell program serves the function of receiving user commands and executing them. It acts as an interface between the user and the operating system, allowing users to interact with the computer by entering commands. The shell program interprets these commands and executes them, performing various tasks such as running programs, managing files, and controlling system resources. It provides a command-line interface where users can enter commands and receive output or perform actions based on those commands.

Submit
5. Which of the following is a Linux-based operating system for use on mobile devices?

Explanation

Android is a Linux-based operating system for use on mobile devices. It was developed by Google and is widely used on smartphones, tablets, and other mobile devices. Android provides a user-friendly interface, supports a wide range of applications, and allows for customization and flexibility. It is known for its open-source nature, which allows developers to modify and enhance the operating system according to their needs.

Submit
6. Which Linux distribution is used as a basis for the creation of Ubuntu Linux?

Explanation

Ubuntu Linux is based on Debian Linux, a popular and stable Linux distribution known for its extensive software repositories and strong community support. Ubuntu builds upon Debian's foundation, adding its own user-friendly interface, software packages, and release cycle. This relationship allows Ubuntu to benefit from Debian's stability and security while providing a more accessible and streamlined experience for users.

Submit
7. Where is the BIOS located?

Explanation

The BIOS (Basic Input/Output System) is located on the motherboard. It is a firmware that is responsible for initializing and configuring the hardware components of a computer during the boot process. The BIOS contains instructions and settings that allow the computer to start up and communicate with the operating system. It is stored in a chip on the motherboard, separate from other components like RAM, hard drive, or the LCD monitor.

Submit
8. Which command would you use to get comprehensive documentation about any command in Linux?

Explanation

The "man" command is used to get comprehensive documentation about any command in Linux. It displays the manual pages for the specified command, providing detailed information on its usage, options, and examples. This is a commonly used command by Linux users to quickly access documentation and understand how to use various commands effectively.

Submit
9. Which of the following commands can be used to extract content from  a tar file?

Explanation

The command "tar -xvf" can be used to extract content from a tar file. The "x" flag stands for extract, the "v" flag stands for verbose (displaying the progress and details of the extraction), and the "f" flag is used to specify the file name. This command will extract the contents of the tar file to the current directory.

Submit
10. Which of the following commands can be used to extract files from an archive?

Explanation

The correct answer is "tar -xvf" because the "-x" option is used to extract files from an archive, the "-v" option is used to display verbose output, and the "-f" option is used to specify the archive file. Therefore, "tar -xvf" is the correct command to extract files from an archive.

Submit
11. Which of the following is NOT a core component of the Linux operating system kernel?

Explanation

While a GUI is often part of a Linux distribution, it's not part of the kernel itself. The kernel handles fundamental tasks like managing the system's resources, scheduling processes, and providing an interface for programs to interact with the hardware. GUIs like GNOME or KDE are separate software components that run on top of the kernel.

Submit
12. Which of the following commands will display a list of all files in the current directory, including  those that may be hidden?

Explanation

The correct answer is "ls -a". The "-a" option in the "ls" command stands for "all" and it displays all files, including hidden files, in the current directory.

Submit
13. Which of the following is a combined audio/video interface for the transmission of digital data?

Explanation

HDMI (High-Definition Multimedia Interface) is a combined audio/video interface for the transmission of digital data. It is widely used in consumer electronics such as televisions, computers, and gaming consoles to connect devices and transmit high-quality audio and video signals. HDMI supports both audio and video signals in a single cable, making it convenient and efficient for transmitting digital data.

Submit
14. Which of the following hardware devices links a number of computers together to form an Ethernet LAN?

Explanation

A switch is a hardware device that is used to connect multiple computers together to form an Ethernet LAN. It acts as a central hub, allowing the computers to communicate with each other by sending and receiving data packets. Switches are commonly used in both small and large networks to provide efficient and reliable connectivity. They are designed to handle high data traffic and can intelligently route data to the appropriate destination, improving network performance. Therefore, a switch is the correct hardware device for linking computers together in an Ethernet LAN.

Submit
15. When a new user is added, where does the user ID get stored?

Explanation

The user ID of a new user is stored in the /etc/passwd file. This file is a system file that contains information about user accounts, including their usernames, user IDs, group IDs, home directories, and login shells. The /etc/passwd file is used by the system for user authentication and to determine various permissions and settings for each user.

Submit
16. What are the three sets of permission for a file?

Explanation

The three sets of permission for a file are user, group, and others. These permissions determine who can read, write, or execute the file. The user permissions apply to the owner of the file, the group permissions apply to the group that the owner belongs to, and the others permissions apply to everyone else. This system allows for fine-grained control over file access and ensures that only authorized individuals or groups can interact with the file.

Submit
17. Which command will display running process information in realtime?

Explanation

The correct answer is "top". The "top" command is used to display real-time information about running processes on a system. It provides a dynamic view of the system's processes, including details such as CPU usage, memory usage, and process IDs. By continuously updating the information, "top" allows users to monitor the system's performance and identify any processes that may be consuming excessive resources.

Submit
18. Which of the following commands is used to lookup the current IP address of a system?

Explanation

The correct answer is "ifconfig". This command is used to lookup the current IP address of a system. It displays the network configuration information of all network interfaces on the system, including the IP address assigned to each interface.

Submit
19. What is the first character for a file or directory names if they should not be displayed by commands such as ls unless specifically requested?

Explanation

In Unix-based systems, the dot (.) is used as the first character for file or directory names that should not be displayed by commands like ls unless specifically requested. This convention is commonly used for hidden files or directories, which typically contain configuration files or sensitive data that should not be easily accessible or accidentally modified. By starting the name with a dot, the file or directory is effectively "hidden" from regular directory listings, providing a level of privacy or organization.

Submit
20. Which command lists all files in the current directory that starts with a capital letter?

Explanation

The correct answer is "ls [A-Z]*". This command uses the wildcard character "*" to match any file that starts with a capital letter in the current directory. The "[A-Z]" specifies that the file must start with a capital letter, and the "*" allows for any additional characters after the capital letter.

Submit
21. Which command will display the last line of the file foo.txt?

Explanation

The command "tail -n 1 foo.txt" will display the last line of the file foo.txt. The "tail" command is used to display the last part of a file, and the "-n 1" option specifies that only the last line should be displayed.

Submit
22. Which statement about users and user groups is correct?

Explanation

Every user belongs at least to one user group. This means that in a system, every user must be assigned to at least one user group for the purpose of access control and permissions management. User groups are used to categorize users based on their roles, responsibilities, or access privileges, allowing administrators to assign permissions and restrictions to groups rather than individual users. This ensures efficient management of user access and simplifies the process of granting or revoking permissions for multiple users at once.

Submit
23. While deleting all files beginning with the letter a there was still the file Access.txt left. Assuming that it had the correct ownership, why was it not deleted?

Explanation

The reason the file Access.txt was not deleted is because Linux file names are case sensitive. The command used to delete the files beginning with the letter "a" would only delete files with lowercase "a" as the first letter, while "Access.txt" starts with an uppercase "A". Therefore, it was not deleted.

Submit
24. Which one of the following statements concerning Linux passwords is true?

Explanation

Passwords are only stored in encrypted form. This means that when a user sets a password on a Linux system, it is encrypted and stored securely. The encryption ensures that even if someone gains unauthorized access to the system's password file, they will not be able to determine the actual passwords easily. This is an important security measure to protect user accounts and sensitive information.

Submit
25. What is the command that will show system boot time messages?

Explanation

The command "dmesg" is used to display system boot time messages. It allows users to view the kernel ring buffer, which contains information about the system's hardware, drivers, and other messages generated during the boot process. This command is commonly used for troubleshooting purposes and to gather information about the system's initialization and hardware configuration.

Submit
26. Which of the following commands increases the number of elements in a directory  (choose two answers)

Explanation

A) touch newfile: This command creates a new file named "newfile" if it does not already exist. By creating a new file, it increases the number of elements (files and directories) in the directory.

E) mkdir newdirectory: This command creates a new directory named "newdirectory" within the current directory. This also increases the number of elements in the directory by adding a new directory to it.

Submit
27. How is it possible to determine if an executable file is a shell script that is ready by Bash?

Explanation

The correct answer is "The file line starts with #!/bin/bash". This is because the shebang line, which starts with #!, is used to specify the interpreter for the script. In this case, the shebang line indicates that the script should be interpreted by the Bash shell.

Submit
28. Which commands provide help for a specific Linux command? (Choose two answers).

Explanation

The "info" and "man" commands provide help for specific Linux commands. The "info" command displays detailed information about a command, including its usage, options, and examples. The "man" command displays the manual pages for a command, which contain comprehensive documentation and instructions on how to use the command effectively. These commands are commonly used by Linux users to quickly access information and understand the functionality of specific commands.

Submit
29. Which of the following directories is often used to store log files?

Explanation

The /var directory is often used to store log files. This directory contains variable data files, including system logs, that are constantly changing in size as the system runs. Storing log files in the /var directory allows for easy access and management of these files. The other directories listed (/home, /temp, /dev, /usr) are not typically used for storing log files.

Submit
30. What keyword is missing from the following segment of the shell script?for i in*;----cat $idone

Explanation

The missing keyword in the given shell script segment is "do". The "do" keyword is used in shell scripting to indicate the start of a loop or a block of code that needs to be executed repeatedly. In this case, the "do" keyword is missing before the "cat $idone" line, which suggests that the script is incomplete and the intended loop or block of code is not properly defined.

Submit
31. Which of the following commands is used to list the contents of a directory in Linux?

Explanation

The ls command is a fundamental Linux command used to list the files and directories within a specified directory. It provides various options for customizing the output, such as displaying file sizes, permissions, and modification times. The other options are also common Linux commands: cd (change directory), mkdir (make directory), and rm (remove).

Submit
32. Which of the following statements concerning the General Public License (GPL) is true?

Explanation

The General Public License (GPL) is a license designed to guarantee that the source code of a software remains freely available. This means that anyone who receives a software under the GPL has the right to access, modify, and distribute its source code. The GPL promotes the idea of open source software and encourages collaboration and innovation within the software community. It does not restrict the selling of GPL software or require approval from the original author for changes made to the program.

Submit
33. Which of the following Linux distributions use the dpkg package management system? (Choose two correct answers)

Explanation

Debian and Ubuntu both use the dpkg package management system. Dpkg is a package manager used in Debian-based Linux distributions to install, remove, and manage software packages. Suse, Red Hat, and Mandriva use different package management systems such as RPM (Red Hat Package Manager) or Zypper. Therefore, the correct answers are Debian and Ubuntu.

Submit
34. Which of the following files holds the definition of the local user accounts?

Explanation

The correct answer is /etc/passwd. This file holds the definition of the local user accounts on a Unix-like operating system. It contains important information such as the username, user ID, group ID, home directory, and shell for each user. This file is used by the system to authenticate users and manage their permissions and access privileges.

Submit
35. Which of the following programs is not  a graphical web browser?

Explanation

Links is not a graphical web browser because it is a text-based web browser. Unlike graphical web browsers, Links does not display web pages with images or other visual elements. Instead, it focuses on providing a lightweight and efficient browsing experience by rendering web pages in text format. This makes it suitable for low-resource environments or for users who prefer a minimalist browsing experience.

Submit
36. Which of the following answers are true for cloud computing? (Choose two correct answers)

Explanation

Cloud Computing provides new tools to manage IT resources, which means that it offers innovative solutions and technologies for handling and optimizing IT resources. From the business perspective, Cloud Computing involves outsourcing or centralization of IT operations, allowing companies to rely on external providers for their IT needs, resulting in cost savings and increased efficiency.

Submit
37. What does LAMP mean?

Explanation

The correct answer is the combination of Linux, Apache, MySQL, and PHP and other programming languages. LAMP is a popular open-source web development platform that uses these technologies to create dynamic websites and web applications. Linux is the operating system, Apache is the web server software, MySQL is the database management system, and PHP is the programming language. This combination provides a powerful and flexible environment for building and deploying web applications.

Submit
38. Which command shows if /usr/bin is in the current shell search path?

Explanation

The command "echo $PATH" is used to display the value of the PATH environment variable in the current shell session. The PATH variable contains a list of directories where the shell searches for executable files when a command is entered. Each directory in the PATH variable is separated by a colon (:). By executing "echo $PATH", the shell will print out the contents of the PATH variable, showing all the directories included in the search path. If "/usr/bin" is included in the output, it indicates that this directory is part of the current shell's search path.

Submit
39. Which of the following is a requirement of the GPL license but not the BSD license?

Explanation

The requirement of making modifications available to recipients under the same license is specific to the GPL license and not the BSD license. The BSD license allows users to modify and distribute the software under different licenses, whereas the GPL license ensures that any modifications made are shared with others under the same license. This requirement promotes the open-source nature of the GPL license and encourages collaboration and sharing within the software community.

Submit
40. Which of the following file systems is most commonly used for Linux distributions?

Explanation

ext4 is the most commonly used file system for Linux distributions because it is the default file system for many Linux operating systems. It offers improved performance, reliability, and support for larger file sizes and partitions compared to its predecessor, ext3. Additionally, ext4 supports features such as journaling, which helps to prevent data loss in the event of a system crash. Overall, ext4 is widely adopted and trusted by the Linux community, making it the preferred choice for Linux distributions.

Submit
41. Which permissions should be given to a file that needs to be opened and edited by the file's owner and opened read-only by the file's group?

Explanation

The correct answer is 0640. This permission code indicates that the file's owner has read and write permissions (6), while the file's group has only read permissions (4). The other digits in the code represent the permissions for other users, which in this case are set to 0, meaning no permissions. This configuration ensures that the file can be opened and edited by the owner, while the group members can only open it in read-only mode.

Submit
42. What permissions are set on a file with the command chmod 654 file.txt?

Explanation

The first character indicates the file type (in this case, it's a regular file).

The next three characters "rw-" specify the permissions for the file owner (read and write, but not execute).

The next three characters "r-x" specify the permissions for the group (read and execute, but not write).

The last three characters "r--" specify the permissions for others (read only, no write or execute).

Submit
43. Which option will cause the echo command NOT to output a trailing newline?

Explanation

The option "-n" will cause the echo command to not output a trailing newline. This means that when using the echo command with the "-n" option, the text will be displayed without a new line character at the end, allowing the next output to be displayed on the same line.

Submit
44. Which of the following Ubuntu releases is considered most stable and fit to use for business purposes?

Explanation



LTS releases of Ubuntu are specifically designed for stability and long-term use, making them ideal for business environments where reliability and support are crucial. These LTS releases receive long-term support and security updates, typically for five years on the desktop and server editions. Therefore, LTS releases are recommended for business use.
Submit
45. After installing a new package, in which directory are you most likely find its configuration file?

Explanation

After installing a new package, you are most likely to find its configuration file in the /etc directory. The /etc directory is commonly used to store system-wide configuration files in Unix-like operating systems. It is the standard location for various configuration files, including those related to installed packages. Therefore, it is the most probable directory to find the configuration file of a newly installed package.

Submit
46. Which of the following commands can be used to determine the time of the last login of a given user?

Explanation

The "last" command can be used to determine the time of the last login of a given user. This command displays a list of recent login sessions, including the username, terminal, date, and time of each login. By using the "last" command followed by the username, you can specifically view the login history for that particular user.

Submit
47. Which of the following will change the group that is associated with a file?

Explanation

The command "chown" is used to change the owner of a file, and by extension, it also changes the group associated with that file. This command allows the user to transfer ownership from one user to another, and in doing so, the group association may also be modified. Therefore, "chown" is the correct answer for changing the group associated with a file.

Submit
48. What two-character sequence is present at the beginning of an interpreted script? Please specify two characters only.

Explanation

The two character sequence present at the beginning of an interpreted script is "#!". This sequence is known as a shebang or hashbang and is used to specify the interpreter for the script. It tells the operating system which interpreter should be used to execute the script.

Submit
49. Which criteria are useful when deciding which operating system to use? (Choose three correct answers).

Explanation

The criteria that are useful when deciding which operating system to use are license costs, availability of mandatory applications and tools, and skills of the administrators and staff. License costs are important because they can vary greatly between different operating systems and can impact the overall budget of an organization. The availability of mandatory applications and tools is also crucial as certain industries or specific tasks may require specific software that may only be compatible with certain operating systems. Lastly, the skills of the administrators and staff play a significant role as they need to be familiar and proficient with the chosen operating system in order to effectively manage and troubleshoot any issues that may arise.

Submit
50. Which command is used to make a shell variable known to subsequently executed programs?

Explanation

The command "export" is used to make a shell variable known to subsequently executed programs. When a variable is exported, it becomes part of the environment of any child processes that are created. This means that the variable can be accessed and used by these programs. The "announce", "env", "transfer", and "mv" commands do not serve this purpose.

Submit
51. Which of the following is true about open source software?

Explanation

Open source software is available for commercial use because it allows users to modify, distribute, and use the software for any purpose, including commercial purposes. This means that businesses can use open source software without any restrictions or licensing fees, which promotes innovation and collaboration in the software industry. Additionally, the freedom to redistribute copies of open source software includes both the binary or executable forms as well as the source code, allowing users to share and improve upon the software.

Submit
52. Which of the following software packages is an email server?

Explanation

Postfix is the correct answer because it is an email server software package. It is widely used for routing and delivering emails on a server. Thunderbird is an email client, Apache is a web server, GIMP is an image editing software, and MySQL is a database management system. Therefore, only Postfix fits the criteria of being an email server.

Submit
53. Which command line can be used to search help files that mention the word "copy"?

Explanation

The correct answer is "man -k copy" because the "man -k" command is used to search for keywords in the manual pages. In this case, it will search for help files that mention the word "copy".

Submit
54. Identify the proper device for the third partition, on the second hard disk, on the first IDE controller on a PC system. 

Explanation

The answer /dev/hdb3 is the correct device for the third partition on the second hard disk on the first IDE controller on a PC system. The naming convention for Linux devices is /dev/[device][partition], where [device] represents the device identifier and [partition] represents the partition number. In this case, "hdb" represents the second hard disk, and "3" represents the third partition on that disk.

Submit
55. Which network interface always exists in a Linux system?

Explanation

The network interface "lo" always exists in a Linux system. "lo" stands for loopback and it is a virtual network interface that allows network communication within the same machine. It is used for testing and troubleshooting network configurations, as well as for accessing local services without the need for an external network connection.

Submit
56. The following file is found in which system file?root:x:0:0::/root:/bin/bash

Explanation

The correct answer is /etc/passwd. This file is found in the system file directory and contains essential information about user accounts on the system, such as usernames, user IDs, group IDs, home directories, and default shells. It is a plain text file that can be accessed by privileged users and some system processes for authentication purposes.

Submit
57. How can the current directory and its subdirectories be searched for the file name MyFile.xml?

Explanation

This command uses find, which is a powerful utility for searching files in a directory hierarchy. Here’s how it works:

. specifies the current directory as the starting point for the search.

-name MyFile.xml tells find to look for files that exactly match the name "MyFile.xml". Therefore, the correct option from the provided choices, formatted to match typical usage, is:

find -name MyFile.xml

Submit
58. Which of the following commands are used to view real-time memory usage (Choose two correct answers).

Explanation

The "top" command is used to view real-time information about system processes, including memory usage. It provides a detailed overview of memory usage by displaying the total memory, used memory, free memory, and memory usage by individual processes. On the other hand, the "free" command is used to display the amount of free and used memory in the system, including the total, used, and free memory, as well as the memory used for buffers and cache. Both commands are commonly used to monitor and analyze memory usage on a system.

Submit
59. Why is the file data.txt empty after executing sort data.txt > data.txt?

Explanation

When the command "sort data.txt > data.txt" is executed, it redirects the sorted output of the "sort" command to the same file "data.txt". However, the ">" operator truncates the file before any data is written to it. Therefore, the file becomes empty before the "sort" command is executed, resulting in an empty "data.txt" file.

Submit
60. What is the usual absolute path of the personal directory for the user foo?

Explanation

The usual absolute path of the personal directory for the user "foo" is "/home/foo" or "/home/foo/". This is because in most Linux systems, the personal directories for users are located in the "/home" directory, and the directory for the user "foo" would be named "foo". The trailing slash ("/") at the end of the path is optional and does not affect the correctness of the path.

Submit
61. What is the output of the following command? tail -n 20 test.txt

Explanation

The command "tail -n 20 test.txt" is used to display the last 20 lines of the file "test.txt". It includes both the non-blank lines and the blank lines present in the file.

Submit
62. Which of the following statements may be used to access the second command line argument to a script?

Explanation

The correct answer is "$2" because in most programming languages, including shell scripting, the dollar sign ($) followed by a number is used to access command line arguments. In this case, "$2" would refer to the second command line argument passed to the script.

Submit
63. How could one search for the file foo.txt under the directory /home?

Explanation

The correct answer is "find /home -name foo.txt". This is because the "find" command is used to search for files and directories within a specified directory. The "-name" option is used to search for files with a specific name, in this case "foo.txt". The "/home" argument specifies the directory in which to search for the file.

Submit
64. Which command displays the list of groups to which a user belongs?

Explanation

The id command in Unix/Linux displays information about the user and the groups to which the user belongs. When you run the id command, it provides the user ID, group ID, and the list of groups the user is a member of. The whoami command only shows the current logged-in username, who displays information about all users currently logged into the system, and Isgroup is not a standard command in Unix/Linux.

Submit
65. How can the normal output of a command be written to a file while discarding the error output?

Explanation

command: The command whose output you want to capture.

>: Redirects the standard output (stdout) of the command to a file named output.txt.

2>/dev/null: Redirects the standard error output (stderr) of the command to /dev/null, which is a special file that discards any data written to it.

This way, only the normal output of the command will be written to the output.txt file, and any error output will be discarded.

Submit
66. Which is a suitable command to find the next appearance of the word hidden in a man page being viewed from the command line?

Explanation

The command "/hidden" is the correct answer because it is the syntax used to search for the next appearance of the word "hidden" in a man page being viewed from the command line. By typing "/hidden" and pressing enter, the command line will search for the next occurrence of the word "hidden" on the man page.

Submit
67. Given the following directory permissions:

drwxrwxrwt  14 root  36864  2012-03-02  11:17  tmp

What is the letter t at the end of drwxrwxrwt  indicate?

Explanation

The letter "t" at the end of "drwxrwxrwt" indicates the sticky bit. This means that even though the directory is globally writable, only the owner of a file within the directory can delete their own files. This is a security measure that prevents unauthorized deletion of files by other users.

Submit
68. A Linux computer has no access to the Internet. Which command displays information about the network gateway for the system?

Explanation

The correct answer is "route". The "route" command displays information about the network gateway for the system. It shows the routing table, which includes information about the network destinations and the corresponding gateway addresses. This command is commonly used in Linux systems to troubleshoot network connectivity issues and to manage the routing configuration.

Submit
69. When typing a long command line at the shell, what single character can be  used to split a command across multiple lines?

Explanation

The backslash (\) character can be used to split a command across multiple lines when typing a long command line at the shell. This character is known as the line continuation character and it allows the command to continue on the next line, making it easier to read and manage long command lines.

Submit
70. Which of the following commands can be used to view a file and do search operations within it while viewing the contents?

Explanation

The less command is a versatile tool for viewing file content in a terminal. It provides navigation options like scrolling, paging, and searching within the displayed text. Unlike commands like cat which display the entire file at once, less offers a controlled view, especially useful for large files. It also allows for searching specific terms or patterns using regular expressions, making it a preferred choice for interactive file viewing and analysis.

Submit
71. Which of the following commands will output all of the lines that contain either the string Fred or fred? (Select all that apply)

Explanation

To output all lines containing either the string "Fred" or "fred," you can use the following commands:

grep '[Ff]red' data_file - This command matches both "Fred" and "fred" by using a character class [Ff] that allows either uppercase "F" or lowercase "f".

grep -i fred data_file - The -i flag makes the search case-insensitive, matching "Fred", "fred", or any other case variation.

The other commands do not correctly match both "Fred" and "fred":

grep -v fred data_file: This will output lines that do not contain "fred."

grep '[f]red' data_file: This matches only "fred" because it does not account for uppercase "F."

egrep fred data_file: This matches only "fred" in lowercase.

Submit
72. Which of the following commands will create an archive file, named backup.tar, containing all the files from the directory /home?

Explanation

The correct answer is "tar -cf backup.tar /home". This command uses the tar utility with the -cf options to create a new archive file named backup.tar. The /home directory is specified as the source directory from which all files will be included in the archive.

Submit
73. What is the output of the following command? for token in a b c; do echo -n ${token} done

Explanation

The for loop iterates over the tokens a, b, and c.

The echo -n ${token} command prints each token without a newline.

Therefore, the tokens a, b, and c are printed consecutively on the same line, resulting in the output abc.

Submit
74. Which of the following applications are used to play an MP3 file on a Linux system? Choose three answers  

Explanation

Banshee, Amarok, and Audacious are all applications that can be used to play an MP3 file on a Linux system. Banshee is a popular media player that supports various formats including MP3. Amarok is another feature-rich music player that can handle MP3 files. Audacious is a lightweight audio player that also supports MP3 playback. These applications provide users with options to manage and play their music files on a Linux system.

Submit
75. Which statement about the directory  /etc/skel are correct?  (Choose two answers)

Explanation

The directory /etc/skel contains a default set of configuration files used by the useradd command. When a new user account is created, the files from this directory are copied to the home directory of the new user. This ensures that the new user has a set of default configuration files and settings. However, the directory does not contain the personal settings of root and it does not contain the global settings for the Linux system.

Submit
76. The output of the program date should be saved in the variable actdat. What is the correct statement?

Explanation

In a Linux shell script, you can use the date command to retrieve the current date and time. To save the output of this command into a variable named actdat, you can use command substitution, denoted by $(...).

Submit
77. Which of the following commands moves the directory ~/summer-vacation and its content to ~/vacation/2011?

Explanation

The correct answer is "mv ~/summer-vacation ~/vacation/2011". This command uses the "mv" command to move the directory ~/summer-vacation and its contents to ~/vacation/2011. The "~" symbol represents the home directory, so this command moves the "summer-vacation" directory from the home directory to the "vacation/2011" directory within the home directory.

Submit
78. Which command will archive /home and its content to /mnt/backp? Choose two correct answers.

Explanation

cp -ar /home /mnt/backp: This command copies the /home directory and all its contents recursively to /mnt/backp, preserving file attributes.

tar -cf /mnt/backp/archive.tar /home: This command creates a tar archive of the /home directory and saves it as archive.tar in the /mnt/backp directory.

These commands effectively archive or copy the /home directory as required.

Submit
79. Which of the following are correct commands for changing the current directory  to the user's home? (Select all that applies) 

Explanation

The correct commands for changing the current directory to the user's home directory are:

cd ~ - The tilde ~ represents the user's home directory.

cd - Without any arguments, cd will take you to the user's home directory.

Submit
80. Which of the following commands will set the variable text to olaf is home? (Select two answers)

Explanation



These commands assign the string “olaf is home” to the variable text. The single or double quotes are used to handle spaces and special characters in the string. The other commands you listed are not correct for this purpose. For example, text=olaf\ is\home would assign the string “olaf ishome” to the variable text, not “olaf is home”. And text=$olaf is home would try to assign the value of the variable olaf followed by the string “is home” to the variable text, which is not what you want. Finally, $text='olaf is home' and text=='olaf is home' are not valid syntax for assigning a value to a variable.
Submit
View My Results
Godwin Iheuwa |MS (Computer Science) |
Database Administrator
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.

Quiz Review Timeline (Updated): May 6, 2025 +

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

  • Current Version
  • May 06, 2025
    Quiz Edited by
    ProProfs Editorial Team

    Expert Reviewed by
    Godwin Iheuwa
  • Mar 05, 2016
    Quiz Created by
    Gdeisat
Cancel
  • All
    All (80)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which of the following can be used to access the command line?
Which of the following commands can be used to create a file?
What is the number called that is used to identify a process?
Which function does a shell program serve?
Which of the following is a Linux-based operating system for use on...
Which Linux distribution is used as a basis for the creation of Ubuntu...
Where is the BIOS located?
Which command would you use to get comprehensive documentation about...
Which of the following commands can be used to extract content from...
Which of the following commands can be used to extract files from an...
Which of the following is NOT a core component of the Linux operating...
Which of the following commands will display a list of all files in...
Which of the following is a combined audio/video interface for the...
Which of the following hardware devices links a number of computers...
When a new user is added, where does the user ID get stored?
What are the three sets of permission for a file?
Which command will display running process information in realtime?
Which of the following commands is used to lookup the current IP...
What is the first character for a file or directory names if they...
Which command lists all files in the current directory that starts...
Which command will display the last line of the file foo.txt?
Which statement about users and user groups is correct?
While deleting all files beginning with the letter a there was still...
Which one of the following statements concerning Linux passwords is...
What is the command that will show system boot time messages?
Which of the following commands increases the number of elements in a...
How is it possible to determine if an executable file is a shell...
Which commands provide help for a specific Linux command? (Choose two...
Which of the following directories is often used to store log files?
What keyword is missing from the following segment of the shell...
Which of the following commands is used to list the contents of a...
Which of the following statements concerning the General Public...
Which of the following Linux distributions use the dpkg package...
Which of the following files holds the definition of the local user...
Which of the following programs is not  a graphical web browser?
Which of the following answers are true for cloud computing? (Choose...
What does LAMP mean?
Which command shows if /usr/bin is in the current shell search path?
Which of the following is a requirement of the GPL license but not the...
Which of the following file systems is most commonly used for Linux...
Which permissions should be given to a file that needs to be opened...
What permissions are set on a file with the command chmod 654...
Which option will cause the echo command NOT to output a trailing...
Which of the following Ubuntu releases is considered most stable and...
After installing a new package, in which directory are you most likely...
Which of the following commands can be used to determine the time of...
Which of the following will change the group that is associated with a...
What two-character sequence is present at the beginning of an...
Which criteria are useful when deciding which operating system to use?...
Which command is used to make a shell variable known to subsequently...
Which of the following is true about open source software?
Which of the following software packages is an email server?
Which command line can be used to search help files that mention the...
Identify the proper device for the third partition, on the second hard...
Which network interface always exists in a Linux system?
The following file is found in which system...
How can the current directory and its subdirectories be searched for...
Which of the following commands are used to view real-time memory...
Why is the file data.txt empty after executing sort data.txt...
What is the usual absolute path of the personal directory for the user...
What is the output of the following command? tail -n 20 test.txt
Which of the following statements may be used to access the second...
How could one search for the file foo.txt under the directory /home?
Which command displays the list of groups to which a user belongs?
How can the normal output of a command be written to a file while...
Which is a suitable command to find the next appearance of the word...
Given the following directory permissions:...
A Linux computer has no access to the Internet. Which command displays...
When typing a long command line at the shell, what single character...
Which of the following commands can be used to view a file and do...
Which of the following commands will output all of the lines that...
Which of the following commands will create an archive file, named...
What is the output of the following command? ...
Which of the following applications are used to play an MP3 file on a...
Which statement about the directory  /etc/skel are correct?...
The output of the program date should be saved in the variable actdat....
Which of the following commands moves the directory ~/summer-vacation...
Which command will archive /home and its content to /mnt/backp? Choose...
Which of the following are correct commands for changing the current...
Which of the following commands will set the variable text to olaf is...
Alert!

Advertisement