0% found this document useful (0 votes)
6 views8 pages

LAB3OSG

The document discusses several Linux commands: pstree displays process trees, pkill sends signals to processes by name, uptime shows system uptime and load averages, free shows memory usage statistics, and pgrep lists process IDs by owner. Examples are provided for each command.

Uploaded by

Việt Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views8 pages

LAB3OSG

The document discusses several Linux commands: pstree displays process trees, pkill sends signals to processes by name, uptime shows system uptime and load averages, free shows memory usage statistics, and pgrep lists process IDs by owner. Examples are provided for each command.

Uploaded by

Việt Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Nguyễn Việt.

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.

 Syntax: pstree -np


 Purpose: To visualize process hierarchy.
 Example 1: pstree -np - Displays a hierarchical list of all processes.

 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.

 Syntax: pkill [options] pattern


 Purpose: 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:

Command: syntax gnome-system-monitor to decribe tab same “Task manager”


Using GUI: We click show all applications and type System monitor to show the file same “Task
manager”.

Task 4:

In command type gnome-software to open software.

Then we can update, add or remove software.

You might also like