What is the function of the ps command in UNIX?

What is the function of the ps command in UNIX?

a) To list the running processes
b) To display disk space usage
c) To change file permissions
d) To delete files

Answer:

a) To list the running processes

Explanation:

The ps command in UNIX is used to display information about currently running processes. By default, it shows processes owned by the user who invoked the command, but it can also display system-wide process information using additional options like ps aux.

For example, ps -e lists all processes running on the system, while ps -u username shows processes for a specific user. This command is essential for monitoring system activity and identifying processes that may be consuming excessive resources.

Understanding the ps command is important for process management in UNIX. It helps users and administrators monitor the system’s performance, detect any unusual activity, and make informed decisions about process termination or management.

Reference:

Top 50 Unix MCQ Questions & Answers

Scroll to Top