UNIX Question and Answer – Networking Basics
UNIX MCQ – Multiple Choice Questions for exam, interview, and Entrance Test
1. Which command is used to display the current hostname of a UNIX system?
a) hostname -i
b) hostname -a
c) hostname
d) hostname -s
Answer: c) hostname
Explanation: The hostname command without any options is used to display the current hostname of a UNIX system.
2. What is the purpose of the route command in UNIX networking?
a) Display routing table
b) Add a route to the routing table
c) Configure network interfaces
d) Test network connectivity
Answer: a) Display routing table
Explanation: The route command is used to display or manipulate the IP routing table in UNIX networking.
3. Which TCP/IP protocol is used for securely accessing remote systems in UNIX?
a) SSH
b) Telnet
c) FTP
d) Rlogin
Answer: a) SSH
Explanation: SSH (Secure Shell) is used for securely accessing remote systems and executing commands in UNIX.
4. What is the purpose of the netcat command in UNIX networking?
a) Display network interface configuration
b) Scan network hosts for vulnerabilities
c) Transfer files between hosts
d) Establish network connections
Answer: d) Establish network connections
Explanation: The netcat command, also known as nc, is a versatile networking utility used to establish network connections, including TCP and UDP connections, in UNIX.
5. Which command is used to display information about the TCP/IP network stack in UNIX?
a) netstat
b) ifconfig
c) ipconfig
d) tcpdump
Answer: b) ifconfig
Explanation: The ifconfig command is used to display information about the TCP/IP network stack, including network interfaces, in UNIX.
6. What is the purpose of the dig 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 dig command is used to query DNS servers for detailed DNS information, such as DNS records, in UNIX.
7. Which TCP/IP protocol is used for transferring files between hosts in UNIX, providing encryption for data 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 encryption for data transfer over SSH.
8. What is the purpose of the arp command in UNIX networking?
a) Display network interface configuration
b) Display routing table
c) Manipulate ARP cache
d) Test network connectivity
Answer: c) Manipulate ARP cache
Explanation: The arp command is used to view and manipulate the ARP cache, which maps IP addresses to MAC addresses, in UNIX.
9. 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.
10. 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.
11. 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: b) SFTP
Explanation: SFTP (SSH File Transfer Protocol) is used for securely transferring files between hosts in UNIX, providing secure and encrypted file transfer.
12. 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.
13. 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.
14. 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.
15. 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.
16. 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.
17. 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.
18. 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.
19. 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.
20. 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.
21. 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.
22. 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.
23. 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.
24. 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.
25. 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.
26. Which command is used to display the routing table in UNIX?
a) netstat -r
b) arp -a
c) route -n
d) ifconfig
Answer: c) route -n
Explanation: The route -n command is used to display the routing table in UNIX, showing the routing information including destination, gateway, and interface.
27. What is the purpose of the ssh command in UNIX networking?
a) Display SSH configuration
b) Securely transfer files
c) Establish SSH connections
d) Display network interfaces
Answer: c) Establish SSH connections
Explanation: The ssh command is used to establish secure shell connections to remote hosts in UNIX.
28. Which TCP/IP protocol is used for transferring files between hosts in UNIX, providing authentication and encryption?
a) FTPS
b) SFTP
c) SCP
d) FTP
Answer: b) SFTP
Explanation: SFTP (SSH File Transfer Protocol) is used for transferring files securely between hosts in UNIX, providing authentication and encryption.
29. What is the purpose of the dig command in UNIX networking?
a) Display DNS information
b) Perform a traceroute
c) Display network configuration
d) Display ARP cache
Answer: a) Display DNS information
Explanation: The dig command is used to query DNS servers and display detailed DNS information in UNIX.
30. Which command is used to display the network connections and listening ports in UNIX?
a) netstat -a
b) ifconfig
c) arp -a
d) route -n
Answer: a) netstat -a
Explanation: The netstat -a command is used to display all active network connections and listening ports in UNIX.
31. What is the purpose of the ssh-keygen command in UNIX networking?
a) Configure SSH settings
b) Generate SSH key pairs
c) Establish SSH connections
d) Display SSH configuration
Answer: b) Generate SSH key pairs
Explanation: The ssh-keygen command is used to generate SSH key pairs for secure authentication and encryption in UNIX.
32. 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, providing encryption for data transfer.
33. 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 and display DNS-related information, such as IP address resolution.
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 their 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 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, providing encryption for data 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, providing encryption for data transfer.
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, providing encryption for data transfer.