fish /home/hy/hdh Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge rev 01 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge rev 01 ISA bridge: In
Trang 1Học viện công nghệ bưu chính viễn thông
Cơ sở tại thành phố Hồ Chí Minh ZZ======()Z=======
Trang 2HE DIEU HANH BAI THU’C HANH 1 TONG QUAN HE DIEU HANH
Bài tập 1: Thực hiện tất cả các lệnh sau:
A Thực hành các lệnh cơ bản của Linux
I Quản lý tập tin
†1 cp file thư_ mục:
fish /home/hy/hdh
Trang 8
II Di chuyễn/liệt kê các tập tin
12 cd:
fish /home/hy
Trang 12
Ill Quan tri hệ thống
Trang 13
root hub Bluetooth Adapter USB Hub Mouse
root hub
Trang 14
fish /home/hy/hdh
Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01) PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01) ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
System peripheral: VMware Virtual Machine Communication Interface (rev 10)
VGA compatible controller: VMware SVGA II Adapter
SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
PCI bridge: VMware PCI bridge (rev 02)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
PCI bridge: VMware PCI Express Root Port (rev 01)
fish /home/hy/hdh
~/hdh
sudo apt instaLL kitty
[sudo] password for hy:
Done Reading state information Done
Suggested packages:
imagemagick
The following NEW packages will be installed:
kitty
(© upgraded, 1 newly installed, 0 to remove and 132 not upgraded
Need to get 1.617 kB of archives
After this operation, 7.415 kB of additional disk space will be used
Get:1 http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 kitty amd64 0.21.2-1u
buntu@.22.04.1 [1.617 kB]
Fetched 1.617 kB in 1s (1.718 kB/s)
Selecting previously unselected package kitty
(Reading database 202268 files and directories currently installed.)
Preparing to unpack ./kitty_0.21.2-1ubuntu0.22.04.1_amd64.deb
Unpacking kitty (0.21.2-1ubuntu0.22.04.1)
Setting up kitty (0.21.2-1ubuntuO.22.04.1)
Processing triggers for desktop-file-utils (0.26-1ubuntu3)
Trang 15
fish /home/hy/hdh
Command 'gksudo' not found, did you mean:
command 'gfsudo' from deb gfarm-client (2.7.17+dfsg-1build2)
Try: sudo apt install <deb name>
Lệnh gksudo không tồn tại trong hệ điều hành Ubuntu 22.04
Trang 16
fish /home/hy/hdh
/.bashrc
Trang 17sudo apt-get install neofetch
Reading package lists Done
Building dependency tree Done
Reading state information Done
The following packages were automatically installed and are no longer required:
javascript-common kitty-doc kitty-terminfo Libjs-jquery Libjs-sphinxdoc Libjs-underscore
Use ‘sudo apt autoremove' to remove them
The following NEW packages will be installed:
neofetch
© upgraded, 1 newly installed, © to remove and 132 not upgraded
Need to get 84,3 kB of archives
After this operation, 359 kB of additional disk space will be used
Get:1 http://vn.archive.ubuntu.com/ubuntu jammy/universe amd64 neofetch all 7.1.0-3 [84,3 kB ]
Fetched 84,3 kB in 1s (168 kB/s)
Selecting previously unselected package neofetch
(Reading database 203552 files and directories currently installed.)
Preparing to unpack ./neofetch_7.1.0-3_all.deb
Unpacking neofetch (7.1.0-3)
Setting up neofetch (7.1.0-3)
Trang 18
IHÌ fish /home/hy/hdh
Sew
sudo apt-get remove neofetch
Reading package lists Done
Building dependency tree Done
Reading state information Done
The following packages were automatically installed and are no Longer required:
caca-utils chafa javascript-common jp2a kitty-doc kitty-terminfo LibchafaO Libjs-jquery lLibjs-sphinxdoc lLibjs-underscore toilet toilet-fonts
Use ‘sudo apt autoremove' to remove them
The following packages will be REMOVED:
neofetch
© upgraded, 0 newly installed, 1 to remove and 132 not upgraded
After this operation, 359 kB disk space will be freed
Do you want to continue? [Y/n] y
(Reading database 203557 files and directories currently installed.)
/usr/share/applications/org.gnome.Nautilus.desktop
/usr/share/apport/package-hooks/source_nautilus.py
/usr/share/dbus-1/services/org.freedesktop.FileManager1.service
/usr/share/dbus-1/services/org.gnome.Nautilus Tracker3.Miner.Extract.service /usr/share/dbus-1/services/org.gnome.Nautilus Tracker3.Miner.Files.service /usr/share/dbus-1/services/org.gnome.Nautilus.service
Trang 19IHÌ fish /home/hy/Downloads
~ /DownLoads
sudo alien -di steam-1.0.0.78-2-omv2390.x86_64.rpm
sudo dpkg -i steam Latest.deb
Selecting previously unseLected package steam-Launchen
(Reading database 210933 files and directories currently installed.)
Preparing to unpack steam_lLatest.deb
Unpacking steam-launcher (1:1.0.0.78)
Setting up steam-Launcher (1:1.0.0.78)
Processing triggers for man-db (2.10.2-1)
Processing triggers for hicolor-icon-theme (0.17-2)
Processing triggers for mailcap (3.70+nmu1ubuntu1)
Processing triggers for gnome-menus (3.36.0-1ubuntu3)
Processing triggers for desktop-file-utils (0.26-1ubuntu3)
~ /Down Loads
Trang 20
V Phân vung 6 clrng
32 fdisk —I:
fish /home/hy/Downloads
Disk /dev/loop®: 63,45 MiB, 66531328 bytes, 129944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/0 size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 237,21 MiB, 248729600 bytes, 485800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
1/0 size (minimum/optimaL): 512 bytes / 512 bytes
Disk /dev/toop2: 75,88 MiB, 77463552 bytes, 151296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/0 size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
1/0 size (minimum/optimal): 512 bytes / 512 bytes
Trang 21sudo fdisk /dev/sda1 /home/hy
sudo fdisk /dev/sdal
[sudo] password for hy:
Changes will remain in memory only, until you decide to write them
Be careful before using the write command
Device does not contain a recognized partition table
Created a new DOS disklabel with disk ident
Command (m for help)
Trang 22B Thực hành các lệnh nâng cao của Linux
Các lệnh liên quan đến tiến trình
Trang 23ag
PID TTY TIME COMMAND
: STAT START TIME COMMAND
Trang 269 0 9 9 9 Ø : : ¬— te-t 9
Trang 27curl -L -0 https://github.com/j -hc/revanced-magisk-module/releases/download/20220911/youtube
Trang 28Jo Group CPU State Command
me
top /home/hy
- 60:12:24 up 13 min, 1 user, load average: 0,47, 0,49, 0,36
Trang 29II Quản lý tiến trình ngầm
1 Tạo tiến trình chạy ngầm (background): $lệnh &:
Fish /home/hy
2 Hiển thị trạng thái của các tiến trình ngầm: $jobs —l:
fish /home/hy
Trang 30
3 Tiếp tục thực hiện các tiến trình ngầm sau khi cắt liên lạc với terminal: $nohup lệnh
&:
fish /home/hy
Trang 315 Hủy tiến trình: $kill PID hoặc $kill %n:
fish /home/hy
Trang 32
1 Hién thi tất cả các tiến trình của người dùng hiện đang làm việc:
Trang 33miện < TIME CMD
:00:00 systemd :00:00 (sd-pam) :00:00 pipewire
00 pipewire-media- :07 pulseaudio :00 gnome-keyring-d gdm-wayland-ses dbus-daemon gnome -session-b gvfsd gvfsd-fuse
at-sp1-bus- Laun gnome - sheLIL
9 xdg-permission-
evotution-sourc dconf -service
Trang 34- USER: tên người dung khởi tạo tiến trình
- PID: ld của tiến trình
- %CPU: Số phần trăm CPU mà tiến trình đang sử dụng
- %MEM: Số phan trăm bộ nhớ mà tiến trình đang sử dụng
- VSZ: Bộ nhớ ảo của tiến trình
- RSS: Bộ nhớ thực mà tiến trình đang dung
- TTY: Terminal screen dang chay tién trinh
- STAT: State của tiến trình
- START: Thời gian tiến trình bắt đầu chạy
- TIME: Tổng thời gian CPU mà tiền trình đã dung
- COMMAND: Lệnh đã dung đề khởi tạo tiền trình
Bài tập 3: Liệt kê các tiến trình ngầm hiện đang chạy
Trang 351 Thực thi lệnh top
top /home/hy
46
i
01
01 OnE
i
9 1
et
i SMS!
i
Trang 37C Thực hành các lệnh cơ bản của Windows
VoLune in drive C has no 1abeL
Vo\uwe SeriaL Nunber is B2ED-2C41
Trang 383 Copy file thumuc:
Tracing route to google [142.251.175.139]
over a maxinum of 38 hops
Trang 395 Net send ip/ho s† thông_ điệp_muốn_ gở
C:\Users\hy\hdh>net send google “HetLo*
The syntax of this command is
NET
[ ACCOUNTS | COMPUTER | CON! CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | PAUSE SESSION | SHARE | START |
STATISTICS | STOP | TIME | USE | USER | VIEW ]
Trang 40ESTABLISHED
TIHE_WA1IT Ưu.) 5i TIME_WAIT U30) TIME_WAIT ESTABLISHED TIME_WAIT TIME_WAIT TIHE_WAIT TIHE_WAIT ESTABLISH TIHE_WAIT TIHE _WA1T TIHE_WAIT
Trang 41Autoconfiguration Enabled : Yes
Unknown adapter LocaL Area Eonnection 2:
Autoconfiguration Enabled : Yes
Unknown adapter Local Area Connection:
Original Install Date:
Systen Boot Time:
TotaL PhysicaL Henory:
Available Physica\ Memony: 9,
Virtual Memory: Max S:
Virtuat Hemorny: Avaitab1
VintuaL Nemory: In Use:
Page FiLe Location(s):
en-us;English (United States)
en-us;English (United States)
(UTC+07:00) Bangkok, Hanoi, Jakarta
Trang 43DC ce Lad
C:\Users\hy\hdh>chkdsk E:
The type of the fiLe system is NTFS§
Volume Label is New Volume
WARNING! /F parameter not specified
Running CHKDSK in read-only mode
Stage 1: Examining basic file system structure
256 file records proce:
File verification completed
Phase duration (File d verification): 1.32 pilliseconds
@ large file records processed
Phase duration (Orphan file record recovery): 0.26 milliseconds
@ bad file records processed
Phase duration (Bad file record checking): 6.24 milliseconds
Index verification Sử AEjEEE
Phase duration (Index verification): 1.48 miLLiseconds
8 unindexed fites scanned
Phase duration (Orphan reconnection): 0.28 milliseconds
6 unindexed fiLes recovered to tost and found
Phase duration (Orphan recovery to lost and found): 8.25 miLLiseconds
@ reparse records processed
Phase Pee Ji uobee point and 0bject 1D verification): 6.55 miLLiseconds
Stage 3: Examining security descriptors
Security descriptor verification completed
Phase duration ($Security descriptor verification): 6.ó9 miLLiseconds
12.format [volume]:
ee eee tee
C:\Users\hy\hdh>format E:
The type of the fiLe systen is NTFS
Enter current volume Label for drive E: New Volume
WARNTNI ALL DATA ON NON-REMOVABLE DISK
ORIVE WILL BE L0ST!
Proceed with Format (Y/N)? y
999.0 MB totaL đisk space
994.1 MB are avaitabte
C:\Users\hy\hdh>
D Tạo tiến trình, tiểu trình và thiết lập độ ưu tiên bằng ngôn ngữ lập trình
I Tạo tiến trình, tiểu trình và thiết lập độ wu tién bang Java
* Dùng thread:
- Độ ưu tiên high:
Trang 44© Dera thread (red | [cx ] | cas
© very threat Không 0xes4
Trang 45Derg thread ) Kháng 0xes4
* Nhận xét:
- Đối với chương trình Java ở chế độ dùng thread, khi ở độ ưu tiên cao hơn thì tiến trình dùng nhiều CPU hơn.
Trang 46- Khi ở chế độ không dùng thread, ở cả 2 độ ưu tiên thì chương trình dùng CPU không chệch lệch nhau nhiều
-> Không có nhiều tiến trình chiếm nhiều CPU cùng 1 lúc nên độ ưu tiên không ảnh hưởng nhiêu đên chương trình Java
II Thiết lập độ ưu tiên bằng C++
- Độ ưu tiên high:
3333333
333