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,002,807
| Attempts: 755
SettingsSettings
Please wait...
  • 1/120 Questions

    Which of the following commands can be used to limit the amount of memory a user may use?

    •  umask
    •  usermod
    •  passwd
    •  ulimit
    •  chage
Please wait...
The Ultimate Linux Commands And Networking Test - Quiz
About This 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 connections, and DNS debugging, crucial for IT professionals.


Quiz Preview

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

    •  dnsq

    •  hostname

    •  dig

    •  dnslookup

    •  zoneinfo

    Correct Answer
    A.  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.

    Rate this question:

  • 3. 

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

    • By a fixed UUID that is defined in the X11 configuration file.

    • By a display name like: 1.

    • By the name of the user that runs the X server like x11: bob.

    • By a device name like /dev/X11/xservers/1.

    • By a unique IPv6 address from the fe80::/64subnet.

    Correct Answer
    A. By a display name like: 1.
    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.

    Rate this question:

  • 4. 

    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.

    Rate this question:

  • 5. 

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

    •  cups-devices.conf

    •  snmp.conf

    •  printers.conf

    •  printcap.conf

    •  cupsd.conf

    Correct Answer
    A.  printers.conf
    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.

    Rate this question:

  • 6. 

    How does the ping command work by default?

    • Is sends an ICMP Echo Request to a remote host and waits to receive an ICMP Echo Response in return.

    • It sends an ARP request to a remote host and waits to receive an ARP response in return.

    • It sends a TCP SYN packet to a remote host and waits to receive an TCP ACK response in return.

    • Is sends a broadcast packet to all hosts on the net and waits to receive, among others, a response from the target system.

    • It sends a UDP packet to port 0 of the remote host and waits to receive a UDP error response in return.

    Correct Answer
    A. Is sends an ICMP Echo Request to a remote host and waits to receive an ICMP Echo Response in return.
    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.

    Rate this question:

  • 7. 

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

    • UID have precedence over GIDs, therefore the user is available while the group doesn’t.

    • The user as well as the group are not available to avoid ambiguity due to the ID conflict.

    • UIDs and GIDs are independent of each other, therefore the user as well as the group are still available.

    • The user is the only member of the group, even if the group configuration contains other members.

    • GIDs have precedence over UIDs, therefore the group is available while the user isn’t.

    Correct Answer
    A. 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.

    Rate this question:

  • 8. 

    Which of the following commands lists all queued print jobs?

    •  lpd

    •  lpr

    •  lp

    •  lsq

    •  lpq

    Correct Answer
    A.  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.

    Rate this question:

  • 9. 

    What is the purpose of a screen reader?

    • It manages virtual keyboards on touch screen displays.

    • It reads the parameters of the attached monitors and creates an appropriate X11 configuration.

    • It displays lines and markers to help people use speed reading techniques.

    • It manages and displays files that contain e-books.

    • It reads displayed text to accommodate the needs of blind or visually impaired people.

    Correct Answer
    A. It reads displayed text to accommodate the needs of blind or visually impaired people.
    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.

    Rate this question:

  • 10. 

    What output does the command seq 10 produce?

    • A continuous stream of numbers increasing in increments of 10 until the command is stopped.

    • It creates no output because a second parameter is missing.

    • The number 0 through 9 with one number per line.

    • The number 10 to standard output.

    • The numbers 1 through 10 with one number per line.

    Correct Answer
    A. 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.

    Rate this question:

  • 11. 

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

    •  ptrace

    •  strace

    •  debug

    •  lsof

    •  nessus

    Correct Answer
    A.  lsof
    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.

    Rate this question:

  • 12. 

    What is true regarding the file ~/.forward?

    • When configured correctly ~/.forward can be used to forward each incoming mail to one or more other recipients.

    • After editing ~/.forward the user must run newaliases to make the mail server aware of the changes.

    • Using ~/.forward, root may configure any email address whereas all other users may configure only their own addresses.

    • As ~/.forward is owned by the MTA and not writable by the user, it must be edited using the

    • By default, only ~/.forward files of users in the group mailq are processed while all other user’s ~/.forward files are ignored.

    Correct Answer
    A. When configured correctly ~/.forward can be used to forward each incoming mail to one or more other recipients.
    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.

    Rate this question:

  • 13. 

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

    • 6

    • 14

    • 30

    • 62

    • 126

    Correct Answer
    A. 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.

    Rate this question:

  • 14. 

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

    • The timestamp of the user’s last login

    • The user’s private SSH keys

    • The hashed password of the user

    • The numerical user ID (UID)

    • The path to the user’s home directory

    Correct Answer
    A. 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.

    Rate this question:

  • 15. 

    Which of the following is true regarding the command sendmail?

    • With any MTA, the sendmail command must be run periodically by the cron daemon.

    • When using systemd, sendmail is an alias to relayctl.

    • The sendmail command prints the MTA’s queue history of which mails have been sent successfully.

    • It is only available when the sendmail MTA is installed.

    • All common MTAs, including Postfix and Exim, provide a sendmail command.

    Correct Answer
    A. All common MTAs, including Postfix and Exim, provide a sendmail command.
    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.

    Rate this question:

  • 16. 

    Which standardized TCP port is used by HTTPS services?

    • 25

    • 80

    • 8080

    • 443

    • 636

    Correct Answer
    A. 443
    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.

    Rate this question:

  • 17. 

    What does the term Braille Display refer to?

    • A standardized high contract graphical theme for desktop applications?

    • A Linux desktop environment similar to KDE and GNOME.

    • A legacy display technology superseded by LCD.

    • A physical representation of characters using small dots.

    • A standard file format for data exchange, similar to XML.

    Correct Answer
    A. A physical representation of characters using small dots.
    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.

    Rate this question:

  • 18. 

    Which configuration file contains the default options for SSH clients?

    •  /etc/ssh/sshd_config

    •  /etc/ssh/ssh

    •  /etc/ssh/ssh_config

    •  /etc/ssh/client

    •  /etc/ssh/ssh_client

    Correct Answer
    A.  /etc/ssh/ssh_config
    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.

    Rate this question:

  • 19. 

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

    •  tcp

    •  ethernet

    •  wifi

    •  ipv6

    •  bridge

    Correct Answer(s)
    A.  ethernet
    A.  wifi
    A.  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.

    Rate this question:

  • 20. 

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

    •  logrotate

    •  striplog

    •  syslogd –-rotate

    •  rotatelog

    •  logger

    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.

    Rate this question:

  • 21. 

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

    •  getargs

    •  lsenv

    •  ls

    •  env

    •  lsshell

    Correct Answer
    A.  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.

    Rate this question:

  • 22. 

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

    •  /etc/profile

    •  /etc/bashrc

    •  ~/.bash_profile

    •  /etc/.bashrc

    •  /etc/shellenv

    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.

    Rate this question:

  • 23. 

    What is the systemd journal stored?

    • /var/jlog/and /var/jlogd/

    • /proc/log/and /proc/klog/

    • /run/log/journal/ or /var/log/journal/

    • /var/log/syslog.binor /var/log/syslog.jrn

    • /etc/systemd/journal/or /usr/lib/systemd/journal/

    Correct Answer
    A. /run/log/journal/ or /var/log/journal/
    Explanation
    The systemd journal is stored in either /run/log/journal/ or /var/log/journal/.

    Rate this question:

  • 24. 

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

    •  SMTP

    •  POP3

    •  NTP

    •  IMAP

    •  LDAP

    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.

    Rate this question:

  • 25. 

    What information is provided by the echo $$ command?

    • The process ID of the current shell.

    • The process ID for the following command.

    • The process ID of the last command executed.

    • The process ID of the last command which has been placed in the background.

    • The process ID of 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.

    Rate this question:

  • 26. 

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

    •  --since=

    •  --from=

    •  --until=

    •  --upto=

    •  --date=

    Correct Answer(s)
    A.  --since=
    A.  --until=
    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.

    Rate this question:

  • 27. 

    What is a purpose of an SSH host key?

    • It must be sent by any SSH client in addition to a user key in order to identify the client’s host.

    • It is root key by which all user SSH keys must be signed.

    • It provides the server’s identity information to connecting SSH clients.

    • It authenticates any user that logs into a remote machine from the key’s host.

    • It is used by system services like cron, syslog or a backup job to automatically connect to remote hosts.

    Correct Answer
    A. 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.

    Rate this question:

  • 28. 

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

    • It would be passed to the default router 192.168.178.1 on wlan0.

    • It would be directly transmitted on the device eth0.

    • It would be passed to the default router 255.255.255.0 on eth0.

    • It would be passed to the router 192.168.1.1 on eth0.

    • It would be directly transmitted on the device wlan0.

    Correct Answer
    A. It would be passed to the router 192.168.1.1 on eth0.
    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.

    Rate this question:

  • 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

    •  result: 6 5 4

    •  result: 1 2 3 4 5 6

    •  result: 3 4 5 6 2 1

    •  result: 6 5 4 3 2 1

    •  result: 3 2 1

    Correct Answer
    A.  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".

    Rate this question:

  • 30. 

    What output does the command seq 1 5 20 produce?

    • 1 5 10 15

    • 1 6 11 16

    • 1 2 3 4

    • 2 3 4 5

    • 5 10 15 20

    Correct Answer
    A. 1 6 11 16
    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.

    Rate this question:

  • 31. 

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

    • Default ownership for new files

    • Group membership

    • Set of commands available to the user

    • Password expiry information

    • Default permissions for new files

    Correct Answer
    A. Password expiry information
    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.

    Rate this question:

  • 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.)

    Correct Answer
    DISPLAY
    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.

    Rate this question:

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

    •  /etc/profile

    •  /etc/xinetd.conf

    •  /etc/ports

    •  /etc/services

    •  /etc/host.conf

    Correct Answer
    A.  /etc/services
    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.

    Rate this question:

  • 34. 

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

    • It is placed in curly brackets as in Section SectionName {…}.

    • It is placed between the tags <Section name=“SectionName”>and </Section>.

    • It is placed between a line containing Section “SectionName”and a line containing EndSection.

    • It is placed after the row [SectionName].

    • It is placed after an initial unindented Section “SectionName” and must be indented by exactly one tab character.

    Correct Answer
    A. It is placed between a line containing Section “SectionName”and a line containing EndSection.
    Explanation
    The content of the section "SectionName" is represented by placing it between a line containing "Section "SectionName"" and a line containing "EndSection".

    Rate this question:

  • 35. 

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

    • Regular users do not have access to the password hashes of shadow passwords.

    • Every shadow password is valid for 45 days and must be changed afterwards.

    • The system’s host key is used to encrypt all shadow passwords.

    • Shadow passwords are always combined with a public key that has to match the user’s private key.

    • Shadow passwords are stored in plain text and can be checked for weak passwords.

    Correct Answer
    A. Regular users do not have access to the password hashes of shadow passwords.
    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.

    Rate this question:

  • 36. 

    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?

    • The local routing information may be corrupted and must be re-validated using a routing protocol.

    • One of the routers in the routing table is not available which causes the automatic router failure detection mechanism (ARF-D) to wait for a timeout.

    • There may accidentally be more than one default router in which case a default router election has to be done on the network in order to choose one router as the default.

    • The Linux Kernel Routing Daemon (LKRD) is not running and should be started using its init script or systemd unit.

    • DNS resolution may not be working as route by default tries to resolve names of routers and destinations and may run into a timeout.

    Correct Answer
    A. 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.

    Rate this question:

  • 37. 

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

    • The field is not changed during the transport of a package.

    • The field is transmitted within a hop-by-hop extension header.

    • Each router forwarding the packet increases the field’s value.

    • Each router forwarding the packet decreases the field’s value.

    • For multicast packages, the field’s value is always 1.

    Correct Answer
    A. 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.

    Rate this question:

  • 38. 

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

    • 10.0.0.0/8

    • 127.0.0.0/8

    • 169.255.0.0/16

    • 172.16.0.0/12

    • 192.168.0.0/16

    Correct Answer(s)
    A. 10.0.0.0/8
    A. 172.16.0.0/12
    A. 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.

    Rate this question:

  • 39. 

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

    •  export LANGUAGE=“pt”

    •  export LC_MESSAGES=“pt”

    •  export UI_MESSAGES=“pt”

    •  export MESSAGE=“pt”

    •  export ALL_MESSAGES=“pt”

    Correct Answer
    A.  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.

    Rate this question:

  • 40. 

    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?

    •  set ls=’ls -l’

    •  alias ls=’ls -l’

    •  alias --force ls=’ls -l’

    •  alias --update ls ls=’ls -l’

    •  realias ls=’ls -l’

    Correct Answer
    A.  alias ls=’ls -l’
    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.

    Rate this question:

  • 41. 

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

    •  core

    •  edquota

    •  quota

    •  ulimit

    •  ktrace

    Correct Answer
    A.  ulimit
    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.

    Rate this question:

  • 42. 

    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.)

    Correct Answer
    up
    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.

    Rate this question:

  • 43. 

    Which of the following commands sets the system’s time zone to the Canadian Eastern Time?

    •  localegen -t -f /usr/share/zoneinfo/Canada/Eastern > /etc/locate.tz

    •  tzconf /etc/localtime

    •  sysctl -w clock.tz=’Canada/Eastern’

    •  modprobe tz_ca_est

    •  ln -sf /usr/share/zoneinfo/Canada/Eastern /etc/localtime

    Correct Answer
    A.  ln -sf /usr/share/zoneinfo/Canada/Eastern /etc/localtime
    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.

    Rate this question:

  • 44. 

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

    • [Events]

    • [Timer]

    • [cron]

    • [Schedule]

    • [Trigger]

    Correct Answer
    A. [Timer]
    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.

    Rate this question:

  • 45. 

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

    • Commands the user can run using sudo.

    • The absolute path to the user’s home directory.

    • Which printers are available for the new user.

    • The SSH keys used to login to the new account.

    • The numeric user ID (UID) of the user.

    Correct Answer(s)
    A. The absolute path to the user’s home directory.
    A. 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.

    Rate this question:

  • 46. 

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

    • Setting the UID for the user to 0.

    • Running the command chsh –s /bin/false with the user name.

    • Removing the user from the group staff.

    • Adding the user to /etc/noaccess.

    • Creating a .nologin file in the user’s home directory.

    Correct Answer
    A. 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.

    Rate this question:

  • 47. 

    What is the purpose of TCP wrapper?

    • Manage and adjust bandwidth used by TCP services.

    • Bind a network service to a TCP port.

    • Encapsulate TCP messages in IP packets.

    • Add SSL support to plain text TCP services.

    • Limit access to a network service.

    Correct Answer
    A. 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.

    Rate this question:

  • 48. 

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

    • The skew in time between the system clock and the computer’s hardware clock.

    • The physical location and the time zone configuration.

    • Changes in the time zone of the current computer’s location.

    • Adjustment needed to support Daylight Saving Time.

    • The skew in time between the system clock and the reference clock.

    Correct Answer
    A. The skew in time between the system clock and the reference clock.
    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.

    Rate this question:

  • 49. 

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

    • By adding the specific user to the /etc/at.allowfile.

    • By adding the specific user to the [deny] section in the /etc/atd.conffile.

    • By adding the specific user to the nojobs group.

    • By adding the specific user to the /etc/at.denyfile.

    • By executing the atd --deny[user] command.

    Correct Answer
    A. By adding the specific user to the /etc/at.denyfile.
    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.

    Rate this question:

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
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.