The Ultimate Linux Commands And Networking Test

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 Themes
T
Themes
Community Contributor
Quizzes Created: 424 | Total Attempts: 1,036,981
| Attempts: 756 | Questions: 120
Please wait...
Question 1 / 120
0 %
0/100
Score 0/100
1. Which of the following commands can be used to limit the amount of memory a user may use?

Explanation

The ulimit command can be used to limit the amount of memory a user may use. This command allows system administrators to set various resource limits for users, including memory limits. By using ulimit, the system administrator can restrict the amount of memory that a user or a process can consume, preventing excessive memory usage and ensuring fair allocation of system resources.

Submit
Please wait...
About This Quiz
The Ultimate Linux Commands And Networking Test - Quiz

The Ultimate Linux Commands and Networking Test assesses proficiency in Linux command line tools and networking concepts. It evaluates skills in configuring hostnames, understanding IPv6 addresses, managing network... see moreconnections, and DNS debugging, crucial for IT professionals. see less

2. Which if the following tools, used for DNS debugging, reports not only the response from the name sever but also details about the query?

Explanation

The tool "dig" is used for DNS debugging and it reports not only the response from the name server but also details about the query.

Submit
3. On a machine running several X servers, how do programs identify the different instances of the X11 server?

Explanation

Programs identify different instances of the X11 server by using a display name. The display name is typically in the format of a number, such as "1". Each instance of the X server is assigned a unique display name, allowing programs to differentiate between them. This display name is used as a parameter when connecting to the X server, ensuring that the program connects to the correct instance.

Submit
4. What command list the aliases defined in the current Bash shell? (Specify only the command without any path or parameters.)

Explanation

The command "alias" lists the aliases defined in the current Bash shell. Aliases are shortcuts or alternate names for commands, allowing users to create their own custom commands or abbreviations. By running the "alias" command, users can view a list of all the aliases that have been defined in their current shell session.

Submit
5. Which file inside the CUPS configuration directory contains the settings of the printers?

Explanation

The file "printers.conf" inside the CUPS configuration directory contains the settings of the printers. This file is responsible for storing information about the printers connected to the system, such as their names, locations, and configuration options. It is used by CUPS (Common Unix Printing System) to manage and control the printing process on the system.

Submit
6. How does the ping command work by default?

Explanation

The ping command works by default by sending an ICMP Echo Request to a remote host and then waiting to receive an ICMP Echo Response in return. This allows the sender to determine the round-trip time and packet loss rate between the sender and the remote host.

Submit
7. What is the purpose of a screen reader?

Explanation

A screen reader is a software program that reads aloud the text displayed on a computer screen. Its purpose is to assist individuals who are blind or visually impaired by providing them with access to information that they would otherwise be unable to read. By converting on-screen text into synthesized speech or braille output, a screen reader enables blind or visually impaired users to navigate and interact with digital content, including websites, documents, and applications. It is an essential tool for promoting accessibility and inclusivity for individuals with visual disabilities.

Submit
8. Which of the following statements is true if the UID of a regular user is identical to the GID of a group?

Explanation

The correct answer is that UIDs and GIDs are independent of each other, therefore the user as well as the group are still available. This means that even if the UID of a regular user is identical to the GID of a group, it does not affect the availability of either the user or the group. The UID and GID serve different purposes and do not have any impact on each other's availability.

Submit
9. Which of the following commands lists all queued print jobs?

Explanation

The lpq command is used to list all queued print jobs. This command allows users to view information about their print jobs, such as the job ID, the user who submitted the job, the size of the job, and the current status of the job in the print queue. It provides a convenient way to monitor and manage print jobs in a Unix-like operating system.

Submit
10. What output does the command seq 10 produce?

Explanation

The command "seq 10" produces the numbers 1 through 10 with one number per line.

Submit
11. Which of the following commands can identify the PID od a process which opened a TCP port?

Explanation

The correct answer is "lsof." The lsof command is used to list open files and the processes that opened them. By specifying the TCP port, lsof can identify the PID (Process ID) of the process that opened the port. This can be useful for troubleshooting network issues or identifying processes that are using specific ports.

Submit
12. What is true regarding the file ~/.forward?

Explanation

The correct answer states that when configured correctly, the file ~/.forward can be used to forward each incoming mail to one or more other recipients. This means that the ~/.forward file can be used to redirect incoming emails to different email addresses, allowing the user to receive their emails in multiple locations or forward them to other people.

Submit
13. Which of the following is true regarding the command sendmail?

Explanation

All common MTAs, including Postfix and Exim, provide a sendmail command. This means that regardless of the specific MTA being used, users can use the sendmail command to send emails. It is not specific to a particular MTA and is widely available.

Submit
14. Which standardized TCP port is used by HTTPS services?

Explanation

HTTPS (Hypertext Transfer Protocol Secure) is a secure version of HTTP that uses encryption to protect the data being transmitted. It is commonly used for secure communication over the internet, such as online banking and shopping. The standardized TCP port used by HTTPS services is port 443. This port is specifically designated for secure HTTP communication, ensuring that the data is encrypted and secure during transmission.

Submit
15. What does the term Braille Display refer to?

Explanation

A Braille Display refers to a physical representation of characters using small dots. This display technology is used to convert digital text into Braille, allowing visually impaired individuals to read and access information. The dots on the display represent different characters, which can be felt and interpreted by touch. This technology enables blind individuals to access and interact with digital content, making it an essential tool for their daily lives.

Submit
16. How many IP addresses can be used for unique hosts inside the IPv4 subnet 192.168.2.128/26?

Explanation

The given IPv4 subnet is 192.168.2.128/26, which means that the subnet has a network address of 192.168.2.128 and a subnet mask of 26 bits. The subnet mask of 26 bits allows for 2^6 - 2 = 62 usable IP addresses. The "-2" accounts for the network address and the broadcast address, which cannot be assigned to hosts. Therefore, there can be 62 unique hosts inside this IPv4 subnet.

Submit
17. Which of the following information is stored in /etc/shadowfor each user?

Explanation

The /etc/shadow file stores the hashed password of each user. This file is used for authentication purposes and is only accessible by the root user. The hashed password ensures that the actual password is not stored in plain text, providing an additional layer of security.

Submit
18. Which configuration file contains the default options for SSH clients?

Explanation

The correct answer is /etc/ssh/ssh_config. This configuration file contains the default options for SSH clients. It is used to configure the behavior of the SSH client application, allowing users to customize various settings such as host-specific options, authentication methods, and encryption algorithms. By modifying this file, users can tailor their SSH client's behavior to their specific needs and preferences.

Submit
19. Which of the following configuration files should be modified to globally set shell variables for all users?

Explanation

The correct answer is /etc/profile. This file is a system-wide configuration file that is executed for login shells. It is used to set environment variables and execute commands that should be available to all users on the system. Modifying this file allows for the global setting of shell variables for all users.

Submit
20. What is the systemd journal stored?

Explanation

The systemd journal is stored in either /run/log/journal/ or /var/log/journal/.

Submit
21. Which of the following connection types, as seen in nmcli connection show, may exist in NetworkManager? (Choose three.)

Explanation

The correct answer is ethernet, wifi, and bridge. These three connection types are commonly seen in NetworkManager. Ethernet connections are used for wired connections, wifi connections are used for wireless connections, and bridge connections are used to connect multiple networks together. TCP and IPv6 are not connection types, but rather protocols that can be used within these connection types.

Submit
22. Which of the following commands is used to rotate, compress, and mail system logs?

Explanation

The correct answer is "logrotate". Logrotate is a command used to rotate, compress, and mail system logs. It is a utility that automatically manages log files, ensuring that they do not grow too large and take up excessive disk space. It can compress old log files to save space and also send them via email for further analysis or archiving. This command is commonly used in Linux systems to maintain and manage log files efficiently.

Submit
23. Which of the following commands displays all environment and shell variables?

Explanation

The command "env" displays all environment and shell variables. It is used to show the current environment variables and their values in a Unix-like operating system.

Submit
24. Which of the following parameters are used for journalctl to limit the time frame of the output? (Choosetwo.)

Explanation

The parameters --since= and --until= are used for journalctl to limit the time frame of the output. The --since= parameter specifies the starting time of the logs to display, while the --until= parameter specifies the ending time of the logs to display. By using these parameters, the user can filter the logs based on a specific time range.

Submit
25. Which of the following protocols is related to the term open relay?

Explanation

SMTP (Simple Mail Transfer Protocol) is the correct answer because it is a protocol used for sending and receiving email messages between servers. An open relay refers to an SMTP server that allows anyone to send email through it, without requiring any authentication. This can be exploited by spammers to send large volumes of unsolicited emails, leading to abuse and potential security risks.

Submit
26. What information is provided by the echo $$ command?

Explanation

The echo $$ command provides the process ID of the current shell.

Submit
27. What is a purpose of an SSH host key?

Explanation

The purpose of an SSH host key is to provide the server's identity information to connecting SSH clients. This allows clients to verify the authenticity of the server they are connecting to and ensure that they are not connecting to a malicious or impersonating server. The SSH host key is used during the initial connection handshake to establish a secure and encrypted communication channel between the client and the server.

Submit
28. Given the following routing table: How would an outgoing packet to the destination 192.168.2.150 be handled?

Explanation

The outgoing packet to the destination 192.168.2.150 would be passed to the router 192.168.1.1 on eth0. This is because the destination IP address falls within the subnet 192.168.1.0/24, which is directly connected to the eth0 interface. The router 192.168.1.1 is the gateway for this subnet, so the packet would be forwarded to that router for further routing.

Submit
29. What output is produced by the following command sequence? echo '1 2 3 4 5 6' | while read a b c; do echo result $c $b $a; done

Explanation

The given command sequence takes the string "1 2 3 4 5 6" as input and uses the "read" command to assign the values to variables a, b, and c. Then, it prints the output in the format "result c b a". In the first iteration, c=6, b=5, and a=4, so the output is "result: 6 5 4".

Submit
30. What output does the command seq 1 5 20 produce?

Explanation

The command "seq 1 5 20" produces a sequence of numbers starting from 1 and incrementing by 5 until it reaches or exceeds 20. Therefore, the output is a sequence of numbers that starts with 1 and adds 5 to each subsequent number, resulting in 1, 6, 11, and 16.

Submit
31. What information related to a user account is modified using the chage command?

Explanation

The chage command is used to modify the password expiry information related to a user account. It allows the system administrator to set the maximum number of days a password is valid, the minimum number of days required before the password can be changed, and other password-related policies. By using the chage command, the administrator can enforce password security measures and ensure that users regularly update their passwords to maintain system security.

Submit
32. Which environment variable is used by an X11 client to determine the X Server to connect to? (Specify only the variable name without any preceding commands or values.)

Explanation

The environment variable used by an X11 client to determine the X Server to connect to is "DISPLAY". This variable specifies the network address of the X Server and the display number to connect to. It is typically set in the format of "hostname:displaynumber.screennumber". The X11 client uses this variable to establish a connection with the appropriate X Server and display its graphical output on the specified screen.

Submit
33. Depending on a system's configuration, which of the following files can be used to enable and disable network services running on this host?

Explanation

The /etc/services file can be used to enable and disable network services running on the host. This file contains a list of well-known port numbers and the corresponding services that run on those ports. By modifying this file, administrators can control which services are allowed to run on the host.

Submit
34. The X11 configuration file xorg.conf is grouped into section. How is the content of the section SectionNamerepresented?

Explanation

The content of the section "SectionName" is represented by placing it between a line containing "Section "SectionName"" and a line containing "EndSection".

Submit
35. How do shadow passwords improve the password security in comparison to standard no-shadow password?

Explanation

Regular users do not having access to the password hashes of shadow passwords improves password security because it means that even if a regular user's account is compromised, the attacker will not be able to directly obtain the password. This adds an extra layer of protection as the password hashes are typically much harder to crack than plain text passwords.

Submit
36. If an alias ls exists, which of the following commands updates the alias to point to the command ls -l instead of the alias's current target?

Explanation

The correct answer is "alias ls='ls -l'". This command updates the alias "ls" to point to the command "ls -l" instead of the alias's current target.

Submit
37. Which command is used to set restrictions on the size of a core file that is created for a user when a program crashes?

Explanation

The ulimit command is used to set restrictions on the size of a core file that is created for a user when a program crashes. This command allows the user to limit the size of the core file, which is a file that contains the memory image of a crashed program. By setting restrictions on the size of the core file, the user can manage the disk space usage and prevent large core files from filling up the storage.

Submit
38. Which parameter is missing in the command ip link set ____ dev eth0 to activate the previously inactive network interface eth0? (Specify the parameter only without any command, path or additional options.)

Explanation

The missing parameter in the command "ip link set ____ dev eth0" is "up". This parameter is used to activate the previously inactive network interface eth0. By specifying "up", the command will enable the eth0 interface, allowing it to send and receive network traffic.

Submit
39. Which of the following commands sets the system's time zone to the Canadian Eastern Time?

Explanation

The ln -sf /usr/share/zoneinfo/Canada/Eastern /etc/localtime command creates a symbolic link between the time zone file for Canadian Eastern Time and the /etc/localtime file, effectively setting the system's time zone to Canadian Eastern Time.

Submit
40. Which of the following sections exists in a systemd timer unit?

Explanation

The correct answer is [Timer]. In a systemd timer unit, the [Timer] section exists. This section is used to configure the timing and scheduling of the timer. It allows the user to specify when and how often the timer should be triggered. By setting parameters such as OnActiveSec, OnBootSec, OnCalendar, etc., the user can define the desired timing for the timer unit.

Submit
41. On a Linux workstation, the route command takes a long time before printing out the routing table. Which of the following errors does that indicate?

Explanation

The correct answer suggests that the long time taken by the route command to print out the routing table indicates that DNS resolution may not be working. This is because the route command attempts to resolve names of routers and destinations by default, and if DNS resolution is not functioning properly, it may result in a timeout.

Submit
42. What is true about the Hop Limit field in the IPv6 header?

Explanation

Each router forwarding the packet decreases the field's value. In IPv6, the Hop Limit field is used to limit the number of hops (routers) that a packet can traverse before being discarded. Each time a packet is forwarded by a router, the Hop Limit field is decremented by 1. This ensures that packets do not endlessly loop in the network and helps prevent congestion. When the Hop Limit field reaches 0, the packet is discarded. Therefore, the correct answer is that each router forwarding the packet decreases the field's value.

Submit
43. Which of the following IPv4 networks are reserved by IANA for private address assignment and private routing? (Choose three.)

Explanation

The three IPv4 networks that are reserved by IANA for private address assignment and private routing are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These address ranges are designated for use in private networks and are not routable on the public internet. The 127.0.0.0/8 network is reserved for loopback addresses, which are used for testing network connectivity on a local machine. The 169.255.0.0/16 network is reserved for Automatic Private IP Addressing (APIPA) and is used when a device cannot obtain an IP address from a DHCP server.

Submit
44. Which of the following commands should be executed when starting a login shell in order to change the language of messages for an internationalized program to Portuguese (pt)?

Explanation

The correct answer is to execute the command "export LC_MESSAGES=“pt”". This command sets the LC_MESSAGES environment variable to "pt", which is the language code for Portuguese. This will change the language of messages for internationalized programs to Portuguese.

Submit
45. What is the purpose of TCP wrapper?

Explanation

The purpose of TCP wrapper is to limit access to a network service. TCP wrapper is a security feature that acts as a filter between a network service and the internet. It allows administrators to control which hosts or networks are allowed to connect to a particular service. By specifying access rules in the TCP wrapper configuration file, administrators can restrict access to only authorized users or networks, thereby enhancing the security of the network service.

Submit
46. Which of the following situations is observed and corrected by an NTP client?

Explanation

An NTP client is responsible for observing and correcting the skew in time between the system clock and the reference clock. The reference clock is a highly accurate time source that the NTP client uses to synchronize the system clock. By comparing the time from the reference clock with the time on the system clock, the NTP client can determine and correct any discrepancies or drift in time. This ensures that the system clock remains accurate and synchronized with the reference clock.

Submit
47. How can a specific user be prevented from scheduling tasks with at?

Explanation

By adding the specific user to the /etc/at.denyfile, the user is explicitly denied permission to schedule tasks using the at command. The /etc/at.denyfile contains a list of users who are not allowed to use the at command. Therefore, adding the specific user to this file will prevent them from scheduling tasks with at.

Submit
48. Given the following user's crontab entry: 15 14 * * 1-5 /usr/local/bin/example.sh When will the script /usr/local/bin/example.shbe executed?

Explanation

The crontab entry "15 14 * * 1-5" specifies that the script /usr/local/bin/example.sh will be executed at 14:15 local time on Monday to Friday. The numbers "15" and "14" represent the minute and hour respectively, while the asterisks indicate that the script can be executed on any day of the month and any month of the year. The "1-5" represents Monday to Friday. Therefore, the script will run at 14:15 local time, Monday to Friday.

Submit
49. What can be specified with useradd? (Choose two.)

Explanation

The useradd command can be used to specify the absolute path to the user's home directory and the numeric user ID (UID) of the user.

Submit
50. Which of the following steps prevents a user from obtaining an interactive login session?

Explanation

Running the command chsh –s /bin/false with the user name prevents a user from obtaining an interactive login session. This command changes the user's shell to /bin/false, which is a non-functional shell that does not allow any commands to be executed. As a result, when the user tries to log in, they will immediately be logged out without being able to access the system interactively.

Submit
51. When using X11 forwarding in SSH, what environment variable is automatically set in the remote shell in order to help applications to connect to the correct X11 server? (Specify only the environment variable without any additional commands or values.)

Explanation

When using X11 forwarding in SSH, the environment variable "DISPLAY" is automatically set in the remote shell. This variable helps applications to connect to the correct X11 server by specifying the network address and display number of the X11 server. It allows the applications to know where to send their graphical output and receive input from the user.

Submit
52. Which of the following are syslog facilities? (Choose two.)

Explanation

The correct answer is local5 and mail. Syslog facilities are used to categorize log messages based on their source or purpose. The local5 facility is commonly used for local use messages, while the mail facility is used for mail system messages. The other options, accounting, postmaster, and remote, are not valid syslog facilities.

Submit
53. What is the purpose of the iconv command?

Explanation

The purpose of the iconv command is to convert files from one character set to another. It is used to transform the encoding of text files, allowing them to be read and processed correctly in different character sets.

Submit
54. What command, depending on its options, can display the open TCP connections, the routing tables, as well as network interface statistics? (Specify only the command without any path or parameters.)

Explanation

The command "netstat" can display various information related to network connections and statistics. Depending on the options used with the command, it can show open TCP connections, routing tables, and network interface statistics.

Submit
55. Which of the following statements is valid in the file /etc/nsswitch.conf?

Explanation

The statement "hosts: files dns" is valid in the file /etc/nsswitch.conf. This statement defines the order in which the system looks up host information. It first checks the local files (/etc/hosts) and then queries the DNS server.

Submit
56. Which of the following tasks can the date command accomplish? (Choose two.)

Explanation

The date command can accomplish the task of setting the system's date and time. It can also display the time in a specific format.

Submit
57. Which of the following commands puts the output of the command date into the shell variable mydate?

Explanation

The correct answer is "mydate=”$(date)”". This command uses the $(date) syntax to execute the date command and capture its output, which is then assigned to the mydate variable.

Submit
58. Which option in the chrony configuration file changes the initial interval of polls to a NTP server in order to speed up the initial synchronization?

Explanation

The option "iburst" in the chrony configuration file changes the initial interval of polls to a NTP server in order to speed up the initial synchronization. It sends a burst of eight packets instead of the usual one packet, which helps to quickly establish synchronization with the server. This is useful when the system clock is far from the correct time and needs to be synchronized quickly.

Submit
59. Which of the following comparison operators for test work on elements in the file system? (Choose two.)

Explanation

The comparison operators -d and -f work on elements in the file system. The -d operator checks if a file is a directory, while the -f operator checks if a file is a regular file. These operators are commonly used in shell scripting to perform conditional checks on files and directories.

Submit
60. Given the following excerpt of the sudo configuration: Jane ANY=NOPASSWD: /bin/kill, /bin/id, PASSWD: /sbin/fdisk Which of the following statements are true? (Choose three.)

Explanation

The given excerpt of the sudo configuration allows Jane to run /sbin/fdisk after specifying her password. It also allows her to run /bin/kill without specifying a password and /bin/id without specifying her password.

Submit
61. Which of the following commands preloads and manages existing SSH keys that are used for automatic authentication while logging in to order machines using SSH?

Explanation

The correct answer is ssh-keygen. The ssh-keygen command is used to generate, manage, and manipulate SSH keys. It can be used to create a new SSH key pair, convert keys to different formats, and even change the passphrase of an existing key. However, it does not directly handle the authentication process for logging into remote machines using SSH. That is the role of the ssh-agent, which is responsible for managing the keys and providing them to the SSH client for authentication.

Submit
62. What information is shown by the echo $? command?

Explanation

The "echo $?" command shows the exit value of the command executed immediately before the echo command.

Submit
63. Which of the following is true about IPv6?

Explanation

IPv6 no longer supports broadcast addresses. In IPv4, broadcast addresses were used to send a packet to all devices on a network. However, in IPv6, multicast addresses are used instead. Multicast addresses allow a packet to be sent to a specific group of devices, rather than all devices on a network. This change in addressing is one of the key differences between IPv4 and IPv6.

Submit
64. Which of the following protocols is designed to access the video card output of a virtual machine?

Explanation

SPICE (Simple Protocol for Independent Computing Environments) is a protocol that is designed to access the video card output of a virtual machine. It allows users to view and interact with the graphical desktop of a virtual machine remotely. SPICE provides high-quality video and audio streaming, as well as support for USB redirection and file transfers. It is commonly used in virtualization platforms such as QEMU and VirtualBox to enhance the user experience when accessing virtual machines.

Submit
65. Which of the following commands shows all active systemd timers?

Explanation

The correct answer is "systemctl list-timers". This command is used to display all active systemd timers. It provides information about the timers, including their unit names, next run time, and the time left until the next run.

Submit
66. Which of the following nmcli subcommands exist? (Choose two.)

Explanation

The nmcli command is a command-line tool for managing NetworkManager, which is a software utility used for configuring and managing network connections on Linux systems. The nmcli device subcommand is used to display information about network devices, such as Ethernet or wireless interfaces. The nmcli connection subcommand is used to manage network connections, including creating, editing, and deleting connections. Therefore, the correct answers are nmcli device and nmcli connection.

Submit
67. Which command makes the shell variable named VARIABLE visible to subshells?

Explanation

The correct answer is "export VARIABLE". The export command is used to make shell variables visible to subshells. When a variable is exported, it becomes part of the environment of any subshells that are created. This means that the variable can be accessed and used by any commands or scripts running in those subshells.

Submit
68. Which command is used to sync the hardware clock to the system clock? (Specify only the command without any path or parameters.)

Explanation

The command "hwclock" is used to sync the hardware clock with the system clock. This command ensures that the time on the hardware clock matches the time on the system clock. By using this command, any discrepancies between the two clocks can be corrected, ensuring accurate timekeeping on the system.

Submit
69. Which of the following is a valid IPv6 address?

Explanation

not-available-via-ai

Submit
70. Which of the following commands configure network interfaces based on the system's existing distribution-specific configuration files? (Choose two.)

Explanation

The commands "ifdown" and "ifup" configure network interfaces based on the system's existing distribution-specific configuration files. "ifdown" is used to bring down a network interface, disabling its functionality, while "ifup" is used to bring up a network interface, enabling its functionality. Both commands read the configuration files specific to the distribution and apply the necessary settings to the network interface accordingly.

Submit
71. What is true about the file /etc/localtime?

Explanation

The file /etc/localtime is either a symlink to or a copy of a timezone information file such as /usr/share/zoneinfo/Europe/Berlin. This file is responsible for storing the timezone information for the system. By linking or copying the appropriate timezone information file to /etc/localtime, the system can accurately determine and display the local time.

Submit
72. Which command included in systemd supports selecting messages from the systemd journal by criteria such as time or unit name? (Specify only the command without any path or parameters.)

Explanation

The command "journalctl" supports selecting messages from the systemd journal by criteria such as time or unit name. It allows users to filter and view logs based on specific time frames or specific units, making it easier to search for and analyze relevant log messages. This command is a powerful tool for troubleshooting and monitoring system events.

Submit
73. Which of the following options in the chrony configuration file define remote time sources? (Choose two.)

Explanation

In the chrony configuration file, the options "pool" and "server" are used to define remote time sources. The "pool" option allows the system to synchronize with a group of remote servers, while the "server" option specifies a specific remote server to synchronize with. These options are important for accurately synchronizing the system's time with reliable external sources.

Submit
74. Which of the following files assigns a user to its primary group?

Explanation

The correct answer is /etc/passwd. The /etc/passwd file is a text file that contains essential information about user accounts on a Unix-like operating system. It includes the username, encrypted password, user ID, group ID, home directory, and shell of each user. The group ID in this file determines the primary group of a user. Therefore, /etc/passwd is the file that assigns a user to its primary group.

Submit
75. Which of the following statements about systemd-journald are true? (Choose three.)

Explanation

The correct answer is that systemd-journald can pass log messages to syslog for further processing, it maintains metadata such as _UID or _PID for each message, and it supports syslog facilities such as kern, user, and auth. This means that systemd-journald is compatible with syslog and can be installed on a system using regular syslog. It also processes messages from other tools, not just systemd.

Submit
76. Why is the correct configuration of a system's time zone important?

Explanation

The correct configuration of a system's time zone is important because the conversion of Unix timestamps to local time relies on the time zone configuration. Unix timestamps are a way to represent time as a single number, and the conversion to local time requires knowledge of the time zone in order to accurately determine the corresponding date and time. Therefore, if the time zone is not correctly configured, the conversion of Unix timestamps to local time will be incorrect, leading to inaccurate time-related operations and calculations.

Submit
77. What is true regarding the statement beginning with #! that is found in the first line of script? (Choose two.)

Explanation

The #! (shebang) at the beginning of a script triggers the installation of the script's interpreter and specifies the path and arguments of the interpreter used to run the script. This allows the script to be executed by the correct interpreter and ensures that the script is interpreted correctly. The other options are incorrect: it does not prevent the script from being executed, define the character encoding, or act as a comment.

Submit
78. Which of the following statements is true regarding systemd timer units?

Explanation

not-available-via-ai

Submit
79. On a system using systemd-journald, which of the following commands add the message Howdy to the system log? (Choose two.)

Explanation

The correct answers are "journalctl add Howdy" and "logger Howdy".

"journalctl add Howdy" is the correct command to add the message "Howdy" to the system log using systemd-journald.

"logger Howdy" is also a correct command to add the message "Howdy" to the system log. The logger command is used to send messages to the system log, and in this case, it will add the message "Howdy".

Submit
80. Which of the following commands finds all files owned by root that have the SetUID bit set?

Explanation

The correct answer is "find / -user root -perm -4000". This command uses the "find" utility to search for files owned by the user "root" and have the SetUID bit set. The "-user root" option specifies the owner of the files to be "root", and the "-perm -4000" option specifies that the files should have the SetUID bit set. This command will search the entire file system starting from the root directory ("/") to find the desired files.

Submit
81. What is true about the following command? nmcli device wifi connect WIFIoI

Explanation

The given command "nmcli device wifi connect WIFIoI" creates a new wifi connection named WIFIoI and activates it using NetworkManager.

Submit
82. Which of the following are valid host addresses for the subnet 203.0.113.64/28? (Choose two.)

Explanation

The subnet 203.0.113.64/28 has a subnet mask of 255.255.255.240, which means it has a block size of 16. The valid host addresses within this subnet range from 203.0.113.65 to 203.0.113.78. Therefore, 203.0.113.78 and 203.0.113.65 are the valid host addresses for this subnet.

Submit
83. Which of the following keywords can be used in the file /etc/resolv/conf? (Choose two.)

Explanation

The keywords "search" and "nameserver" can be used in the file /etc/resolv.conf. The "search" keyword is used to specify the domain search list for DNS resolution, allowing users to enter short names instead of fully qualified domain names. The "nameserver" keyword is used to specify the IP address of a DNS server that will be used to resolve domain names. These keywords are important for configuring DNS settings on a system.

Submit
84. Which of the following commands will delete the default gateway from the system's IP routing table? (Choose two.)

Explanation

The correct answer is "route del default" and "ip route del default". These two commands are used to delete the default gateway from the system's IP routing table. The "route del default" command is used in Linux and Unix systems, while the "ip route del default" command is used in newer Linux systems. Both commands remove the default gateway entry from the routing table, allowing the system to find an alternative route for outgoing network traffic.

Submit
85. Which of the following files is not read directly by a Bash login shell?

Explanation

The file ~/.bashrc is not read directly by a Bash login shell. The ~/.bashrc file is read by non-login interactive shells, which means it is executed when a new terminal window is opened or a new shell session is started. On the other hand, the ~/.bash_profile, ~/.bash_login, ~/.profile, and /etc/profile files are read directly by a Bash login shell. These files are executed when a user logs in to the system and are used to set up the environment for the user's session.

Submit
86. What is true about the file .profilein a user's home directory?

Explanation

The file .profile in a user's home directory must be readable for its owner only. This means that only the user who owns the file can read its contents. This is important for maintaining the security and privacy of the user's personal configuration settings and environment variables. Other users on the system should not be able to access or view the contents of the .profile file.

Submit
87. Which of the following getentinvocations lists all existing users?

Explanation

The correct answer is "getent passwd". The getent command is used to query the Name Service Switch (NSS) databases, and the passwd database specifically contains information about user accounts. By running "getent passwd", all existing users on the system will be listed. The other options listed do not correspond to valid getent invocations for listing users.

Submit
88. Which character in the password field of /etc/passwd is used to indicate that the encrypted password is stored in /etc/shadow?

Explanation

The character "x" in the password field of /etc/passwd is used to indicate that the encrypted password is stored in /etc/shadow. The /etc/passwd file contains user account information, including the user's username, user ID, group ID, home directory, and the location of the user's encrypted password. In order to enhance security, the actual encrypted password is stored in the /etc/shadow file, while the /etc/passwd file contains a placeholder character "x" to indicate that the password is stored in the shadow file.

Submit
89. 36.Which of the following entries in /etc/syslog.conf writes all mail related events to the file /var/log/maillog and sends all critical events to the remote server logger.example.com?

Explanation

The correct answer is "mail.* /var/log/maillog" because it uses the wildcard "*" to match all events related to mail and directs them to the file /var/log/maillog. Additionally, it specifies that all critical events should be sent to the remote server logger.example.org.

Submit
90. Which command is used to set the hostname of the local system? (Specify only the command without any path or parameters.)

Explanation

The command "hostname" is used to set the hostname of the local system. This command allows users to change or set the name of the system. By running the "hostname" command followed by the desired hostname, the system's name will be updated accordingly.

Submit
91. Which file is processed by newaliases? (Specify the full name of the file, including path.)

Explanation

The file processed by newaliases is located at /etc/mail/aliases. This file contains a list of email aliases, which are alternate email addresses that can be used to deliver mail to the same mailbox. When newaliases is executed, it reads this file and updates the mail aliases database, allowing the system to route incoming mail correctly based on the aliases defined in the file.

Submit
92. Which of the following commands lists all defines variables and functions within Bash?

Explanation

The set command is used in Bash to display all defined variables and functions. It lists all the variables and functions that have been set in the current session. This command is useful for checking the current state of variables and functions in the Bash environment.

Submit
93. What command is used to add OpenSSH private keys to a running ssh-agent instance? (Specify the command name only without any path.)

Explanation

The command "ssh-add" is used to add OpenSSH private keys to a running ssh-agent instance. This command allows the user to add their private keys to the ssh-agent, which is a program that holds private keys used for public key authentication. By using "ssh-add", the user can securely store their private keys in the ssh-agent and conveniently access them when connecting to remote servers using SSH.

Submit
94. Which command included in NetworkManager is a curses application which provides easy acces to the NetworkManager on the command line? (Specify only the command without any path or parameters.)

Explanation

Nmtui is a command included in NetworkManager that is a curses application. It provides easy access to the NetworkManager on the command line. This means that users can use nmtui to manage their network connections and settings using a simple and intuitive interface in the terminal.

Submit
95. Which command, available with all sendmail-compatible MTAs, is used to list the contents of the MTA's mail queue? (Specify only the command without any path or parameters.)

Explanation

The command "mailq" is used to list the contents of the MTA's mail queue. It is available with all sendmail-compatible MTAs. By running this command, users can view information about the emails in the queue, such as the sender, recipient, and status of each message. This can be useful for troubleshooting email delivery issues or monitoring the MTA's performance.

Submit
96. Which file contains the data of the last change of a user's password?

Explanation

The file /etc/shadow contains the data of the last change of a user's password. This file is a crucial part of the Linux operating system as it stores encrypted passwords and other password-related information for user accounts. It is only accessible by the root user to ensure the security of the system.

Submit
97. Which of the following fields can be found in the /etc/groupfile? (Choose two.)

Explanation

The /etc/group file is a system file in Unix-like operating systems that stores information about user groups. It contains the name of the group and the list of users that belong to that group. Therefore, the correct answer is "The list of users that belong to the group" and "The name of the group."

Submit
98. The presence of what file will temporarily prevent all users except root from logging into a system? (Specify the full name of the file, including path.)

Explanation

The file "/sbin/nologin" is used to temporarily prevent all users except the root user from logging into a system. When this file is set as the login shell for a user, it will display a message stating that the user is not allowed to login. This can be useful in situations where system maintenance or security updates need to be performed, and only the root user should have access to the system.

Submit
99. Which of the commands below might have produced the following output?

Explanation

The given output might have been produced by the command "dig www.example.org".

Submit
100. Which of the following environment variables can be defined in locale.conf? (Choose two.)

Explanation

The environment variables that can be defined in locale.conf are LC_ALL and LC_TIME. LC_ALL is used to set the value for all locale categories, while LC_TIME is specifically used to set the value for the time-related locale category.

Submit
101. Which of the following changes may occur as a consequence of using the command ip? (Choose three.)

Explanation

The command "ip" is used for managing network interfaces and IP addresses in a system. By using this command, network interfaces can be activated or deactivated, which means they may become active or inactive. Additionally, the command can be used to configure IP addresses, so it is possible that IP addresses may change as a consequence of using the command. Finally, the command can also be used to manage the routing table, so it is likely that the routing table may change after executing the "ip" command.

Submit
102. Which option in the /etc/ntp.conffile specifies an external NTP source to be queried for time information?(Specify only the option without any values or parameters.)

Explanation

The option "server" in the /etc/ntp.conf file specifies an external NTP source to be queried for time information. This option allows the system to synchronize its time with the specified NTP server, ensuring accurate timekeeping. By specifying the server option, the system can retrieve time information from the designated NTP server and adjust its own clock accordingly.

Submit
103. Which of the following commands display a list of jobs in the print queue? (Choose two.)

Explanation

The commands "lpstat" and "lpq" both display a list of jobs in the print queue. "lpstat" is a command that shows the status of print jobs in the queue, including information such as job ID, user, and printer. "lpq" is a command that lists the print queue, showing the order of jobs and their status.

Submit
104. Which mechanism does ssh use to interact with the SSH agent?

Explanation

The correct answer is evaluating environment variables such as SSH_AUTH_SOCK. SSH uses environment variables like SSH_AUTH_SOCK to interact with the SSH agent. These variables provide the necessary information about the location and communication channel of the SSH agent, allowing SSH to securely communicate with it. This mechanism ensures that SSH can access the necessary keys and credentials stored in the SSH agent for authentication purposes.

Submit
105. Which of the following states can NetworkManager show regarding the system's network connectivity? (Choose two.)

Explanation

NetworkManager can show the states "portal" and "full" regarding the system's network connectivity. The "portal" state indicates that the network requires authentication or a login page to access the internet. The "full" state indicates that the network is fully connected and has access to the internet without any restrictions or limitations.

Submit
106. Which of the following features are provided by SPICE? (Choose two.)

Explanation

SPICE (Simple Protocol for Independent Computing Environments) provides the features of connecting local USB devices to remote applications and downloading and locally installing applications from a remote machine. SPICE allows users to access and use USB devices connected to their local machine in remote applications, enhancing the usability and functionality of remote computing. Additionally, SPICE enables users to download and install applications from a remote machine onto their local machine, providing convenience and flexibility in accessing and utilizing remote resources.

Submit
107. After editing the TCP wrapper configuration to grant specific hosts access to a service, when do these changes become effective?

Explanation

The correct answer is that the new configuration becomes effective immediately for all new connections. This means that as soon as the TCP wrapper configuration is edited to grant specific hosts access to a service, the changes will take effect for any new connections made to that service. There is no need to restart the service or the system for the changes to be applied.

Submit
108. What is true regarding public and private SSH keys? (Choose two.)

Explanation

The private key must never be revealed to anyone because it is used to decrypt messages that are encrypted with the corresponding public key. If the private key is revealed, anyone can decrypt these messages and gain unauthorized access. To maintain the private key's confidentiality, the SSH key pair must be created by its owner, as they are the only ones who should have access to the private key. Several different public keys may be generated for the same private key, allowing multiple users to authenticate with the same private key.

Submit
109. If neither cron.allow nor cron.deny exist in /etc/, which of the following is true?

Explanation

If neither cron.allow nor cron.deny exist in /etc/, the default settings of /etc/crond.conf define whether or not user specific crontabs are generally allowed or not. This means that without any additional configuration, the system will follow the default settings defined in /etc/crond.conf.

Submit
110. Which of the following tasks are handled by a display manager like XDM or KMD? (Choose two.)

Explanation

A display manager like XDM or KDM handles the tasks of starting and preparing the desktop environment for the user, as well as handling the login of a user. Display managers are responsible for presenting the graphical login screen to the user, authenticating the user's credentials, and then launching the appropriate desktop environment once the user is logged in. They also provide options for selecting different desktop environments or window managers.

Submit
111. What command enables a network interface according to distribution-specific configuration, such as /etc/network/interfacesor /etc/sysconfig/network-scripts/ifcfg-eth0? (Specify only the command without any path or parameters.)

Explanation

The "up" command enables a network interface according to distribution-specific configuration files such as /etc/network/interfaces or /etc/sysconfig/network-scripts/ifcfg-eth0. This command is used to bring a network interface online and make it available for communication.

Submit
112. What option to useradd creates a new user's home directory and provisions it with a set of standard files? (Specify only the option name without any values or parameters.)

Explanation

The option "-D" is used with the "useradd" command to create a new user's home directory and provision it with a set of standard files. This option automatically creates the necessary files and directories in the user's home directory, such as the login shell, profile, and skeleton files.

Submit
113. What is true about NetworkManager on a Linux system that uses its distribution's mechanisms to configure network interfaces? (Choose two.)

Explanation

NetworkManager is a software utility on Linux systems that manages network connections. When a Linux system uses its distribution's mechanisms to configure network interfaces, NetworkManager must be explicitly enabled for each interface that it should manage. This means that NetworkManager will not automatically manage all network interfaces unless specifically configured to do so. Additionally, NetworkManager does not change interfaces that are already configured, meaning it will not override any existing network settings.

Submit
114. Which of the following commands display the number of bytes transmitted and received via the eth0 network interface? (Choose two.)

Explanation

The correct answer is "netstat -s -i eth0" and "ifconfig eth0". The "netstat -s -i eth0" command displays the statistics for the eth0 network interface, including the number of bytes transmitted and received. The "ifconfig eth0" command also provides information about the eth0 interface, including the number of bytes transmitted and received. Both commands can be used to monitor the network traffic on the eth0 interface.

Submit
115. Which parameter of the ssh command specifies the location of the private key used for login attempts?(Specify only the option name without any values or parameters.)

Explanation

The -i option of the ssh command specifies the location of the private key file used for authentication during login attempts. By using this option, you can point to a specific private key file, overriding the default key file that ssh would otherwise use. For example: ssh -i /path/to/private_key user@host.

Submit
116. Which command must be run after adding a new email alias to the configuration in order to make this change effective? (Specify the command without any path but including all required parameters.)

Explanation

The command "newaliases" must be run after adding a new email alias to the configuration in order to make this change effective.

Submit
117. Which of the following fields are available in the standard format of both the global /etc/crontab file as well as in user-specific crontab files? (Choose two.)

Explanation

In both the global /etc/crontab file and user-specific crontab files, the fields available are Minute and Effective group ID. The Minute field allows the user to specify the minute at which the command should be executed. The Effective group ID field represents the group ID under which the command will be executed. These two fields are common to both types of crontab files.

Submit
118. Which file, if present, must contain all users that are allowed to use the cron scheduling system? (Specify the full name of the file, including path.)

Explanation

The crontab file, located at /etc/crontab, must contain all users that are allowed to use the cron scheduling system. This file specifies the commands and scripts that are scheduled to run at specific times and intervals for each user. By editing the crontab file, users can define their own cron jobs and schedule them accordingly.

Submit
119. Which directory holds configuration files for xinetd services? (Specify the full path to the directory.)

Explanation

The directory /etc/xinetd.d/ holds the configuration files for xinetd services. This directory is the standard location for storing the individual configuration files for each service managed by xinetd. By placing the configuration files in this directory, xinetd can easily access and read the settings for each service, allowing for efficient management and control of the services.

Submit
120. What is the top-level directory which contains the configuration files for CUPS? (Specify the full path to the directory.)

Explanation

The top-level directory that contains the configuration files for CUPS is "/etc/cups/". The specific configuration file within this directory is "cups-files.conf".

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
  • Dec 29, 2020
    Quiz Created by
    Themes
Cancel
  • All
    All (120)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which of the following commands can be used to limit the amount of...
Which if the following tools, used for DNS debugging, reports not only...
On a machine running several X servers, how do programs identify the...
What command list the aliases defined in the current Bash shell?...
Which file inside the CUPS configuration directory contains the...
How does the ping command work by default?
What is the purpose of a screen reader?
Which of the following statements is true if the UID of a regular user...
Which of the following commands lists all queued print jobs?
What output does the command seq 10 produce?
Which of the following commands can identify the PID od a process...
What is true regarding the file ~/.forward?
Which of the following is true regarding the command sendmail?
Which standardized TCP port is used by HTTPS services?
What does the term Braille Display refer to?
How many IP addresses can be used for unique hosts inside the IPv4...
Which of the following information is stored in /etc/shadowfor each...
Which configuration file contains the default options for SSH clients?
Which of the following configuration files should be modified to...
What is the systemd journal stored?
Which of the following connection types, as seen in nmcli connection...
Which of the following commands is used to rotate, compress, and mail...
Which of the following commands displays all environment and shell...
Which of the following parameters are used for journalctl to limit the...
Which of the following protocols is related to the term open relay?
What information is provided by the echo $$ command?
What is a purpose of an SSH host key?
Given the following routing table: ...
What output is produced by the following command sequence? ...
What output does the command seq 1 5 20 produce?
What information related to a user account is modified using the chage...
Which environment variable is used by an X11 client to determine the X...
Depending on a system's configuration, which of the following files...
The X11 configuration file xorg.conf is grouped into section. ...
How do shadow passwords improve the password security in comparison to...
If an alias ls exists, which of the following commands updates the...
Which command is used to set restrictions on the size of a core file...
Which parameter is missing in the command ...
Which of the following commands sets the system's time zone to the...
Which of the following sections exists in a systemd timer unit?
On a Linux workstation, the route command takes a long time before...
What is true about the Hop Limit field in the IPv6 header?
Which of the following IPv4 networks are reserved by IANA for private...
Which of the following commands should be executed when starting a...
What is the purpose of TCP wrapper?
Which of the following situations is observed and corrected by an NTP...
How can a specific user be prevented from scheduling tasks with at?
Given the following user's crontab entry: ...
What can be specified with useradd? (Choose two.)
Which of the following steps prevents a user from obtaining an...
When using X11 forwarding in SSH, what environment variable is...
Which of the following are syslog facilities? (Choose two.)
What is the purpose of the iconv command?
What command, depending on its options, can display the open TCP...
Which of the following statements is valid in the file...
Which of the following tasks can the date command accomplish? (Choose...
Which of the following commands puts the output of the command date...
Which option in the chrony configuration file changes the initial...
Which of the following comparison operators for test work on elements...
Given the following excerpt of the sudo configuration: ...
Which of the following commands preloads and manages existing SSH keys...
What information is shown by the echo $? command?
Which of the following is true about IPv6?
Which of the following protocols is designed to access the video card...
Which of the following commands shows all active systemd timers?
Which of the following nmcli subcommands exist? (Choose two.)
Which command makes the shell variable named VARIABLE visible to...
Which command is used to sync the hardware clock to the system clock?...
Which of the following is a valid IPv6 address?
Which of the following commands configure network interfaces based on...
What is true about the file /etc/localtime?
Which command included in systemd supports selecting messages from the...
Which of the following options in the chrony configuration file define...
Which of the following files assigns a user to its primary group?
Which of the following statements about systemd-journald are true?...
Why is the correct configuration of a system's time zone important?
What is true regarding the statement beginning with #! that is found...
Which of the following statements is true regarding systemd timer...
On a system using systemd-journald, which of the following commands...
Which of the following commands finds all files owned by root that...
What is true about the following command? ...
Which of the following are valid host addresses for the subnet...
Which of the following keywords can be used in the file...
Which of the following commands will delete the default gateway from...
Which of the following files is not read directly by a Bash login...
What is true about the file .profilein a user's home directory?
Which of the following getentinvocations lists all existing users?
Which character in the password field of /etc/passwd is used to...
36.Which of the following entries in /etc/syslog.conf writes all mail...
Which command is used to set the hostname of the local system?...
Which file is processed by newaliases? (Specify the full name of the...
Which of the following commands lists all defines variables and...
What command is used to add OpenSSH private keys to a running...
Which command included in NetworkManager is a curses application which...
Which command, available with all sendmail-compatible MTAs, is used to...
Which file contains the data of the last change of a user's password?
Which of the following fields can be found in the /etc/groupfile?...
The presence of what file will temporarily prevent all users except...
Which of the commands below might have produced the following output?
Which of the following environment variables can be defined in...
Which of the following changes may occur as a consequence of using the...
Which option in the /etc/ntp.conffile specifies an external NTP source...
Which of the following commands display a list of jobs in the print...
Which mechanism does ssh use to interact with the SSH agent?
Which of the following states can NetworkManager show regarding the...
Which of the following features are provided by SPICE? (Choose two.)
After editing the TCP wrapper configuration to grant specific hosts...
What is true regarding public and private SSH keys? (Choose two.)
If neither cron.allow nor cron.deny exist in /etc/, which of the...
Which of the following tasks are handled by a display manager like XDM...
What command enables a network interface according to...
What option to useradd creates a new user's home directory and...
What is true about NetworkManager on a Linux system that uses its...
Which of the following commands display the number of bytes...
Which parameter of the ssh command specifies the location of the...
Which command must be run after adding a new email alias to the...
Which of the following fields are available in the standard format of...
Which file, if present, must contain all users that are allowed to use...
Which directory holds configuration files for xinetd services?...
What is the top-level directory which contains the configuration files...
Alert!

Advertisement