UNIX MCQs – Networking Basics (Part – 4)

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 network interfaces and their configuration in UNIX?

a) netstat

b) ifconfig

c) arp

d) route

Answer: b) ifconfig

Explanation: The ifconfig command is used to display the configuration of network interfaces, including IP addresses, in UNIX.


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


26. Which command is used to display the active network connections along with their PID (Process ID) in UNIX?

a) netstat -p

b) ps -aux

c) lsof -i

d) ifconfig

Answer: c) lsof -i

Explanation: The lsof -i command is used to display active network connections along with their associated PID (Process ID) in UNIX.


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

a) Display SSH configuration

b) Manage SSH keys

c) Establish SSH connections

d) Display network interfaces

Answer: b) Manage SSH keys

Explanation: The ssh-agent command is used to manage SSH keys and handle passphrase-protected private keys in UNIX.


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

a) FTPS

b) SFTP

c) SCP

d) TFTP

Answer: b) SFTP

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


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


30. Which command is used to display the status of network interfaces in UNIX, including their link status and IP address?

a) ifconfig -a

b) ip link show

c) netstat -i

d) route -n

Answer: b) ip link show

Explanation: The ip link show command is used to display the status of network interfaces, including their link status and IP address, in UNIX.


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

a) Display network interface configuration

b) Securely transfer files between hosts

c) Display routing table

d) Manage firewall rules

Answer: b) Securely transfer files between hosts

Explanation: The scp command is used to securely transfer files between hosts in UNIX, utilizing SSH for encryption and authentication.


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

a) ifconfig -a

b) ip addr show

c) netstat -i

d) route -n

Answer: a) ifconfig -a

Explanation: The ifconfig -a command is used to display detailed information about a specific network interface, including its configuration, in UNIX.


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

a) Transfer files between hosts

b) Establish secure shell connections

c) Access remote systems

d) Query DNS servers

Answer: c) Access remote systems

Explanation: The telnet command is used to establish interactive communication with a remote system over a network in UNIX.


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


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


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 netstat command in UNIX networking?

a) Display network interface configuration

b) Display active network connections

c) Manage firewall rules

d) Test network connectivity

Answer: b) Display active network connections

Explanation: The netstat command is used to display information about active network connections, including listening ports, in UNIX.


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


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


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


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

a) Display DNS information

b) Display network interface configuration

c) Display routing table

d) Configure network interfaces

Answer: a) Display DNS information

Explanation: The dig command is used to query DNS servers for detailed DNS information, such as DNS records, in UNIX.


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


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


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


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


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


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.

Related Articles

Linux MCQ

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