FPT University: Lab 3 For Operating Systems
FPT University: Lab 3 For Operating Systems
FPT University: Lab 3 For Operating Systems
FPT UNIVERSITY
Lab 3 for Operating Systems
Learning outcome
Upon successful completion of this lab, you will be able
How to use some commands that concert process and access the system attributes
To use the word processor application (vi)
Process Management
View the running process on the system uses the ps (process status) command
o Syntax: ps [-option]
o result
PID TTY TIME CMD
2412 tty1 00:00:00 bash
2433 tty2 00:00:00 ps
o option:
-a: view all
-ax: view all process, even though the process is not concern with tty
-axl: view all process with the full command
Stop a process
o Requirement: the PID must be known
o Syntax: kill -9 PID
o Notes: if it is careless, the system is hang
Editor program: vi
Syntax: vi <file_name>
Manipulation
o Press key i: insert or type the content (in the left)
o Press key a: insert or type the content (in the right)
o ESC key: exit to command mode
o The key arrow is used to move in the content
Instructor: Kieu Trong Khanh, M.Eng Page 1 of 2
FPT University Lab 3 – Operating System
o Key x: delete a character
o Key dd: delete a row
o Command
:w: write file
:q: exit vi
:wq: write file and exit vi
:e!: delete all the content that typing after writing file
o Some other key function
Ctrl G: show the current line
G: end of file
1G: begin of file
nG: goto n line
Submission
Upload the word file to cms describes some questions as
Present the content of manipulating of some command (including syntax, what
does it for?, capture two of examples for each command) as
o pstree –np
o pkill
o uptime
o free
Capture the terminal screen using the “pgrep –u root” command. Explain the
result of the capture
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).
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.
Requirement
All the capture must be combination with full the windows including your accounts on
the windows and the Linux OS (if it is not, you will be taken 0 mark). Should be use
the capture in windows with jpg format to reduce the file size with your submitting
END