Hardest Linux Exam Quiz!

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 Cmdpike
C
Cmdpike
Community Contributor
Quizzes Created: 1 | Total Attempts: 1,187
| Attempts: 1,187 | Questions: 90
Please wait...
Question 1 / 90
0 %
0/100
Score 0/100
1. To display the last 10 lines of the text file afile.txt, you would type tail afile.txt

Explanation

The statement is true because the "tail" command in Unix or Linux is used to display the last few lines of a text file. By typing "tail afile.txt", it will show the last 10 lines of the file "afile.txt".

Submit
Please wait...
About This Quiz
Hardest Linux Exam Quiz! - Quiz

The 'Hardest Linux Exam Quiz!' tests advanced knowledge of Linux commands and system administration. It covers CPU, network interfaces, DNS configurations, and disk partitioning, aiming to enhance practical... see moreLinux skills. see less

2. Which Linux command provides the information by displaying the names of files in a directory?

Explanation

The correct answer is "ls". The "ls" command is used in Linux to list the files and directories in a directory. It displays the names of the files in the specified directory, providing information about the contents of the directory.

Submit
3. Pressing the up arrow key in Bash reveals commands you've recently typed.

Explanation

Pressing the up arrow key in Bash allows users to access previously typed commands. This feature is useful as it saves time and effort by eliminating the need to retype long or complex commands. It also helps in avoiding typographical errors. By pressing the up arrow key, users can cycle through their command history and retrieve the desired command. This functionality is a convenient feature of the Bash shell.

Submit
4. Which of the following basic commands will change the directory or take the user back to /home?

Explanation

The correct answer is "cd" because it is the basic command used to change the current directory in a command line interface. By typing "cd /home", the user will be taken back to the /home directory.

Submit
5. Which of the following commands displays the name of the directory in which you're working?

Explanation

The pwd command does as the question specifies, so option E is correct. The wc command counts lines, words, and characters in a text file, so option A is incorrect. The cat command concatenates multiple files or displays a file on the screen, so option B is incorrect. The echo command displays whatever text you give it, or the contents of a variable you give it, so option C is incorrect. The cd command changes the current working directory but does not display its name, so option D is incorrect.

Submit
6. The files afile.txt and AFile.TXT can both exist on a Linux filesystem because Linux treats filenames in a _____-sensitive way.

Explanation

Linux treats filenames in a case-sensitive way, which means that it differentiates between uppercase and lowercase letters in filenames. Therefore, both "afile.txt" and "AFile.TXT" can coexist on a Linux filesystem because they have different cases.

Submit
7. To view all your recent commands in the command history, type in the command __________.

Explanation

To view all your recent commands in the command history, you need to type in the command "history". This command will display a list of all the commands that you have executed recently, allowing you to quickly access and review your past actions.

Submit
8. Partitioning a disk can enable you to install multiple OSs on one computer.

Explanation

Partitioning a disk allows you to divide it into separate sections or partitions. Each partition can be formatted and used to install a different operating system. This enables you to have multiple operating systems on one computer, allowing you to switch between them as needed. Therefore, the statement is true.

Submit
9. You can delete any file on the computer by using rm as an ordinary user

Explanation

Because of Linux’s security features, you can only delete files in directories to which you have write access. As an ordinary user, you should not have write access to most of the system directories, so rm won’t allow you to remove most system files.

Submit
10. Which basic command will create a symbolic link (shortcut) to a file?

Explanation

The ln command is used to create symbolic links (shortcuts) to files. It allows you to create a new file that points to an existing file, providing a convenient way to access the original file from a different location.

Submit
11. Which of the following commands will print lines from the file world.txt that contain matches to changes and changed?

Explanation

The grep utility finds matching text within a file and prints those lines. It accepts regular expressions, which means you can place in brackets the two characters that differ in the words for which you're looking. Option A shows the correct syntax for doing this. The tar utility creates or manipulates archive files, and option B's syntax is incorrect for any use of tar, so that option is incorrect. The find utility locates files based on filenames, file sizes, and other surface features. Furthermore, options C and E both present incorrect syntax for find, and so are incorrect. Option D's cat utility displays or concatenates files, so it won't have the desired effect and this option is wrong.

Submit
12. You type touch afile.txt in a directory that contains no files. What will be the effect?

Explanation

When you type "touch afile.txt" in a directory that contains no files, the effect will be that a new empty file called "afile.txt" will be created in the current directory. The "touch" command is used to update the access and modification timestamps of a file, but if the file does not exist, it will create a new empty file with the specified name.

Submit
13. Which Linux directory holds the system configuration files?

Explanation

The correct answer is /etc. The /etc directory in Linux holds the system configuration files. These files contain settings and parameters that determine how the operating system and various applications function. It is a central location for storing and managing important configuration files for the system.

Submit
14. Which character has the specific purpose of specifying the root directory?

Explanation

The character "/" is commonly used in computer systems to specify the root directory. It is used as a delimiter to separate directories in file paths and indicates the starting point or highest level of the directory hierarchy. In Unix-like systems, the root directory is represented by a single forward slash ("/"). Therefore, the character "/" serves the specific purpose of specifying the root directory.

Submit
15. Which key would you press if you wanted to do a command completion of a longer filename or command?

Explanation

Pressing the Tab key allows for command completion of a longer filename or command. This key is commonly used in command line interfaces to automatically complete the rest of a command or filename based on what has been typed so far. It saves time and effort by reducing the need to type out the entire command or filename manually.

Submit
16. Pressing the M key in top causes the display to change to sort processes by memory use

Explanation

Pressing the M key in top causes the display to change to sort processes by memory use. This means that when the user presses the M key while using the "top" command, the display will be updated to show the processes sorted based on their memory usage. This allows the user to easily identify which processes are consuming the most memory on the system.

Submit
17. Where do most log files reside on a Linux computer?

Explanation

Most log files on a Linux computer are typically stored in the /var/log directory. This directory is commonly used to store system logs, application logs, and other log files generated by various processes running on the system. The /home/logging, /usr/log, /etc/logging, and /log/usr directories mentioned in the other options are not standard locations for log files on a Linux system.

Submit
18. Which character that represents the start of a line in a regular expression?

Explanation

The character "^" represents the start of a line in a regular expression. It is used to match the beginning of a line or string. When "^" is placed at the beginning of a regular expression pattern, it ensures that the pattern is only matched if it occurs at the start of a line. Therefore, this character is the correct answer to the question.

Submit
19. What does the permission string -rwxrwx--- mean?

Explanation

Option C correctly summarizes the meaning of the specified permission string. The description in option A would be represented by -rwx------, which is not the string shown in the question. Option B would be correct if the string began with d, indicating a directory; but the leading - indicates a data file rather than a directory. Option D’s description would require rwx in the last three characters of the permission string; but the --- indicates no world access. Option E combines the directory error of option B with the world-access error of option D and so is incorrect.

Submit
20. To allow the man pages to be viewed a page at a time, which pager program is used for displaying man pages?

Explanation

The pager program used for displaying man pages a page at a time is "less".

Submit
21. The main filesystem in Linux is referred to as the _____ and is represented with the / symbol.

Explanation

In Linux, the main filesystem is referred to as the "root" and is represented with the "/" symbol. The root directory is the top-level directory in the file system hierarchy, serving as the parent directory for all other directories and files. It is denoted by the forward slash symbol ("/") and is the starting point for navigating the file system.

Submit
22. With most distributions, USB flash drives, and other removable media appear in subdirectories of /media

Explanation

Most distributions of operating systems, such as Linux, have a default behavior where USB flash drives and other removable media are automatically mounted and appear in subdirectories of the /media directory. This allows users to easily access and manage the files on these devices. Therefore, the statement "With most distributions, USB flash drives, and other removable media appear in subdirectories of /media" is true.

Submit
23. Which of the following syntaxes will you use to extract a file using the tar command?

Explanation

The correct syntax to extract a file using the tar command is "tar -zxvf {.tgz-file}". The "-z" option is used to specify that the file is compressed with gzip, the "-x" option is used to extract the file, the "-v" option is used to display the progress of the extraction, and the "-f" option is used to specify the name of the tar file.

Submit
24. The tail basic command will output the last _____ lines of a file.

Explanation

The tail basic command will output the last 10 lines of a file.

Submit
25. It is possible to see a list of all the directory paths in your Linux operating system by typing echo $PATH.

Explanation

By typing "echo $PATH" in the Linux operating system, it will display a list of all the directory paths. This command is used to view the directories where the system looks for executable files. Therefore, the statement is true.

Submit
26. You want to copy the contents of the ~/important directory, including all its subdirectories, to /media/usb. What command can you type to accomplish this goal?

Explanation

To copy an entire directory tree, you must use a recursive copy parameter, such as --recursive, -R, or -r. (An archive copy, as in --archive or -a, will also work.) Of the options shown here, only B includes one of these parameters, so it is correct. Option A lacks any parameters to cp, so it won’t work. Option C’s -u option performs an update copy—it copies files only if the original file is newer than any file of the same name at the target location. Option D’s -i performs an interactive copy, querying the user before overwriting existing files. Option E’s -f option forces cp to overwrite existing files without prompting.

Submit
27. Which of the following commands will print lines from the file world.txt that contain matches to changes and changed?

Explanation

The correct answer is "grep change[ds] world.txt". This command uses the "grep" tool to search for lines in the file "world.txt" that contain matches to the patterns "change" followed by either "d" or "s".

Submit
28. Which of the following options to chown changes the ownership of all the subdirectories of any specified directories, rather than just the files or directories that are explicitly passed to it?

Explanation

The -R or --recursive option does as the question specifies, so option A is correct. The --tree, -all, and -t options are all fictitious, so options B, D, and E are all incorrect. Option C is almost correct, but the correct option includes two dashes, not one. That is, it’s --recursive, not -recursive.

Submit
29. What symbol do you place after a command to run the program in the background?

Explanation

An ampersand (&), placed after a command typed in Bash, causes the command to run in the background, so option A is correct. The remaining options do not accomplish this task, although option C redirects standard output and option D creates a pipe to the following command on the same line. Option B is completely meaningless, as is option E in this context, although a hash mark (#) does serve as a comment character in Bash scripts.

Submit
30. Linux supports two types of text-mode output to the screen, which you can send to separate files or display devices.

Explanation

The two types of output are standard output and standard error.

Submit
31. Which of the following commands provides a low-level way to install software on a Debian system?

Explanation

The dpkg program is the low-level interface to the Debian package system; you can use it to install, uninstall, and otherwise manage packages. Thus, option E is correct. Its equivalent on RPM-based systems is rpm, so option A is incorrect. Options B, C, and D are incorrect because they’re all higher-level interfaces to RPM-based systems.

Submit
32. By default, useradd copies a set of user configuration files from /etc/skel when creating a new user account.

Explanation

Default user configuration files give users a head start on configuring their accounts and enable system administrators to set user default options. They’re copied from /etc/skel unless you specify another location with the --skel (-k) option to useradd.

Submit
33. What option can you pass to groupadd to have it create a group with a GID number of 1027?  

Explanation

The option --gid 1027 can be passed to groupadd to have it create a group with a GID number of 1027.

Submit
34. Which of the following redirection operators appends a program's standard output to an existing file, without overwriting that file's original contents?

Explanation

The >> operator appends standard output to a file, so option D is correct. The vertical bar (|) is the pipe character; it ties one program's standard output to another's standard input, so option E is incorrect. The 2> operator redirects standard error, not standard output, and it overwrites the target file. Thus, option A is incorrect. The &> operator redirects both standard output and standard error, and it overwrites the target file, so option B is incorrect. The > operator redirects standard output, but it overwrites the target file, so option C is incorrect.

Submit
35. Which of the processes can you use to identify running processes? (choose two)

Explanation

The ps and top programs are text-mode commands to identify running programs, so options B and E are both correct. The df program summarizes disk usage, bg shifts a suspended program into background execution, and mem is a device file, so options A, C, and D are all incorrect.

Submit
36. The mv command is used to both move and _____ files and directories.

Explanation

The mv command is used to both move and rename files and directories.

Submit
37. Which of the following actions is performed when a file is uncompressed?

Explanation

When a file is uncompressed, the action that is performed is extracting the contents of the compressed file. This involves decompressing the file and restoring it to its original form, allowing access to the individual files and folders within the compressed file.

Submit
38. The gzip, bzip2, and xz programs all perform _____ compression, in which the decompressed data exactly match the original pre-compression data.

Explanation

The gzip, bzip2, and xz programs all perform lossless compression, in which the decompressed data exactly match the original pre-compression data.

The gzip, bzip2, and xz programs all perform lossless compression, in which the decompressed data exactly match the original pre-compression data.

Submit
39. Users should be logged in when you change their UID numbers with usermod

Explanation

If a user is logged in when you change the user’s UID number, problems can ensue because the login session will continue to use the old UID number. Thus, users should be logged out before you attempt to change their UID numbers.

Submit
40. What program can you use to manually bring up a network interface in Linux?

Explanation

The ifconfig program does as the question specifies (among other things), so option D is correct. The iwlist command displays information on Wi-Fi networks but does not bring up a network interface, so option A is incorrect. The route command displays or modifies routing tables but does not bring up a network interface, so option B is incorrect. The telnet command is a remote-access and network diagnostic tool, but it does not bring up a network interface, so option C is incorrect. The traceroute command produces network diagnostic information, but it does not bring up a network interface, so option E is incorrect.

Submit
41. Your network's hardware interface is called eth0. You want to bring up this interface via DHCP, so you type dhclient eth0 as root.

Explanation

The given statement is true because typing "dhclient eth0" as root is the correct command to bring up the network's hardware interface, eth0, via DHCP. The "dhclient" command is used to obtain an IP address from a DHCP server, and specifying "eth0" tells the command to apply DHCP to that specific network interface.

Submit
42. To run a GUI program in Linux, you must launch it from a desktop environment's menus.

Explanation

This statement is false because it is not necessary to launch a GUI program from a desktop environment's menus in Linux. GUI programs can also be launched from the command line by typing the program's name and pressing enter. Additionally, some Linux distributions allow users to create shortcuts or launchers on the desktop or taskbar to directly run GUI programs without accessing the menus.

Submit
43. The find command enables you to locate files based on their sizes.

Explanation

The find command is a powerful tool that allows users to search for files based on various criteria, including their sizes. By using the appropriate options and arguments, users can specify a size range or a specific size to search for files that match the given criteria. Therefore, the statement that the find command enables you to locate files based on their sizes is true.

Submit
44. You can use the ____ command to count the characters, words, and lines in a text file.

Explanation

The "wc" command can be used to count the characters, words, and lines in a text file. This command is commonly used in Unix and Unix-like operating systems. By executing the "wc" command followed by the file name, it will provide the count of characters, words, and lines present in the specified text file.

Submit
45. Which of the following programs produces a summary of the memory status of your computer, including the total memory available, the amount used, and the amount that's unused?

Explanation

The free command produces the information specified, so option A is correct. Options B, C, and D are all fictitious program names, at least on Linux. The Linux df command (option E) produces a summary of disk space available and used, not memory, so it’s incorrect.

Submit
46. GUI account management tools provide more options than their text-mode counterparts.

Explanation

GUI account management tools do not necessarily provide more options than their text-mode counterparts. The statement is incorrect because both GUI and text-mode account management tools can offer a range of options, and the number of options available is not determined solely by the interface. The functionality and features of the tools are determined by the software itself, not the way it is presented to the user. Therefore, the correct answer is False.

Submit
47. You're writing a script that should accept two arguments, a username and a year, specified in that order on the command line. What variable would you use to access the year?

Explanation

Command-line arguments are accessed within a script as numbered variables, with $0 being the program name, $1 being the first argument (the username in this example), $2 being the second argument (the year in this example), and so on. Thus, option D is correct. Option A’s $1 would access the username and so is incorrect. Options B, C, and E are all valid Bash variable names, but none will refer automatically to the command-line arguments and so are incorrect.

Submit
48. Which of the following commands is used to extract a compressed file?

Explanation

The command "gunzip" is used to extract a compressed file.

Submit
49. Which of the following commands supports both gzip and bzip2 compression?

Explanation

The command "tar" supports both gzip and bzip2 compression. "tar" is a utility used to create, maintain, and manipulate file archives. It can compress files using gzip or bzip2 compression algorithms, making it a versatile choice for handling compressed files.

Submit
50. Which of the following pieces of information on user accounts is not normally stored in the /etc/passwd file on modern Linux distributions?

Explanation

Although /etc/passwd includes a field for the password, that field normally contains an x value, meaning that the encrypted password is stored in /etc/shadow. Thus, option E is correct. The account’s default shell, default GID number, UID number, and username all appear in /etc/passwd, so options A, B, C, and D are all incorrect.

Submit
51. Even after an account is deleted, its UID number cannot be reused.

Explanation

Once an account is deleted, its UID number can be reused. That said, unless the account had the highest UID number, chances are useradd won’t automatically reuse its UID number.

Submit
52. In what file are you likely to find the following lines?  
  • domain google.com
  • nameserver  8.8.8.8
  • nameserver 10.10.10.1

Explanation

The specifies lines belong to an /etc/resolv.conf file, which tells Linux what computers to use as DNS servers and what domain to use as its default domain. Thus, option A is correct. The /etc/fstab file tells Linux where to mount filesystems; /etc/hosts provides a way to map IP addresses to hostnames without using DNS; /etc/services gives names to TCP/IP port numbers; and /etc/group defines the computers groups. None of these files contains lines that resemble those shown, so options B, C, D, and E are all incorrect.

Submit
53. The gzip program generally produces more compact compressed files than the bzip2 program does.

Explanation

The bzip2 program usually produces compression that’s superior to gzip’s. Both programs are surpassed by xz.

Submit
54. To create a listing of the file afile.txt in the directory one level above the current one, you would type ls _________/afile.txt.

Explanation

The ".." in the command "ls ../afile.txt" is used to indicate the parent directory, which is one level above the current directory. By using "..", the command will list the file "afile.txt" in the directory that is one level above the current directory.

Submit
55. A file has a symbolic mode of -rw-r-----. The file's octal mode is _______.

Explanation

The file has a symbolic mode of -rw-r-----. In octal mode, each permission is represented by a three-digit number. The first digit represents the owner's permissions, the second digit represents the group's permissions, and the third digit represents the permissions for others. In this case, the owner has read and write permissions, the group has read permissions, and others have no permissions. Converting the symbolic mode to octal, we get 640.

Submit
56. The _____ command can ONLY remove empty directories.

Explanation

The "rmdir" command is specifically designed to remove empty directories. It cannot be used to remove directories that contain any files or subdirectories. This command is useful when you want to clean up your file system and delete directories that are no longer needed.

Submit
57. Which Linux directory holds program files that are critical for normal operation and that ordinary users may run?

Explanation

The /bin directory in Linux holds program files that are critical for normal operation and can be run by ordinary users. This directory contains essential executable files and commands that are necessary for the basic functioning of the system. Ordinary users can access and run these programs to perform various tasks on the system.

Submit
58. Which of the following files defines Linux groups?

Explanation

The correct answer is /etc/group. This file defines Linux groups.

Submit
59. You can configure your power supply by accessing the /dev/power device file.

Explanation

The power supply can’t be directly controlled through Linux device files; either it delivers power in a steady manner or it doesn’t, without software control.

Submit
60. To compress files archived with zip, you must use an external compression program such as gzip or bzip2 in a pipeline with zip.

Explanation

To compress files archived with zip, you do not need to use an external compression program such as gzip or bzip2 in a pipeline with zip. The zip utility itself is capable of compressing files and creating zip archives. Therefore, the statement "To compress files archived with zip, you must use an external compression program such as gzip or bzip2 in a pipeline with zip" is incorrect.

Submit
61. You've received a tarball called data79.tar from a colleague, but you want to check the names of the files it contains before extracting them. Which of the following commands would you use to do this?

Explanation

With the tar utility, the --list (t) command is used to read the archive and display its contents. The --verbose (v) option creates a verbose file listing, and --file (f) specifies the filename—data79.tar in this case. Option C uses all of these features, and therefore does as the question specifies. Options A, B, D, and E all substitute other commands for --list, which is required by the question, so all of these options are incorrect.

Submit
62. You want to create a directory called ~/Documents/papers, but you're not sure that the ~/Documents directory exists. What command can you type to create the desired directory and its parent directory if it doesn't already exist?

Explanation

The -p option to mkdir creates parent directories if they don’t already exist, so option E is correct. The -a, --recursive, -R, and -r options are all fictitious, so options A, B, C, and D are all incorrect.

Submit
63. The first process to be run by the Linux kernel is normally called _______.

Explanation

The first process to be run by the Linux kernel is normally called "init". Init is the parent process of all other processes and has the process ID of 1. It is responsible for starting and stopping system services, initializing the system, and managing the overall system state. Init is essential for booting up the operating system and ensuring that all necessary processes are started correctly.

Submit
64. Which methods or commands provide access to superuser privileges for authorized users? (choose all that apply)

Explanation

The su command, the sudo command, and logging into the root account all provide access to superuser privileges for authorized users. Therefore, options A, C, and D are correct. The switch_user command is ficticious, so option B is incorrect. The hash (#) symbol is often displayed at the end of the root user’s prompt and typically is used in documentation to denote required superuser privileges for a displayed command but does not in itself provide access to superuser privileges. Thus, option E is incorrect.

Submit
65. You want to delete the oldproj group, so you type ______ oldproj.

Explanation

To delete the oldproj group, the correct command to use is "groupdel". This command is used in Linux systems to remove a group from the system. By typing "groupdel oldproj", the system will delete the oldproj group and remove it from the system's group database.

Submit
66. You use the ___ character to separate two strings, either of which should match, in an extended regular expression.

Explanation

The correct answer is the "|" character. In an extended regular expression, the "|" character is used to separate two strings, either of which should match. This means that if either of the strings is found in the input, the regular expression will be considered a match.

Submit
67. How many man page sections are there total?

Explanation

There are a total of 9 man page sections. Man pages are documentation files in Unix-like operating systems that provide information about various commands and functions. Each section of the man pages is dedicated to a specific topic or category, such as user commands, system calls, library functions, device drivers, and file formats. Therefore, the correct answer is 9.

Submit
68. Which of the following text editors runs as a text-mode program when launched in text mode but also provides a GUI version for use in a GUI environment?

Explanation

The emacs editor provides both a text-mode interface and a GUI, so option A is correct. gedit (option C) and KWrite (option D) are all GUI-only editors. nano (option B) and vi (option E) are text-mode-only editors.

Submit
69. Mary finds that she can delete George's files in /tmp. What might this imply?

Explanation

Ordinarily, the sticky bit is set on /tmp, which protects files from deletion by anybody but the file’s owner and root. If one user can delete another’s files in /tmp, the probable cause is the absence of the sticky bit, as in option D. Although users should be able to delete their own files from /tmp, they should not be able to delete other users’ files from there, so option A is incorrect. The set user ID (SUID) bit is set on program files to affect the permissions of the running program; it doesn’t have the effect described here, so option B is incorrect. Contrary to option C, write permissions should definitely be present on /tmp. If /tmp were mounted read-only, nobody would be able to change its contents, which is not the problem described in the question, so option E is incorrect.

Submit
70. Which of the following outcomes will you get after executing the # tar -cvf /tmp/etc.tar /etc command?

Explanation

The command "tar -cvf /tmp/etc.tar /etc" is used to create a tar archive file named "etc.tar" in the "/tmp" directory. The "/etc" directory is being archived, meaning that all files and directories within it will be included in the archive. Therefore, the outcome of executing this command will be an archived file.

Submit
71. Default permissions are determined by the _____.

Explanation

Default permissions are determined by the "umask" setting. The umask is a value that is subtracted from the default permissions of newly created files and directories. It is used to restrict the permissions that are automatically assigned to new files and directories. The umask value is typically set in the shell configuration files and can be modified by the user to customize the default permissions according to their needs.

Submit
72. Which regular expression string matches any sequence of characters of any length?

Explanation

The .* sequence matches any string of any length, so option C is correct. Option A matches a dot (.), which otherwise has a special meaning and so can’t be used directly. Square brackets, as in option B, can surround a set of characters, any one of which will satisfy a match. A dot, as in option D, matches any single character. An asterisk (*), as in option E, specifies an arbitrary number of repeats of the previous match. (Hence, .* matches any number of characters, but neither character alone does the job.)

Submit
73. Which command would create a zip file containing the files holiday.tif and desc.txt and compress it as much as possible?

Explanation

The -9 command option provides maximum compression, and the name of the zip file must be listed before the files to be included in the zip file, so option E is correct. The -1 command option provides minimal compression, so options A and B are incorrect. The -c command option is not used for compression. Therefore, option C is also incorrect. Option D has the zip file designation listed last. This command will not work properly because the zip file designation is not listed before the files to be included in the zip file. Thus, option D is incorrect.

Submit
74. The string _______, located at the start of the file, identifies a script as a Bash script.

Explanation

The string "#!/bin/bash" is known as a shebang or hashbang and is used to specify the interpreter for the script. In this case, it indicates that the script is a Bash script. When the script is executed, the system will use the Bash interpreter to interpret and execute the commands in the script.

Submit
75. To change a current user account's home directory location, you might type ______ -m -d /home/newhome user.

Explanation

The correct answer is "usermod". Usermod is a command-line utility in Linux that is used to modify user account attributes. In this case, the "-m" option is used to move the contents of the user's current home directory to the new location, and the "-d" option is used to specify the new home directory location. By typing "usermod -m -d /home/newhome user", the current user account's home directory location can be changed to "/home/newhome".

Submit
76. You want to test connectivity to google.com by sending 11 packets to see how many return. To do this, you can type __________ google.com

Explanation

The correct answer is "ping -c 11" because the "ping" command is used to test connectivity between two devices on a network. The "-c 11" flag specifies that 11 packets should be sent to the destination (in this case, google.com) to test how many of them are successfully returned.

Submit
77. The command _______ :users somefile.txt changes the group affiliation of somefile.txt to users.

Explanation

The command "chown" is used to change the ownership of a file or directory. In this case, the command "chown :users somefile.txt" is used to change the group affiliation of the file "somefile.txt" to "users".

Submit
78. You want to see only the names of all the subdirectories of the current directory whose names begin with the letter s. To do so, you can type ls ___ s*. (Include no options other than those required to do as the question specifies.)

Explanation

The correct answer is "-d" because when used with the "ls" command, it will only display the names of the subdirectories in the current directory, rather than the contents of those directories. This is necessary in order to see only the names of the subdirectories that begin with the letter "s". By using the wildcard character "*", it allows for any characters to follow the "s" in the subdirectory names.

Submit
79. The _____ filesystem is very old but is supported by almost every OS, making it a good choice for interoperability. (one word)

Explanation

The FAT filesystem is very old but is supported by almost every OS, making it a good choice for interoperability. FAT stands for File Allocation Table, and it is a simple and widely supported file system that was originally developed for floppy disks and later used for hard drives and other storage devices. Its wide support across different operating systems allows for easy sharing and compatibility of files between different platforms.

Submit
80. The user arnold is currently logged in. Despite this fact, you want to delete his account without first logging him off. You don't want to delete arnold's files. To accomplish this goal, you type userdel ___ arnold.

Explanation

The option "-f" is used with the "userdel" command to forcefully delete a user account without prompting for confirmation. By using this option, the command will delete the user account even if the user is currently logged in. This option ensures that the account is deleted immediately and without any interruption or warning.

Submit
81. What type of information can netstat provide? (choose all that apply.)

Explanation

netstat can provide information on network interfaces similar to what ifconfig provides (option A), routing table data similar to what route provides (option B), and a list of open ports (option C). It cannot provide round-trip network packet travel time similar to what ping provides (option D) or the identities of broken routers similar to what traceroute provides (option E).

Submit
82. What keystroke deletes a line of text when using nano?

Explanation

Pressing Ctrl+K in nano deletes the entire line of text at the cursor's position. This keystroke is commonly used to remove unwanted lines or to quickly clear a line of text.

Submit
83. The term _________ refers to the use of wildcards in filename specifications.

Explanation

Globbing refers to the use of wildcards in filename specifications. It allows users to search for files or directories based on patterns rather than specific names. Wildcards such as asterisks (*) or question marks (?) can be used to represent any character or a specific character respectively. For example, if a user wants to find all files with the extension ".txt", they can use the pattern "*.txt" in their search. Globbing is commonly used in command-line interfaces and scripting languages to perform batch operations on multiple files.

Submit
84. Where does the kernel store its ring buffer logs?

Explanation

The kernel ring buffer is held in memory, as option E specifies. Options A, B, C, and D all specify disk directories, which aren’t memory locations, and so are all incorrect. (Some distributions place a copy of the ring buffer from late in the boot process in /var/log, but this is just a “snapshot” of the ring buffer at that moment in time, not whatever’s current at a later time.)

Submit
85. Which options to find can you use to locate files owned by a particular user? (Select all that apply.)

Explanation

The options -uid and -user can be used to locate files owned by a particular user. The -uid option allows you to search for files based on the user's unique ID, while the -user option allows you to search for files based on the username.

Submit
86. To append a program's standard error to an existing file without deleting its contents, you should use the ____ redirection operator.

Explanation

The correct answer is "2>>". This is because the "2>>" redirection operator is used to append the standard error (stderr) of a program to an existing file without deleting its contents. The "2" represents the file descriptor for stderr, and the ">>" appends the output to the specified file.

Submit
87. Which of the following programs enable root to set the ownership of files? (choose two)

Explanation

The chown command is a text-mode tool for changing the ownership and group association of files, so option B is correct. Nautilus is a GUI file manager, and when it’s run as root, it enables you to change the ownership of files, so option D is also correct. The chmod command enables changing the mode (permissions) of files but not their ownership, so option A is incorrect. The usermod command can change various account features but not file ownership, so option C is incorrect. The touch command updates a file’s time stamps but does not change its ownership, so option E is incorrect.

Submit
88. Complete the following command to redirect both standard output and standard error from the bigprog program to the file out.txt. $ bigprog _____ out.txt

Explanation

The correct answer is "&>". The "&>" symbol is used to redirect both standard output and standard error to the specified file "out.txt".

Submit
89. The _________ qualifier to tar causes it to use xz compression when creating an archive.

Explanation

The -J qualifier (or --xz) is used with the tar command to indicate that xz compression should be used when creating an archive. This qualifier compresses the files using the xz compression method, which is known for its high compression ratio. The command would look something like tar -cvf archive.tar.xz -J folder/, where -J specifies the use of xz compression.

Submit
90. Which of the following is a text-mode command that is helpful in identifying CPU information?

Explanation

The cat /proc/cpuinfo, lscpu, and uname -a text-mode commands are all helpful in identifying a CPU’s information; thus, options A, B, and E are correct. The lspci command displays information concerning PCI devices on your system. Thus, option C is incorrect. The cfdisk command is a simple text-based partitioning utility for MBR disks, and therefore option D is incorrect.

Submit
View My Results

Quiz Review Timeline (Updated): Aug 10, 2024 +

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

  • Current Version
  • Aug 10, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Jul 09, 2020
    Quiz Created by
    Cmdpike
Cancel
  • All
    All (90)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
To display the last 10 lines of the text file afile.txt, you would...
Which Linux command provides the information by displaying the names...
Pressing the up arrow key in Bash reveals commands you've recently...
Which of the following basic commands will change the directory or...
Which of the following commands displays the name of the directory in...
The files afile.txt and AFile.TXT can both exist on a Linux filesystem...
To view all your recent commands in the command history, type in the...
Partitioning a disk can enable you to install multiple OSs on one...
You can delete any file on the computer by using rm as an ordinary...
Which basic command will create a symbolic link (shortcut) to a file?
Which of the following commands will print lines from the file...
You type touch afile.txt in a directory that contains no files. What...
Which Linux directory holds the system configuration files?
Which character has the specific purpose of specifying the root...
Which key would you press if you wanted to do a command completion of...
Pressing the M key in top causes the display to change to sort...
Where do most log files reside on a Linux computer?
Which character that represents the start of a line in a regular...
What does the permission string -rwxrwx--- mean?
To allow the man pages to be viewed a page at a time, which pager...
The main filesystem in Linux is referred to as the _____ and is...
With most distributions, USB flash drives, and other removable media...
Which of the following syntaxes will you use to extract a file using...
The tail basic command will output the last _____ lines of a file.
It is possible to see a list of all the directory paths in your Linux...
You want to copy the contents of the ~/important directory, including...
Which of the following commands will print lines from the file...
Which of the following options to chown changes the ownership of all...
What symbol do you place after a command to run the program in the...
Linux supports two types of text-mode output to the screen, which you...
Which of the following commands provides a low-level way to install...
By default, useradd copies a set of user configuration files from...
What option can you pass to groupadd to have it create a group with a...
Which of the following redirection operators appends a program's...
Which of the processes can you use to identify running processes?...
The mv command is used to both move and _____ files and directories.
Which of the following actions is performed when a file is...
The gzip, bzip2, and xz programs all perform _____ compression, in...
Users should be logged in when you change their UID numbers with...
What program can you use to manually bring up a network interface in...
Your network's hardware interface is called eth0. You want to bring up...
To run a GUI program in Linux, you must launch it from a desktop...
The find command enables you to locate files based on their sizes.
You can use the ____ command to count the characters, words, and lines...
Which of the following programs produces a summary of the memory...
GUI account management tools provide more options than their text-mode...
You're writing a script that should accept two arguments, a username...
Which of the following commands is used to extract a compressed file?
Which of the following commands supports both gzip and bzip2...
Which of the following pieces of information on user accounts is not...
Even after an account is deleted, its UID number cannot be reused.
In what file are you likely to find the following lines?...
The gzip program generally produces more compact compressed files than...
To create a listing of the file afile.txt in the directory one level...
A file has a symbolic mode of -rw-r-----. The file's octal mode is...
The _____ command can ONLY remove empty directories.
Which Linux directory holds program files that are critical for normal...
Which of the following files defines Linux groups?
You can configure your power supply by accessing the /dev/power device...
To compress files archived with zip, you must use an external...
You've received a tarball called data79.tar from a colleague, but...
You want to create a directory called ~/Documents/papers, but you're...
The first process to be run by the Linux kernel is normally called...
Which methods or commands provide access to superuser privileges for...
You want to delete the oldproj group, so you type ______ oldproj.
You use the ___ character to separate two strings, either of which...
How many man page sections are there total?
Which of the following text editors runs as a text-mode program when...
Mary finds that she can delete George's files in /tmp. What might this...
Which of the following outcomes will you get after executing the # tar...
Default permissions are determined by the _____.
Which regular expression string matches any sequence of characters of...
Which command would create a zip file containing the files holiday.tif...
The string _______, located at the start of the file, identifies a...
To change a current user account's home directory location, you might...
You want to test connectivity to google.com by sending 11 packets to...
The command _______ :users somefile.txt changes the group affiliation...
You want to see only the names of all the subdirectories of the...
The _____ filesystem is very old but is supported by almost every OS,...
The user arnold is currently logged in. Despite this fact, you want to...
What type of information can netstat provide? (choose all that apply.)
What keystroke deletes a line of text when using nano?
The term _________ refers to the use of wildcards in filename...
Where does the kernel store its ring buffer logs?
Which options to find can you use to locate files owned by a...
To append a program's standard error to an existing file without...
Which of the following programs enable root to set the ownership of...
Complete the following command to redirect both standard output and...
The _________ qualifier to tar causes it to use xz compression when...
Which of the following is a text-mode command that is helpful in...
Alert!

Advertisement