UNIX MCQs – Networking Basics (Part – 2)

UNIX Question and Answer – Networking Basics

UNIX MCQ – Multiple Choice Questions for exam, interview, and Entrance Test

1. Which command is used to display information about listening ports in UNIX?

a) netstat -l

b) ifconfig

c) arp -a

d) route

Answer: a) netstat -l

Explanation: The netstat -l command is used to display information about ports on which the system is listening for connections in UNIX.


2. What is the purpose of the ssh-keygen command in UNIX networking?

a) Configure network interfaces

b) Generate SSH key pairs

c) Display network statistics

d) Establish secure shell connections

Answer: b) Generate SSH key pairs

Explanation: The ssh-keygen command is used to generate SSH key pairs for secure authentication in UNIX.


3. Which TCP/IP protocol is used for translating domain names to IP addresses in UNIX?

a) DNS

b) FTP

c) SMTP

d) SNMP

Answer: a) DNS

Explanation: DNS (Domain Name System) is used for translating domain names to IP addresses in UNIX.


4. What is the purpose of the iptables command in UNIX networking?

a) Configure IP addresses

b) Display routing table

c) Manage firewall rules

d) Test network connectivity

Answer: c) Manage firewall rules

Explanation: The iptables command is used to configure and manage firewall rules in UNIX.


5. Which command is used to display information about network interfaces and routing tables in UNIX?

a) netstat -r

b) arp

c) ifconfig -a

d) route -n

Answer: d) route -n

Explanation: The route -n command is used to display information about routing tables in UNIX.


6. What is the purpose of the nmap command in UNIX networking?

a) Display network interface configuration

b) Scan network hosts and services

c) Query DNS servers

d) Establish remote shell connections

Answer: b) Scan network hosts and services

Explanation: The nmap command is used to scan network hosts and services, providing information about open ports and services in UNIX.


7. Which TCP/IP protocol is used for securely transferring files between hosts in UNIX?

a) FTPS

b) SFTP

c) SCP

d) FTP

Answer: c) SCP

Explanation: SCP (Secure Copy Protocol) is used for securely transferring files between hosts in UNIX.


8. What is the purpose of the ping command in UNIX networking?

a) Trace network routes

b) Test network connectivity

c) Display network interface configuration

d) Display DNS information

Answer: b) Test network connectivity

Explanation: The ping command is used to test network connectivity by sending ICMP echo request packets to a specified host in UNIX.


9. Which command is used to display the DNS resolver configuration in UNIX?

a) nslookup

b) cat /etc/resolv.conf

c) dig

d) host

Answer: b) cat /etc/resolv.conf

Explanation: The cat /etc/resolv.conf command is used to display the DNS resolver configuration file in UNIX.


10. What is the purpose of the ifdown command in UNIX networking?

a) Start a network interface

b) Stop a network interface

c) Configure a network interface

d) Test network connectivity

Answer: b) Stop a network interface

Explanation: The ifdown command is used to stop or deactivate a network interface in UNIX.


11. Which TCP/IP protocol is used for sending email messages between servers in UNIX?

a) SMTP

b) POP3

c) IMAP

d) HTTP

Answer: a) SMTP

Explanation: SMTP (Simple Mail Transfer Protocol) is used for sending email messages between servers in UNIX.


12. What is the purpose of the ifup command in UNIX networking?

a) Start a network interface

b) Stop a network interface

c) Configure a network interface

d) Test network connectivity

Answer: a) Start a network interface

Explanation: The ifup command is used to start or activate a network interface in UNIX.


13. Which command is used to display the ARP (Address Resolution Protocol) cache in UNIX?

a) arp -a

b) netstat -a

c) ifconfig

d) route -n

Answer: a) arp -a

Explanation: The arp -a command is used to display the ARP cache, which maps IP addresses to MAC addresses, in UNIX.


14. What is the purpose of the iptables command in UNIX networking?

a) Configure IP addresses

b) Display routing table

c) Manage firewall rules

d) Test network connectivity

Answer: c) Manage firewall rules

Explanation: The iptables command is used to configure and manage firewall rules in UNIX.


15. Which TCP/IP protocol is used for translating domain names to IP addresses in UNIX?

a) DNS

b) FTP

c) SMTP

d) SNMP

Answer: a) DNS

Explanation: DNS (Domain Name System) is used for translating domain names to IP addresses in UNIX.


16. What is the purpose of the nmap command in UNIX networking?

a) Display network interface configuration

b) Scan network hosts and services

c) Query DNS servers

d) Establish remote shell connections

Answer: b) Scan network hosts and services

Explanation: The nmap command is used to scan network hosts and services, providing information about open ports and services in UNIX.


17. Which TCP/IP protocol is used for securely transferring files between hosts in UNIX?

a) FTPS

b) SFTP

c) SCP

d) FTP

Answer: c) SCP

Explanation: SCP (Secure Copy Protocol) is used for securely transferring files between hosts in UNIX.


18. What is the purpose of the ping command in UNIX networking?

a) Trace network routes

b) Test network connectivity

c) Display network interface configuration

d) Display DNS information

Answer: b) Test network connectivity

Explanation: The ping command is used to test network connectivity by sending ICMP echo request packets to a specified host in UNIX.


19. Which command is used to display the DNS resolver configuration in UNIX?

a) nslookup

b) cat /etc/resolv.conf

c) dig

d) host

Answer: b) cat /etc/resolv.conf

Explanation: The cat /etc/resolv.conf command is used to display the DNS resolver configuration file in UNIX.


20. What is the purpose of the ifdown command in UNIX networking?

a) Start a network interface

b) Stop a network interface

c) Configure a network interface

d) Test network connectivity

Answer: b) Stop a network interface

Explanation: The ifdown command is used to stop or deactivate a network interface in UNIX.


21. Which TCP/IP protocol is used for sending email messages between servers in UNIX?

a) SMTP

b) POP3

c) IMAP

d) HTTP

Answer: a) SMTP

Explanation: SMTP (Simple Mail Transfer Protocol) is used for sending email messages between servers in UNIX.


22. What is the purpose of the ifup command in UNIX networking?

a) Start a network interface

b) Stop a network interface

c) Configure a network interface

d) Test network connectivity

Answer: a) Start a network interface

Explanation: The ifup command is used to start or activate a network interface in UNIX.


23. Which command is used to display the ARP (Address Resolution Protocol) cache in UNIX?

a) arp -a

b) netstat -a

c) ifconfig

d) route -n

Answer: a) arp -a

Explanation: The arp -a command is used to display the ARP cache, which maps IP addresses to MAC addresses, in UNIX.


24. What is the purpose of the iptables command in UNIX networking?

a) Configure IP addresses

b) Display routing table

c) Manage firewall rules

d) Test network connectivity

Answer: c) Manage firewall rules

Explanation: The iptables command is used to configure and manage firewall rules in UNIX.


25. Which TCP/IP protocol is used for translating domain names to IP addresses in UNIX?

a) DNS

b) FTP

c) SMTP

d) SNMP

Answer: a) DNS

Explanation: DNS (Domain Name System) is used for translating domain names to IP addresses in UNIX.


26. Which command is used to display detailed information about a specific network interface in UNIX?

a) netstat

b) ifconfig

c) arp

d) route

Answer: b) ifconfig

Explanation: The ifconfig command is used to display detailed information about a specific network interface, including IP address, MAC address, and more, in UNIX.


27. What is the purpose of the ssh-copy-id command in UNIX networking?

a) Configure network interfaces

b) Copy SSH public key to a remote host

c) Establish secure shell connections

d) Display network statistics

Answer: b) Copy SSH public key to a remote host

Explanation: The ssh-copy-id command is used to copy the SSH public key to a remote host’s authorized_keys file for passwordless authentication in UNIX.


28. Which TCP/IP protocol is used for securely transferring files between hosts in UNIX, providing encryption for data transfer?

a) FTPS

b) SFTP

c) SCP

d) FTP

Answer: b) SFTP

Explanation: SFTP (SSH File Transfer Protocol) is used for securely transferring files between hosts in UNIX, providing encryption for data transfer over SSH.


29. What is the purpose of the nslookup command in UNIX networking?

a) Display network interface configuration

b) Display DNS information

c) Display routing table

d) Configure network interfaces

Answer: b) Display DNS information

Explanation: The nslookup command is used to query DNS servers for detailed DNS information, such as IP address resolution, in UNIX.


30. Which command is used to display information about active network connections and listening ports in UNIX?

a) netstat -tuln

b) ifconfig

c) arp -a

d) route -n

Answer: a) netstat -tuln

Explanation: The netstat -tuln command is used to display information about active network connections and listening ports in UNIX.


31. What is the purpose of the traceroute command in UNIX networking?

a) Display network interface configuration

b) Trace the route taken by packets to a destination

c) Test network connectivity

d) Display DNS information

Answer: b) Trace the route taken by packets to a destination

Explanation: The traceroute command is used to trace the route taken by packets to a specified destination, showing each hop along the way in UNIX.


32. Which TCP/IP protocol is used for sending email messages between clients and servers in UNIX?

a) SMTP

b) POP3

c) IMAP

d) HTTP

Answer: a) SMTP

Explanation: SMTP (Simple Mail Transfer Protocol) is used for sending email messages between clients and servers in UNIX.


33. What is the purpose of the host command in UNIX networking?

a) Display network interface configuration

b) Query DNS servers for hostname resolution

c) Transfer files between hosts

d) Establish secure shell connections

Answer: b) Query DNS servers for hostname resolution

Explanation: The host command is used to query DNS servers for hostname resolution in UNIX.


34. Which command is used to display the MAC (Media Access Control) address of a specific network interface in UNIX?

a) macaddr

b) ifconfig -a

c) arp

d) netstat -i

Answer: b) ifconfig -a

Explanation: The ifconfig -a command is used to display detailed information about all network interfaces, including MAC addresses, in UNIX.


35. What is the purpose of the route add default command in UNIX networking?

a) Add a default gateway to the routing table

b) Display routing table

c) Remove a route from the routing table

d) Configure network interfaces

Answer: a) Add a default gateway to the routing table

Explanation: The route add default command is used to add a default gateway to the routing table in UNIX networking.


36. Which TCP/IP protocol is used for transferring files between hosts in UNIX, providing secure and encrypted file transfer?

a) FTPS

b) SFTP

c) SCP

d) FTP

Answer: c) SCP

Explanation: SCP (Secure Copy Protocol) is used for securely transferring files between hosts in UNIX, providing secure and encrypted file transfer.


37. What is the purpose of the iptables command in UNIX networking?

a) Configure IP addresses

b) Display routing table

c) Manage firewall rules

d) Test network connectivity

Answer: c) Manage firewall rules

Explanation: The iptables command is used to configure and manage firewall rules in UNIX.


38. Which TCP/IP protocol is used for translating domain names to IP addresses in UNIX?

a) DNS

b) FTP

c) SMTP

d) SNMP

Answer: a) DNS

Explanation: DNS (Domain Name System) is used for translating domain names to IP addresses in UNIX.


39. What is the purpose of the nmap command in UNIX networking?

a) Display network interface configuration

b) Scan network hosts and services

c) Query DNS servers

d) Establish remote shell connections

Answer: b) Scan network hosts and services

Explanation: The nmap command is used to scan network hosts and services, providing information about open ports and services in UNIX.


40. Which TCP/IP protocol is used for securely transferring files between hosts in UNIX?

a) FTPS

b) SFTP

c) SCP

d) FTP

Answer: b) SFTP

Explanation: SFTP (SSH File Transfer Protocol) is used for securely transferring files between hosts in UNIX.


41. What is the purpose of the ping command in UNIX networking?

a) Trace network routes

b) Test network connectivity

c) Display network interface configuration

d) Display DNS information

Answer: b) Test network connectivity

Explanation: The ping command is used to test network connectivity by sending ICMP echo request packets to a specified host in UNIX.


42. Which command is used to display information about the DNS resolver configuration in UNIX?

a) nslookup

b) cat /etc/resolv.conf

c) dig

d) host

Answer: b) cat /etc/resolv.conf

Explanation: The cat /etc/resolv.conf command is used to display the DNS resolver configuration file in UNIX.


43. What is the purpose of the ifdown command in UNIX networking?

a) Start a network interface

b) Stop a network interface

c) Configure a network interface

d) Test network connectivity

Answer: b) Stop a network interface

Explanation: The ifdown command is used to stop or deactivate a network interface in UNIX.


44. Which TCP/IP protocol is used for sending email messages between servers in UNIX?

a) SMTP

b) POP3

c) IMAP

d) HTTP

Answer: a) SMTP

Explanation: SMTP (Simple Mail Transfer Protocol) is used for sending email messages between servers in UNIX.


45. What is the purpose of the ifup command in UNIX networking?

a) Start a network interface

b) Stop a network interface

c) Configure a network interface

d) Test network connectivity

Answer: a) Start a network interface

Explanation: The ifup command is used to start or activate a network interface in UNIX.


46. Which command is used to display the ARP (Address Resolution Protocol) cache in UNIX?

a) arp -a

b) netstat -a

c) ifconfig

d) route -n

Answer: a) arp -a

Explanation: The arp -a command is used to display the ARP cache, which maps IP addresses to MAC addresses, in UNIX.


47. What is the purpose of the iptables command in UNIX networking?

a) Configure IP addresses

b) Display routing table

c) Manage firewall rules

d) Test network connectivity

Answer: c) Manage firewall rules

Explanation: The iptables command is used to configure and manage firewall rules in UNIX.


48. Which TCP/IP protocol is used for translating domain names to IP addresses in UNIX?

a) DNS

b) FTP

c) SMTP

d) SNMP

Answer: a) DNS

Explanation: DNS (Domain Name System) is used for translating domain names to IP addresses in UNIX.


49. What is the purpose of the nmap command in UNIX networking?

a) Display network interface configuration

b) Scan network hosts and services

c) Query DNS servers

d) Establish remote shell connections

Answer: b) Scan network hosts and services

Explanation: The nmap command is used to scan network hosts and services, providing information about open ports and services in UNIX.


50. Which TCP/IP protocol is used for securely transferring files between hosts in UNIX?

a) FTPS

b) SFTP

c) SCP

d) FTP

Answer: b) SFTP

Explanation: SFTP (SSH File Transfer Protocol) is used for securely transferring files between hosts in UNIX.

Related Articles

Linux MCQ

Welcome to Linux Multiple Choice Questions (MCQ) Section Embark on a journey through the world of...