Uploaded by Tiến Châu Vĩnh

OSG Lab3 SE183243 (1)

advertisement
Name: Châu Vĩnh Tiến
ID: SE183243
Class: SE1829
Lab 3 for Operating Systems
1. Present the content of manipulating of some command (including syntax, what does it
for?, capture two of examples for each command) as:
a. pstree -np
i. Syntax:
1. $ pstree [options] [pid or username]
ii. Used to:
1. display a tree of processes
iii. Example:
1. Example1: $ pstree –np
2. Example2: $ pstree -a
b. pkill
i. Syntax:
1. $ pkill [OPTIONS] <PATTERN>
ii. Used to:
1. pkill will send the specified signal (by default SIGTERM) to each
process instead of listing them on stdout.
iii. Example:
1. Example1:
a. $ sudo firefox (create new fire process)
b. $ ps -a (to show all process)
c. $ pkill -15 firefox (send “15(Terminate)” signal to “firefox”
process)
c. uptime
i. Syntax: $ uptime [options]
ii. Used to:
1. Tell how long the system has been running.
iii. Example:
1. Example1: $ uptime
2. Example2: $ uptime -p
d. free
i. Syntax:
1. $ free [options]
ii. Used to:
1. Display amount of free and used memory in the system
iii. Example:
1. Example1: $ free
2. Example2: $ free -b (Display the amount of memory in bytes.)
2. Capture the terminal screen using the “pgrep –u root” command. Explain the result of
the capture.
a. Explane: pgrep looks through the currently running processes and lists the process
IDs which match the selection criteria to stdout. All the criteria have to match.
Use the -u option to tell pgrep to display processes being run by a given user.
b.
3. How to open same “Task Manager” as Windows in Linux that shows the processes tab?
Capture that windows (using both command and GUI on taskbar).
a. Used: The top command is a task manager that is used for several users of Linux.
We can apply it in all distributions of Linux. Just, we need to open the command
line and enter "top". The top command is an excellent task manager as it
illustrates essential details like the total tasks, swap usage, free ram, ram usage,
CPU usage, etc.
b. $ top (using command):
c. Open “System Monitor”
4. How to open same “Add/Remove Program” as Windows in Linux that allows to update or
remove the package software to OS? Capture that window.
a. Search for “Software” and press enter
b. Choose “Installed” tab and choose the program you want to uninstall then click
“Uninstall”
c. Swicth to “Updates” tab to check update versions, choose “Restart & Update…” to
update all.
Download