Professional Documents
Culture Documents
LAB3OSG
LAB3OSG
ID: SE180672
Lab3.
Task1
pstree -np: This command displays a tree-like structure of processes, including their process IDs and
parent-child relationships. It can help you visualize the hierarchy of processes running on your system.
Example 2: pstree -np 1508 - Displays the process tree for a specific process with ID 1508.
pkill: This command is used to send signals to processes based on their names.
Ex1: pkill babi send signal to terminate all process with the name “babi”.
Ex2 : Pkill cupsd.
uptime: This command provides information about the system's uptime and load averages.
Syntax: uptime
Purpose: To display system uptime and load averages.
Example 1: uptime - Displays uptime, current time, and system load averages.
Ex 2: uptime –p: Hiển thị ở dạng ngắn gọn.
free: This command shows information about the system's memory usage.
Syntax: free [options]
Purpose: To display information about memory usage.
Example 1: free - Displays memory usage statistics.
EX2: free-h: Displays memory usage in a human-readable format.
Task2:
Explain the result: The pgrep -u root command is used to list the process IDs of all processes owned by
the "root" user. The result will be a list of process IDs corresponding to the processes running as the root
user.
Task 3:
Task 4: