ServiceNow Certified Implementation Specialist – Service Mapping — Question 28
Which one of the following Linux commands can be used by a non root user to return the process ID listening on port 8080?
Answer options
- A. sudo netstat -an -p TCP | grep :8080
- B. sudo netstat -anp | grep :8080
- C. netstat -anp | grep :8080
- D. netstat -an -pid * | grep :8080
Correct answer: B
Explanation
The correct answer is B because it allows a non-root user to view the process ID associated with port 8080 using 'sudo' to elevate privileges temporarily. Option A is incorrect as it specifies 'TCP' unnecessarily, and options C and D do not use 'sudo', which may prevent a non-root user from accessing the necessary information.