1.
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.
2.
Which of the following is a valid IPv6 address?
Correct Answer
C. 2001:db8:3241::1
3.
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.)
Correct Answer
netstat
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.
4.
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.)
Correct Answer
nmtui
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.
5.
Which if the following tools, used for DNS debugging, reports not only the response from the name
sever but also details about the query?
Correct Answer
C. dig
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.
6.
Which of the following statements is valid in the file /etc/nsswitch.conf?
Correct Answer
E. hosts: files dns
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.
7.
Which of the following connection types, as seen in nmcli connection show, may exist in
NetworkManager? (Choose three.)
Correct Answer(s)
B. ethernet
C. wifi
E. bridge
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.
8.
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?
Correct Answer
E. DNS resolution may not be working as route by default tries to resolve names of routers and destinations and may run into a timeout.
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.
9.
What is true about the Hop Limit field in the IPv6 header?
Correct Answer
D. Each router forwarding the packet decreases the field’s value.
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.
10.
Which of the following nmcli subcommands exist? (Choose two.)
Correct Answer(s)
B. nmcli device
E. nmcli connection
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.
11.
Which of the following changes may occur as a consequence of using the command ip? (Choose
three.)
Correct Answer(s)
A. Network interfaces may become active or inactive.
D. IP addresses may change.
E. The routing table may change.
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.
12.
How many IP addresses can be used for unique hosts inside the IPv4 subnet 192.168.2.128/26?
Correct Answer
D. 62
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.
13.
Which of the following IPv4 networks are reserved by IANA for private address assignment and private
routing? (Choose three.)
Correct Answer(s)
A. 10.0.0.0/8
D. 172.16.0.0/12
E. 192.168.0.0/16
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.
14.
Which of the following commands configure network interfaces based on the system’s existing
distribution-specific configuration files? (Choose two.)
Correct Answer(s)
B. ifdown
E. Ifup
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.
15.
Which of the following statements is true if the UID of a regular user is identical to the GID of a group?
Correct Answer
C. UIDs and GIDs are independent of each other, therefore the user as well as the group are still available.
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.
16.
Which of the following information is stored in /etc/shadowfor each user?
Correct Answer
C. The hashed password of the 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.
17.
Which of the following commands shows all active systemd timers?
Correct Answer
D. systemctl list-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.
18.
Which of the following tasks can the date command accomplish? (Choose two.)
Correct Answer(s)
A. Set the system’s date and time.
E. Display time in a specific format.
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.
19.
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.)
Correct Answer(s)
crontab
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.
20.
What can be specified with useradd? (Choose two.)
Correct Answer(s)
B. The absolute path to the user’s home directory.
E. The numeric user ID (UID) of the user.
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.
21.
What is true about the file /etc/localtime?
Correct Answer
E. It is either a symlink to or a copy of a timezone information file such as /usr/share/zoneinfo/Europe/Berlin.
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.
22.
Which of the following statements is true regarding systemd timer units?
Correct Answer
E. Each systemd timer unit controls a specific systemd service unit.
23.
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.)
Correct Answer(s)
B. Minute
D. Effective group ID
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.
24.
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)?
Correct Answer
B. export LC_MESSAGES=“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.
25.
Which of the following files assigns a user to its primary group?
Correct Answer
C. /etc/passwd
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.
26.
Which of the following steps prevents a user from obtaining an interactive login session?
Correct Answer
B. Running the command chsh –s /bin/false with the user name.
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.
27.
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.)
Correct Answer
journalctl
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.
28.
Which of the following statements about systemd-journald are true? (Choose three.)
Correct Answer(s)
C. It can pass log messages to syslog for further processing.
D. It maintains metadata such as _UID or _PID for each message.
E. It supports syslog facilities such as kern, user, and auth.
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.
29.
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.)
Correct Answer(s)
newaliases
Explanation
The command "newaliases" must be run after adding a new email alias to the configuration in order to make this change effective.
30.
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?
Correct Answer
A. iburst
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.
31.
Which of the following commands is used to rotate, compress, and mail system logs?
Correct Answer
A. logrotate
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.
32.
Why is the correct configuration of a system’s time zone important?
Correct Answer
E. Because the conversion of Unix timestamps to local time relies on the time zone configuration.
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.
33.
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.)
Correct Answer
mailq
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.
34.
What is the top-level directory which contains the configuration files for CUPS? (Specify the full path to
the directory.)
Correct Answer
/etc/cups/ cups-files.conf
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".
35.
Which of the following commands lists all queued print jobs?
Correct Answer
E. lpq
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.
36.
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?
Correct Answer
D. mail.* /var/log/maillog
mail.crit @logger.example.org
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.
37.
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.)
Correct Answer
server
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.
38.
Which of the following protocols is related to the term open relay?
Correct Answer
A. SMTP
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.
39.
Which of the following commands displays all environment and shell variables?
Correct Answer
D. env
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.
40.
Which of the following comparison operators for test work on elements in the file system? (Choose
two.)
Correct Answer(s)
C. –d
D. –f
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.
41.
What information is provided by the echo $$ command?
Correct Answer
A. The process ID of the current shell.
Explanation
The echo $$ command provides the process ID of the current shell.
42.
Which command makes the shell variable named VARIABLE visible to subshells?
Correct Answer
E. export VARIABLE
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.
43.
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
Correct Answer
C. result: 3 4 5 6 2 1
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".
44.
Which of the following configuration files should be modified to globally set shell variables for all
users?
Correct Answer
A. /etc/profile
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.
45.
What output does the command seq 10 produce?
Correct Answer
E. The numbers 1 through 10 with one number per line.
Explanation
The command "seq 10" produces the numbers 1 through 10 with one number per line.
46.
What command list the aliases defined in the current Bash shell? (Specify only the command without any path or parameters.)
Correct Answer
alias
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.
47.
Which of the following commands can be used to limit the amount of memory a user may use?
Correct Answer
D. ulimit
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.
48.
What is a purpose of an SSH host key?
Correct Answer
C. It provides the server’s identity information to connecting SSH clients.
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.
49.
What is the purpose of TCP wrapper?
Correct Answer
E. Limit access to a network service.
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.
50.
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.)
Correct Answer(s)
C. Jane can run /sbin/fdiskafter specifying her password.
D. Jane can run /bin/kill without specifying a password.
E. Jane can run /bin/id without specifying her password.
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.