Which command would be used to display active connections and listening ports for TCP/UDP protocols?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command that would be used to display active connections and listening ports for TCP/UDP protocols is 'ss'. This tool is specifically designed to investigate sockets, showing various statistics and details about network connections, both established and those in a listening state. It provides a more comprehensive view of connections compared to legacy commands, and it can filter output in a variety of ways, including by protocol type, making it particularly useful for network diagnostics and monitoring.

The other options serve different purposes: 'arp' manages the ARP cache for mapping IP addresses to MAC addresses; 'lsof' lists open files, which can include network socket information but is broader in scope; and 'ifconfig' is primarily intended for configuring network interfaces rather than displaying connection information. Therefore, 'ss' is the most suitable command for the stated requirement.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy