Which command can be used to find processes currently running by a specific user?

Prepare for the LPIC-2 Certification Test with our study tools, including flashcards and multiple choice questions with hints and explanations. Get ready to pass your exam!

Using the command 'ps -U username' allows you to list all the processes that are currently running under a specific user's account. The 'ps' command is widely used in Linux to display information about active processes. The '-U' option specifically filters the output to show only those processes owned by the user specified, providing a clear view of what that user is running at any given moment.

This functionality is valuable for system administrators who may need to monitor or manage user processes, ensuring that resources are allocated effectively and that user activity is in line with security and operational policies. By specifying the username, you can easily focus on a particular user's activity without being overwhelmed by processes from all users on the system.

In comparison, the other options provided do not effectively achieve the same purpose. 'top -u username' displays a dynamic view of running processes from that user but can be less straightforward for a simple listing compared to the static output of 'ps'. 'finduser username' is not a standard command within Linux, and 'pstree user=username' attempts to show a tree structure of processes for a user, which is more complex and may not directly fulfill the goal of simply listing processes owned by a specific user.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy