Info Star

Info Star IT Knowledge Sharing and IT Solution

10/07/2022

How to Remove Unused Old Linux Kernels video consist of step by step process of removing old and unused Linux kernels from your operating system. Old Linux K...

Projectကရတယ့္ ပထမဦးဆုံးပိုက္ဆံေလးနဲ႔ လွဴလိုက္ၿပီ😃
24/08/2019

Projectကရတယ့္ ပထမဦးဆုံးပိုက္ဆံေလးနဲ႔ လွဴလိုက္ၿပီ😃

😎😎ဒီေန႔ေတာ့ က်ေတာ္တုိ႔ Page မွာ စာမတင္တာၾကာပီဆုိေတာ့ ျပန္တင္ျပီဗ်ာ😎😎👉“script” command ျဖစ္ Linux Session ကုိ record လုပ္...
04/08/2019

😎😎ဒီေန႔ေတာ့ က်ေတာ္တုိ႔ Page မွာ စာမတင္တာၾကာပီဆုိေတာ့ ျပန္တင္ျပီဗ်ာ😎😎

👉“script” command ျဖစ္ Linux Session ကုိ record လုပ္ျခင္း???👈

“script” command သည္ Terminal မွာ မိမိရုိက္လိုက္တယ့္ commands ေတြကုိ session တခုအေနနဲ႔မွတ္ပီး result ကုိ သိမ္းေပးပါတယ္။ ဒါကုိ (cat, more, less, vi) command ေတြနဲ႔ ၾကည့္နုိင္ပါတယ္။
က်ေတာ္တုိ႔ “scriptreplay” command နဲ႔လည္းျပန္လည္ၾကည့္ရႈနုိင္ပါတယ္။ က်ေတာ္တုိ႔ record session စမယ္ဆုိရင္ script command နဲ႔ -timing option ကုိ သုံးပီး run ရပါလိမ့္မယ္။ ေနာက္မွာ မိမိၾကဳိက္ရာ name ေပးပီး record ကုိစမွတ္နုိင္ပါျပီး။
👇👇👇👇👇👇
[root@test ~] # script --timing=time.log record.txt
Script started, file is record.txt
[root@test ~] # cat time.log
[root@test ~] # hostname
test
[root@test ~] # cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@test ~] # date
Sun Aug 4 13:30:54 +0630 2019
[root@test ~] # echo " We Love Info Star"
We Love Info Star
[root@test ~] # exit
exit
Script done, file is record.txt

ကဲ record ဖမ္းတာ ပီးသြားပါပီး က်ေတာ္လုပ္ခဲ့တယ့္ Time ကုိျပန္ၾကည့္ပါ့မယ္
👇👇👇👇👇👇
[root@test ~] # cat time.log
0.494377 39
0.013179 1
6.485861 1
0.113255 1
0.163100 1

က်ေတာ္တုိ႔ရုိက္ခဲ့တယ့္ command ေတြကုိ session record အေနနဲ႔ျပန္ၾကည့္ပါ့မယ္
👇👇👇👇👇👇
[root@test ~] # scriptreplay --timing=time.log record.txt
[root@test ~] # cat time.log
[root@test ~] # hostname
test
[root@test ~] # cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@test ~] # date
Sun Aug 4 13:30:54 +0630 2019
[root@test ~] # echo " We Love Info Star"
We Love Info Star
[root@test ~] # exit

👉Linux မွာ user password ေတြကုိ Management လုပ္ျခင္း👈

က်ေတာ္တုိ႔ Password ဆုိတာနဲ႔ Linux မွာ “passwd” command ကုိ System Admin တုိင္း သိပီးသားျဖစ္ပါလုိက္မယ္။ Linux ဟာ Multitasking ဆုိတယ့္ အတုိင္း user accounts မ်ားစြာရွိသလုိ အဲဒီ user တုိင္းမွာ လည္း “password” ေတြရွိပါလိမ့္မယ္။ မိမိဟာ Linux System Administrator တေယာက္ လုပ္မယ္ဆုိ Linux မွာ User ေတြကုိ Management လုပ္ျခင္းသည္ လည္း တစိတ္တပုိင္း အေရးပါလွပါတယ္။
Linux ရွိိ “passwd” command သည္ system users ေတြ အတြက္ Password ေတြ change ရာမွာ အသုံး၀င္သည္။ က်ေတာ္တုိ႔ ဒီ command ျဖစ္ password ေတြကုိ “lock” and “unlock” စတာေတြ လုပ္နုိင္ပါတယ္။က်ေတာ္တုိ႔ Normal Users ေတြကလည္း သူတုိ႔ရဲ႕ ကုိယ္ပုိင္ password ေတြကို ေျပာင္းဖုိ႔ “passwd” command ကုိ သုံးနုိင္တယ့္အျပင္ ၊ System Administrator ျဖစ္တယ့္ Superuser root ကလည္း အျခား users ေတြရဲ႕ Passwords ေတြကို ေျပာင္းလဲနုိင္ပါတယ္။
👇👇👇👇👇👇
Syntax: passwd [options] [username]
က်ေတာ္ ဒီေနရာမွာ User အသစ္ ကုိ ထပ္ add ျပပီး “passwd” အေၾကာင္းကုိ အေသးစိတ္ေျပာသြားပါမယ္ခင္ဗ်။
“useradd” သည္ user account အသစ္ ထပ္ add ျခင္းျဖစ္ပီး။
“userdel” သည္ ရွိပီးသား user ကုိ system မွ delete လုပ္ျခင္းျဖစ္သည္။အေသးစိတ္ကုိ ေတာ့ ေနာက္ Post မွ ရွင္းသြားပါ့မယ္ခင္ဗ်။ ခုက “passwd” အေၾကာင္းဆုိေတာ့………
👇👇👇👇👇👇
[root@cwp ~] # useradd smith
useradd: cannot open /etc/passwd
[root@cwp ~] # userdel jack
userdel: cannot open /etc/passwd
ဒီေနရာမွာ က်ေတာ္ ဘာေၾကာင့္ Super User ျဖစ္ရဲ႕သားနဲ႔ ဘာေၾကာင့္ “useradd” နဲ႔ “userdel” လုပ္လုိ႔ မရတာလုိ႔ သင္ ထင္ပါသလည္း။???????????
[root@cwp ~] # rm -rf /etc/passwd
rm: cannot remove ‘/etc/passwd’: Operation not permitted
“rm -rf” လည္း မရဘူးေနာ္………
👇👇👇👇👇👇
[root@test ~] # chattr -i /etc/passwd
[root@test ~] # useradd john
useradd: cannot open /etc/shadow
[root@test ~] # chattr -i /etc/shadow
[root@test ~] # useradd john

👉/etc/passwd အေၾကာင္း????????????👈

/etc/passwd သည္ User Account ေတြကုိ အေသးစိတိေဖာ္ျပေပးတယ္။က်ေတာ္တုိ႔ Linux Admin တုိင္းသည္ ဒီ file နဲ႔ familiar ျဖစ္ဖုိ႔ေတာ့လုိပါတယ္။ password file သည္ System ရွိ Userေတြႏွင့္ပတ္သတ္တယ့္ အခ်က္အလက္ေတြပါဝင္တယ့္ human readable file ျဖစ္ပါတယ္။
👇👇👇👇👇👇
[root@test ~] # ll /etc/passwd
-rw-r--r--. 1 root root 1049 Aug 3 23:35 /etc/passwd
/etc/passwd file permission သည္ 644 ျဖစ္ပါတယ္။ Ownership ကလည္း root:root ျဖစ္ပါတယ္။ ဒါေၾကာင့္ Super User( root ) ကသာ edit လုပ္နုိင္ပါတယ္။
👇👇👇👇👇👇
[root@test ~] # cat /etc/passwd | grep -E '/home/|/root'
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/sbin/nologin
smith:x:1000:1001::/home/smith:/bin/bash
william:x:1001:1002::/home/william:/bin/bash
(1) Username (William) သည္ login ဝင္ဖို႔ရာ username ျဖစ္ပါတယ္။
(2) Encrypted PWD (x) သည္ password ရဲ႕ format ပါ။ က်ေတာ္တုိ႔ encrypt လုပ္လုိက္တယ့္ Username ၏ Password ကုိ /etc/shadow ေအာက္မွာ သိမ္းထားပါတယ္။
[root@test ~] # cat /etc/shadow
root:$6$vGtQcjIuPzNOZuA0$vfPKCv/lNetb8/YhqEyKqia6NKfLLmf6qHzGj9u4gE2LieyDASDvegSZABA70AS/jyKpQX9BgLOkYJxlFFwou0::0:99999:7:::
(3) UID (1000) သည္ User ID ျဖစ္ပါတယ္(Normal User မုိ႔ UID 1000 ကစပါတယ္)။ system က User Account ကုိသတ္မွတ္ေပးတယ့္ Unique Number တခုျဖစ္ပါတယ္။ -u option ဆုိပီးတြဲသုံးပါတယ္။
(4) GID (1001) သည္ Group ID ျဖစ္ပါတယ္။ -g option နဲ႔တြဲသုံးပါတယ္။
(5) Home Directory သည္ User ေတြ တည္ရွိတယ့္ေနရာ တစ္ခုပါပဲ။
(6) SHELL ( /bin/bash) သည္ shell name ျဖစ္ပါသည္။

👉/etc/shadow အေၾကာင္း???????👈

၄င္းသည္ User ေတြရဲ႕ password အေသးစိတ္ကုိ ေျပာျခင္းျဖစ္ပါတယ္။ root account ျဖစ္သာ shadow file ကုိ read လုပ္နုိင္ပါတယ္။ User ေတြရဲ႕ encrypt လုပ္ထားတယ့္ password ေတြကုိ သိမ္းဆည္းရာေနရာပါပဲ။
shadow file permission သည္ ---------- ျဖစ္ျပီး Ownership သည္ root:root ျဖစ္ပါတယ္။
👇👇👇👇👇👇
[root@test ~] # ll /etc/shadow
----------. 1 root root 720 Aug 4 00:23 /etc/shadow
/etc/shadow format have nine colon-separated fields.
[root@test ~] # cat /etc/shadow
testuser:$6$GbeQzXnL$VoBBtlRXrqyAugtxr7CJ4ly/j2jWGr6YvxSrw77xLWUTrDq.8dVrAFaKe8tSuxEFlG9Pc0zNtrVMaVtgWpK0k1:18112:10:90:7:14:18113:
👇👇👇👇👇👇
(1) Username => System မွာ create လုပ္ခဲ့တယ့္ user login name ျဖစ္ပါတယ္။
(2) Encrypt Password => Password ကုိ encrypt လုပ္ထားျခင္းျဖစ္ပါတယ္။
(3) Last Password Change => ေနာက္ဆုံး Password ေျပာင္းျခင္းျဖစ္ပါတယ္။
(4) Minage => password မေျပာင္းခင္ minimum number of days ျဖစ္ပါတယ္။
(5) Maxage => password မေျပာင္းခင္ maximum number of days ျဖစ္ပါတယ္။
(6) Warning => Password expire ျဖစ္မယ့္အေၾကာင္းကုိ warning period ျဖစ္ပါတယ္။
(7) Inactive => Password expire ျဖစ္ျပီးေနာက္ user account ဟာ disable ျဖစ္သြားပါလိမ့္မယ္။
(8) Expiry => Account expire ျဖစ္မယ့္ ေန႔ျဖစ္ပါတယ္။
(9) Bank => blank သည္ ေနာက္future မွာ သုံးဖုိ႔အတြက္ျဖစ္ပါတယ္။

👉“chage” command ျဖစ္ Password Aging ကုိ Manage လုပ္ျခင္း👈

က်ေတာ္တုိ႔ System Admin တုိင္း ကုိယ့္ Server ရဲ႕ Security အတြက္ User Account ေတြ၏ Password Aging ကုိ ထိန္းခ်ဳပ္ျခင္းသည္လည္းအေရးပါလွပါတယ္။ Server ေတြ၏ User Password ေတြကိုအျမဲ တစ္လ တစ္ခါ update လုပ္သင့္ပါတယ္။
ဒီေနရာမွာ “chage” command သည္ Password Aging Information ၾကည့္ရႈျခင္း၊ ေျပာင္းျခင္းလုပ္ရာမွာ အသုံးျပဳပါတယ္။
ဒီ “change” command မွာ
👇👇👇👇👇👇
(1) Last Change Date( -d option)
[root@test ~] # chage -d 2019-08-17 william
(2) Expiry Date ( -E option)
[root@test ~] # chage -E 2019-08-30 william
(3) Minimum Day ( -m option)
[root@test ~] # chage -m 7 william
(4) Maximum Day ( -M option)
[root@test ~] # chage -M 30 william
(5) Warning Days
[root@test ~] # chage -W 7 william
(7) Inactivity Period ( -I option)
[root@test ~] # chage -I 10 william
(8) Viewing all attributes
Last password change : Aug 04, 2019
Password expires : Sep 03, 2019
Password inactive : Sep 13, 2019
Account expires : Aug 30, 2019
Minimum number of days between password change : 7
Maximum number of days between password change : 30
Number of days of warning before password expires : 7
Remark : man chage ဆုိပီးၾကည့္ရင္ ဒီ option (၈) ခုလုံးကုိ အေသးစိတ္ သိရပါလိမ့္မယ္ဗ်။

😍အမွားပါကေ၀ဖန္ေထာက္ျပအၾကံျပဳေဆြးေႏြးေပးပါခင္ဗ်😍
🙏🙏သင္ဆရာျမင္ဆရာၾကားဆရာအားလုံးကုိေလးစားလ်က္🙏🙏
Freelance Engineer @ Info Star

😃😃“Linux inode” အေၾကာင္း???😃😃Linux ဟာ everything is file ဆုိသလုိ Linux File System ေတြဟာ inode number ေတြေပၚ မွာ အေျခခံထ...
30/05/2019

😃😃“Linux inode” အေၾကာင္း???😃😃

Linux ဟာ everything is file ဆုိသလုိ Linux File System ေတြဟာ inode number ေတြေပၚ မွာ အေျခခံထားပါတယ္။က်ေတာ္တုိ႔ “inode” ဟာ file နဲ႔ ပတ္သတ္တယ့္ data ေတြအားလုံးကုိ ထိန္းခ်ဳပ္ေပးထားပါတယ္။က်ေတာ္တုိ႔ “inode” number ကုိ “index number” လုိ႔လည္းေခၚပါေသးတယ္။
“inode” သည္ filesystem မွာ ရွိတယ့္ data structure တခုလည္းပဲ ျဖစ္ပါတယ္။ Programs/data ေတြဟာ block data အေနနဲ႔ computer ရဲ႕ HDD, SSD စတာေတြမွာ သိမ္းတယ္ဆုိတာ သိရွိထားပီးသား ျဖစ္ပါလိမ့္မယ္။
၄င္းဟာ disk block နဲ႔ partition ေတြေပၚရွိ file/directory ေတြအတြက္ unique number တခုလည္းျဖစ္ပါတယ္။
က်ေတာ္တုိ႔ “inode” မွာ ဘာေတြပါလည္းဆုိေတာ့
Size of file = file ရဲ႕ အရြယ္အစား။
Device ID = device ေတြရဲ႕ ID။
UID = UID သည္ User ID ျဖစ္ပါတယ္။
GID = GID သည္ Group ID ျဖစ္ပါတယ္။
File types = file အမ်ဳိးအစား ေတြကုိ ေျပာပါတယ္။
Permissions = file permission ဟာ read လား? write လား?
Time Stamp = file ေတြရဲ႕ modification အခ်ိန္။ inode number ခ်ိန္ျခင္းေတြေပါ့။
File Deletion time = file ေတြကုိ ဖ်က္လုိက္တယ့္ အခ်ိန္။
Links = System မွာ ရွိတယ့္soft link / hard link ေတြေပါ့။
Location of file = file ရဲ႕ တည္ေနရာေပါ့ ဘယ္ ေအာက္မွာ ညေအာက္မွာေပါ့။
က်ေတာ္တုိ႔ Filesystem Structure အေၾကာင္းေျပာေတာ့မယ္ဆုိရင္
File System/File Name/Inode/Data စသျဖစ္ေပါ့ဗ်ာ။

👉ကဲ ဒီေနရာမွာ System ရဲ႕ အခ်က္အလက္ေတြကုိ ၾကည့္မယ္ဆုိပါက
“inode” ၾကည့္ဖုိ႔ဆုိ -i option ကုိေတာ့ မေမ့ပါနဲ႔ခင္ဗ်။
👇👇👇
[root@mail ~] # df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/centos-root xfs 36G 2.0G 34G 6% /
devtmpfs devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs tmpfs 1.9G 64K 1.9G 1% /dev/shm
tmpfs tmpfs 1.9G 8.9M 1.9G 1% /run
tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 145M 870M 15% /boot
tmpfs tmpfs 379M 0 379M 0% /run/user/0
👇👇👇
[root@mail ~] # df -ihT
Filesystem Type Inodes IUsed IFree IUse% Mounted on
/dev/mapper/centos-root xfs 18M 56K 18M 1% /
devtmpfs devtmpfs 471K 362 471K 1% /dev
tmpfs tmpfs 474K 17 474K 1% /dev/shm
tmpfs tmpfs 474K 616 474K 1% /run
tmpfs tmpfs 474K 16 474K 1% /sys/fs/cgroup
/dev/sda1 xfs 512K 327 512K 1% /boot
tmpfs tmpfs 474K 1 474K 1% /run/user/0

👉က်ေတာ္တုိ႔ file ေတြကုိ “copy” ကူးရင္ေတာ့ inode number ေျပာင္းသြားတယ္ဆုိတာ ေအာက္ပါအတုိင္းေတြ႔ရပါလိမ့္မယ္။
👇👇👇
[root@mail test] # ll -il
100855493 -rw-r--r-- 1 root root 0 May 30 11:31 myfile.txt
[root@mail test] # cp myfile.txt myfilecopy.txt
[root@mail test] # ll -il
100855494 -rw-r--r-- 1 root root 0 May 30 12:46 myfilecopy.txt
100855493 -rw-r--r-- 1 root root 0 May 30 11:31 myfile.txt

👉ဒါေပမယ့္ “move” လုပ္မယ္ဆုိရင္ေတာ့ နဂုိ “inode number” အတုိင္းပဲ ရွိေနပါလိမ့္မယ္ဗ်။
👇👇👇
[root@mail test] # mv myfile.txt /opt/
[root@mail test] # cd /opt/
[root@mail opt] # ll -il
100855493 -rw-r--r-- 1 root root 0 May 30 11:31 myfile.txt

👉က်ေတာ္တုိ႔ “inode number” နဲ႔ က်ေတာ္တုိ႔ System မွာ ရွိတယ့္ file ေတြကုိ လည္း ရွာေဖြနုိင္ပါေသးတယ္ခင္ဗ်။
👇👇👇
[root@mail ~] # find / -inum 100855493
/opt/myfile.txt
[root@mail ~] # find / -inum 100855494
/root/test/myfilecopy.txt

👉က်ေတာ္တုိ႔ "stat" command ျဖစ္လည္း file တခုခ်င္းဆီရဲ႕ inode/block စတယ့္ file ရဲ႕ အေသးစိတ္ကုိသိရွိနုိင္ပါတယ္။
👇👇👇
[root@mail test] # stat myfilecopy.txt
File: ‘myfilecopy.txt’
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: fd00h/64768d Inode: 100855494 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-05-30 12:46:18.553614264 +0630
Modify: 2019-05-30 12:46:18.553614264 +0630
Change: 2019-05-30 12:46:18.553614264 +0630
Birth: -

😎“inode number” အေၾကာင္းကေတာ့ ဒီေလာက္ပဲဗ်ာ။ေအာက္က Link ကေနလည္း “inode” အေၾကာင္းေလ့လာနုိင္ပါတယ္ခင္ဗ်။
https://www.cs.princeton.edu/courses/archive/fall04/cos318/precepts/6.pdf
😍အမွားပါကေ၀ဖန္ေထာက္ျပအၾကံျပဳေဆြးေႏြးေပးပါခင္ဗ်😍
🙏🙏သင္ဆရာျမင္ဆရာၾကားဆရာအားလုံးကုိေလးစားလ်က္🙏🙏
Freelance Engineer @ Info Star

😎ဒီေန႔ ကေတာ့ က်ေတာ္တုိ႔ Linux System မွာ ရွိတယ့္္ Link အေၾကာင္းေပါ့ဗ်ာ😎👉Linux System မွ “Link”  အေၾကာင္း????👈က်ေတာ္တုိ႔ ...
28/05/2019

😎ဒီေန႔ ကေတာ့ က်ေတာ္တုိ႔ Linux System မွာ ရွိတယ့္္ Link အေၾကာင္းေပါ့ဗ်ာ😎

👉Linux System မွ “Link” အေၾကာင္း????👈

က်ေတာ္တုိ႔ Linux System မွာ file/directory ေတြကုိ Link လုပ္ျခင္းသည္ အသုံး၀င္သည္။ Link သည္ က်ေတာ္ တုိ႔ System မွ file/directory ေတြကုိ ၾကားက connection လုပ္ေပးတယ့္ Linux ရဲ႕ feature တခုပါပဲ။က်ေတာ္တုိ႔ Linux မွာ Link ၂ ခုရွိပါတယ္။ ၄င္းတုိ႕ကေတာ့ hard link ရယ္၊ soft link ေခၚ symbolic link တုိ႔ ျဖစ္ၾကပါတယ္။ က်ေတာ္တုိ႔ ဘာေၾကာင့္ Link ကုိ အသုံးျပဳရလည္းဆုိရင္ေတာ့ျဖစ္ က်ေတာ္တုိ႔ ဖန္တီးထားတယ့္ file/directory ေတြကုိ ရွာ ရာမွာ လြယ္ကူပါတယ္။ က်ေတာ္တုိ႔ Linux System မွာ default ပါတယ့္ link ေတြကုိ System Administrator တုိင္းေတြ႔ဖူးပါလိမ့္မယ္။ Linux တြင္ file မ်ားကိုlink ခ်ိတ္သည္ဆိုသည္မွာ window တြင္ program မ်ားကို desktop တြင္ shortcut ထုတ္တာနွင့္ဆင္တူပါသည္။ဥပမာ ကြၽန္ေတာ္တို႔အသံုးျပဳေသာ desktop ေပၚရိွ program မ်ားသည္ original program မ်ားကို shortcut ထုတ္ထားျခင္းျဖစ္ပါသည္။ထို႔အတြက္ေၾကာင့္ အသံုးျပဳေနေသာ program သည္ delete မိသည္ရိွေသာ original file သည္ ရိွေနေသာေၾကာင့္ ကြၽန္ေတာ္တို႔အတြက္ impact မရိွနိုင္ပါ။ဒါကို Linux မွာ အၾကမ္းဖ်င္းအားျဖစ္ soft link နဲ႔တူပါသည္။ hard link သည္ original unix way ျဖစ္ၿပီးေတာ့ symbolic link သည္ modern ျဖစ္သည္။ Linux သည္ everything is file ျဖစ္သလို file တိုင္းသည္လဲ သူ႔ name ကို ရည္ညႊန္းတဲ့ single hard link ေတြရိွၾကသည္။ ls -l command နဲ႔စစ္လို႔ရပါသည္။ Linux မွာ link အေၾကာင္းေျပာမယ္ဆို file ေတြကို storage မွာဘယ္လိုတည္ေဆာက္တယ္ဆိုတာနဲနဲသိဖို႔လိုပါတယ္။ ဒီေတာ့က ကြၽန္ေတာ္တို႔ file တစ္ခု (or) folder တစ္ခုေဆာက္လိုက္တယ္ဆိုပါဆို႔ အဲ့file အတြက္ file name ကmemory မွာ inode တစ္ခုမွာသိမ္းပါတယ္ ( inode ဆိုတာကေတာ့ memory array ရဲ႕ ထိုfile ကိုသိမ္းဆည္းရာ address အစ လို႔ဆိုနိုင္ပါတယ္)။ ထို file (or) folder အတြင္းက data ေတြကိုေတာ့ အျခားလြတ္တဲ့ inode ကေန စသိမ္းဆည္းပါတယ္။
ls -ilh command ျဖင့္ inode numberနဲ႔ file ရဲ႕ size ကို check နိုင္ပါသည္။
inode အေၾကာင္းကုိေတာ့ ေနာက္ Post မွာထပ္ရွင္းျပပါ့မယ္ခင္ဗ်ာ။

👉Soft Link (or) Symbolic Link အေၾကာင္း??👈

က်ေတာ္တုိ႔ Soft Link သည္ windows system အသုံးျပဳတယ့္ File ေတြကုိ Shortcut လုပ္ျခင္းနွင့္တူတူပင္ ျဖစ္သည္။ Soft Link ဆုိတာ က်ေတာ္တုိ႔ Link လုပ္ခ်င္တယ့္ file name ကုိ ရည္ညႊန္းပီးသုံးထားတယ့္ Link တခုျဖစ္ပါတယ္။ Soft Link ခ်ိတ္ထားတယ့္ file တခုခ်င္းစီမွာ မူလ file ကုိ point လုပ္ထားတယ့္ inode number ဆုိတာပါပါတယ္။ soft link သည္ original file ကုိမွီခုိျပီးေနရတာေၾကာင့္ က်ေတာ္တုိ႔ System Admin ကသာ ဖ်က္လုိက္ပါက soft linkဟာ အလုပ္မလုပ္ေတာ့ဘူးဆုိတာ မွတ္ထားရပါလိမ့္မယ္။ soft link သည္ အျခား inode တစ္ခုျဖင့္ original dataကို point လုပ္ေပးျခင္းျဖစ္ပါသည္။ထို႔ေၾကာင့္ soft link လုပ္ထားေသာ file sizeသည္ original file တြင္ data သိမ္းဆည္းမႈတိုးလာေသာ္လဲ file sizeမွာ ေျပာင္းလဲျခင္းမရိွေပ။
က်ေတာ္တုိ႔ Soft Link ကုိ သုံးမယ္ဆုိရင္ “ln” command ကုိ -s option နဲ႔တြဲသုံးမယ္ဆုိ soft link ျဖစ္ပါတယ္။ ကဲ က်ေတာ္တုိ႔ ဒီေနရာမွာ soft link နဲ႔ ခ်ိတ္ျပပါ့မယ္ခင္ဗ်။
Syntax : ln -s [original filename] [link name]
👇👇👇
[root@luffytest ~] # cat softlink.file
Welcome to Info Star
[root@luffytest ~] # ll -il
33643899 -rw-r--r-- 1 root root 21 May 28 19:03 softfile
33663441 lrwxrwxrwx 1 root root 8 May 28 19:04 softlink.file -> softfile
[root@luffytest ~] # rm softfile
rm: remove regular file ‘softfile’? y
[root@luffytest ~] # cat softlink.file
cat: softlink.file: No such file or directory

👉👉Link file ျဖစ္မျဖစ္ဘယ္လုိၾကည့္ရမလည္းဆုိ Pointer ေလးရယ္၊ က်ေတာ္တုိ႔ ေရွ႕မွာ ရွင္းျပပီးတယ့္အတုိင္း
“lrwxrwxrwx” read, write, execute ေရွ႕က “l” sing ေလးသည္ Link File ျဖစ္တယ္ဆုိတာကုိ ကုိယ္စားျပဳပါတယ္။

👉👉က်ေတာ္တုိ႔ Link လုပ္ထားတယ့္ ေကာင္ကုိ ဖ်က္ခ်င္ရင္ “unlink” command ကုိ လည္းသုံးနုိင္ပါတယ္။

👇👇👇
[root@luffytest ~] # unlink softlink.file
[root@luffytest ~] # ll
total 0

👉👉က်ေတာ့တုိ႔ Link လုပ္ထားတယ့္ directory ရဲ႕ အဆုံးမွာ “/” ပါသြားရင္ က်ေတာ္တုိ႔ command သည္ အလုပ္မလုပ္ပါ။ေအာက္မွာ ၾကည့္ ၾကည့္ပါ ခင္ဗ်။
👇👇👇
[root@luffytest ~] # mkdir testdir
[root@luffytest ~] # ln -s testdir lntest
[root@luffytest ~] # ls -l lntest
lrwxrwxrwx 1 root root 7 May 28 17:17 lntest -> testdir
[root@luffytest ~] # rm lntest/
rm: cannot remove ‘lntest/’: Is a directory
[root@luffytest ~] # unlink lntest/
unlink: cannot unlink ‘lntest/’: Not a directory
[root@luffytest ~] # unlink lntest
[root@luffytest ~] # ls -l lntest
ls: cannot access lntest: No such file or directory

👉👉က်ေတာ္တုိ႔ Soft Link ကုိသုံးပီး file ေတြကို link လုပ္ပါ က Permissions/Inodes ေတြ မတူဘူးဆုိတာကုိလည္း ေအာက္ပါအတုိင္းေတြ႔ရပါလိမ့္မယ္။ Inodes ကုိ ၾကည့္ခ်င္တယ္ဆုိရင္ ll command ကုိ -i option နဲ႔ တြဲသုံးနုိင္ပါတယ္။
👇👇👇
[root@luffytest ~] # ll -ilh
total 4.0K
33574978 -rw-------. 1 root root 1.3K May 23 19:27 anaconda-ks.cfg
33869132 lrwxrwxrwx 1 root root 7 May 28 17:34 linktest -> testdir
61937 drwxr-xr-x 2 root root 6 May 28 17:17 testdir

👉“Hard Link” အေၾကာင္း???👈

က်ေတာ္တုိ႔ Hard Link ကုိ သုံးမယ္ဆုိရင္ေတာ့ “ln” command ကုိသုံးရပါလိမ့္မယ္ခင္ဗ်။
Hard link သည္ copy ကူးတာျဖစ္ေသာေၾကာင့္ original file ပ်က္သြားေသာ္လဲ link ခ်ိတ္ထားေသာ file မွာ ဆက္လက္အသံုးျပဳနိုင္ေပသည္။
ကြၽန္ေတာ္တို႔ hard link တစ္ခု ခ်ိတ္လိုက္တဲ့အခါမွာ သူက original file ရဲ႕data ေတြကို အျခား inode number တစ္ခုနဲ႔copy ယူလိုက္ပါတယ္။သို႔ေပမယ့္ original file တြင္ျပင္ဆင္ခ်က္ျပဳလုပ္ပါက link ခ်ိတ္ထားေသာ file တြင္လဲ effect ျဖစ္ေစပါသည္။
Soft Link ထက္ေတာ့ ပုိျမန္တာ သူ႔ရဲ႕ အားသာခ်က္ပါ။ hard link နွင့္ soft link အဓိက ျခားနားခ်က္မွာ hard link သည္ အျခားfile system တြင္မခ်ိတ္ဆက္နိုင္ပါ။
Hard link သည္ file system တစ္ခုအတြင္းသာ link ခ်ိတ္ၿပီး အျခား file system သို႔မဟုတ္ အျခား hard drive မ်ားတြင္ မခ်ိတ္ဆက္နိုင္ဘူးဆုိတာသိထားရပါလိမ့္မည္။
Hard Link သည္ Directory ေတြကုိ လည္း Link ခ်ိတ္မေပးနုိင္ပါဘူး။ File သာလ်င္ Link လုပ္နုိင္ပါတယ္။
Syntax : ln [original filename] [link name]
👇👇👇
[root@luffytest ~] # mkdir harddir
[root@luffytest ~] # ln harddir testdir
ln: ‘harddir’: hard link not allowed for directory

👉👉က်ေတာ္တုိ႔ hard link ကုိ သုံးပီး Link ခ်ိတ္မယ္ဆုိရင္ Link လုပ္တယ့္ original file နဲ႔ Link လုပ္ခံရတယ့္ file ရဲ႕ inode number နဲ႔ Permissions ေတြကအစ တူတာကုိေတြ႔ရ ပါလိမ့္မည္။
👇👇👇
[root@luffytest ~] # cat hard.file
Welcome to Info Star
[root@luffytest ~] # ln hard.file hardlink.file
[root@luffytest ~] # cat hardlink.file
Welcome to Info Star
[root@luffytest ~] # ls -li
33643899 -rw-r--r-- 2 root root 22 May 28 18:55 hard.file
33643899 -rw-r--r-- 2 root root 22 May 28 18:55 hardlink.file

👉👉က်ေတာ္တုိ႔ Original File ကုိ remove လုပ္မယ္ဆုိရင္ မူလ inode/permission အတုိင္း Link လုပ္ခံရတယ့္ ေကာင္းဟာ တည္ျမဲေနပါလိမ့္မယ္ခင္ဗ်။
👇👇👇
[root@luffytest ~] # rm hard.file
rm: remove regular file ‘hard.file’? yes
[root@luffytest ~] # cat hardlink.file
Welcome to Info Star
[root@luffytest ~] # ll -il
33643899 -rw-r--r-- 1 root root 22 May 28 18:55 hardlink.file

😃Soft Link န႔ဲ Hard Link အေၾကာင္းကေတာ့ ဒီေလာက္ပဲေပါ့ဗ်ာ။
😀ေနာက္ေန႔က် “inode” number အေၾကာင္းဆက္ဆြဲၾကတာေပါ့။
😍အမွားပါကေ၀ဖန္ေထာက္ျပအၾကံျပဳေဆြးေႏြးေပးပါခင္ဗ်😍
🙏🙏သင္ဆရာျမင္ဆရာၾကားဆရာအားလုံးကုိေလးစားလ်က္🙏🙏
Freelance Engineer @ Info Star

ဒီညအတြက္ေတာ့ မကုန္နိုင္ေသးေသာ ေနာက္ထပ္ command ေလးေတြအေႀကာင္းေပါ့ဗ်ာ … 👉“ps” command အသုံးျပဳပုံ???👈“ps command" stands ...
26/05/2019

ဒီညအတြက္ေတာ့ မကုန္နိုင္ေသးေသာ ေနာက္ထပ္ command ေလးေတြအေႀကာင္းေပါ့ဗ်ာ …

👉“ps” command အသုံးျပဳပုံ???👈
“ps command" stands for "Process Status command" ပါ။ သူက active ျဖစ္ေနတဲ႔ process ေတြအားလုံးရဲ႕ အခ်က္အလက္ေတြကုိျပေပးပါတယ္။ဆိုပါေတာ့ဗ်ာ-man ps ဆုိ ps အေၾကာင္းရွင္းျပထားတာေတြကုိ
ေတြ႔ရပါလိမ့္မည္။
Syntax : ps [options]
က်ေတာ္တုိ႔ ယခု လက္ရွိ Shell မွာ run ေနတယ့္ Process ေတြ ကုိ ထုတ္ျပခ်င္တယ္ဆိုရင္
👇👇👇
[root@testsvr ~] # ps
PID TTY TIME CMD
5092 pts/0 00:00:00 bash
5119 pts/0 00:00:00 ps

System မွာ run ေနတယ့္ Process အားလုံးကုိ ၾကည့္ခ်င္ရင္ေတာ့
👇👇👇
[root@testsvr ~] # ps aux | more
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.2 125440 3896 ? Ss 10:13 0:03 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
root 2 0.0 0.0 0 0 ? S 10:13 0:00 [kthreadd]
root 3 0.1 0.0 0 0 ? S 10:13 0:05 [ksoftirqd/0]

က်ေတာ္တုိ႔ Running လုပ္ေနတယ့္ Process အားလုံးဆီက ကုိယ္လုိခ်င္တယ့္ Process ကုိပဲ ၾကည့္ခ်င္တယ္ဆိုရင္ေတာ့
👇👇👇
[root@testsvr ~] # ps -ef | grep mariadb
root 5205 5092 0 11:43 pts/0 00:00:00 grep --color=auto mariadb
[root@testsvr ~] # ps -ef | grep apache
root 5207 5092 0 11:46 pts/0 00:00:00 grep --color=auto apache

👉“cut” command အသုံးျပဳပုံ??👈
“cut” command ဆိုတဲ႔အတိုင္းပဲ က်ေတာ္တုိ႔ file ရဲ႕ Line တခုခ်င္းဆီမွ စာသား၊စာလုံး ေလးေတြမွာ ကုိယ္လုိခ်င္တယ့္အပုိင္းကိုပဲ cut လုပ္ပီးယူရမွာအသုံး၀င္ပါတယ္။
Syntax : cut [option]
က်ေတာ္တုိ႔ File ထဲမွာ ရွိတယ့္ (၂)လုိင္းေျမာက္က character ကုိ ထုတ္ခ်င္ရင္ေတာ့
👇👇👇
[root@testsvr ~] # cat hello.txt
My name is jack
Welcome to infostar
Technology at the speed of life
We will share to you our knowledge and experience
[root@testsvr ~] # cut -c2 hello.txt
y
e
e
e

က်ေတာ္တုိ႔ Character အေရအတြက္ (၁) ကေန (၈) အထိcut လုပ္ခ်င္ရင္ေတာ့ ဒီ format ေလးကိုသံုးေပါ့ဗ်ာ
👇👇👇
[root@testsvr ~] # cut -c1-8 hello.txt
My name
Welcome
Technolo
We will

ျပီးတဲ႔အခါက်ေတာ္တုိ႔ line တခုခ်င္းစီရဲ႕ field or row တခုခ်င္းစီကုိၾကည့္ခ်င္တယ္ဆုိပါက ေအာက္မွာျပထားတဲ႔ command ေတြကုိ သုံးနုိင္ပါတယ္ဗ်။
👇👇👇
[root@testsvr ~] # cat test.txt
ID Name Address Phno Email
1 Jack Hledan 09799 [email protected]
2 John Ahlone 09505 [email protected]
[root@testsvr ~] # cut -f 4 test.txt
Phno
09799
09505
[root@testsvr ~] # cut -f 2-4 test.txt
Name Address Phno
Jack Hledan 09799
John Ahlone 09505
“cut” command အေသးစိတ္ကိုပိုျပီးသိခ်င္ေသးတယ္ဆိုရင္ေတာ့ man cut ဆုိပီး ရွာၾကည့္နိုင္ပါတယ္။

👉“stat” command အသုံးျပဳပုံ??👈
“stat” command ကိုဘယ္ေနရာေတြမွာအဓိကသံုးလည္းဆိုရင္ file ဒါမွမဟုတ္ filesystem ရဲ႕ properties/status ေတြကုိၾကည့္ရာမွာအသုံးျပဳတာပါဗ်။
👇👇👇
[root@testsvr ~] # stat linux/
File: ‘linux/’
Size: 19 Blocks: 0 IO Block: 4096 directory
Device: fd00h/64768d Inode: 33916546 Links: 3
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-05-19 18:53:50.491000000 +0630
Modify: 2019-04-29 12:46:27.586000000 +0630
Change: 2019-04-29 12:46:27.586000000 +0630
Birth: -
“stat” command ကေတာ့ဒီေလာက္ပဲေပါ့ဗ်ာ။။

👉“diff” command အသုံးျပဳပုံ??👈
“diff” လို႔ေခၚတဲ႔(difference) command ကေတာ့ files ေတြကုိ compare လုပ္ရမွာ အသုံး၀င္ျပီး မတူညီတယ့္ Line တခုခ်င္းစီကုိ ထုတ္ျပေပးပါတယ္။
👇👇👇
Syntax : diff [file1] [file2]
[root@testsvr ~] # diff hello.txt hello1.txt
1,2c1,2
< My name is jack
< Welcome to infostar
---
> My name is smith
> Welcome to linux

https://www.computerhope.com/unix/udiff.htm
“diff” command အေသးစိတ္ကုိေတာ့ အေပၚ Link ကေန ထပ္ျပီးေလ့လာနုိင္ပါတယ္ခင္ဗ်။

👉“at” command အသုံးျပဳပုံ??👈
“at” command သည္ သီးျခား date / time မွာက်ေတာ္တုိ႔ run ခ်င္တဲ့ job တစ္ခုကုိ တစ္ႀကိမ္သာ schedule ဆဲြပီး ဘယ္ေန႔၊ ဘယ္အခ်ိန္မွာ အလုပ္လုပ္မယ္ဆုိတာ သတ္မွတ္ရာမွာ အသုံး၀င္သည္။
က်ေတာ္တုိ႔ System မွာ “at” command မရွိရင္ေတာ့ # yum install -y at ဆုိပီးသြင္းလုိက္နိုင္ပါတယ္ခင္ဗ်ာ။
ဥပမာ…က်ေတာ္တု႔ိ System ရဲ႕ health status ကုိ မနက္ဖန္ ၁၁ နာရီမွာ runခ်င္တယ္ဆုိပါက
👇👇👇
[root@testsvr ~] # at -f serverstatus.sh 11:00 am tomorrow
https://www.computerhope.com/unix/uat.htm

👉“watch” command အသုံးျပဳပုံ??👈
“watch” command ကိုက်ေတာ္တုိ႔ဘာအတြက္သံုးလည္းဆိုေတာ့ သူက System မွာရွိတယ့္ Program ေတြကုိ ပုံမွန္ ေဆာင္ရြက္စီမံေပးပါတယ္။ က်ေတာ္တုိ႔ watch command ကုိ run လုိက္ပီးဆုိရင္ဒီ command က fullscreen နဲ႔ျပပီး default အေနျဖင့္က်ေတာ္တုိ႔ program ကုိ ၂စကၠန္႔တုိင္း run ေပးပါတယ္။ man watch ဆုိပီးအေသးစိတ္ၾကည့္ရႈ႕နုိင္ပါေသးတယ္။
👇👇👇
[root@testsvr ~] # watch date
Every 2.0s: date Sat May 25 22:58:02 2019
Sat May 25 22:58:02 +0630 2019

😎ဒီညအတြက္ေတာ့ ဒီေလာက္ပဲေပါ့ဗ်ာ 😎
😍အမွားပါက ေ၀ဖန္ေထာက္ျပအၾကံျပဳေဆြးေႏြးေပးပါခင္ဗ်😍
🙏🙏သင္ဆရာ ျမင္ဆရာ ၾကားဆရာအားလုံးကုိေလးစားလ်က္🙏🙏
Freelance Engineer @ Info Star

25/05/2019

က်ြန္ေတာ္တို႔ Info Star ရဲ႕ပထမဆံုး video tutorial ေလးပါ။ 😎😎😎
Software RAID အေၾကာင္းေလး Discuss လုပ္ေပးထားပါတယ္။
Centos 7 ေပၚမွာ mdadm လို႔ေခၚတဲ့ software ေလးသံုးျပီးေတာ့ ဘယ္လို configure လုပ္လဲဆို တဲ့ အေသးစိတ္ကို video ေလးမွာ ၾကည့္လို႔ရပါတယ္။😉

Introduction to raid -> https://www.facebook.com/info.star.mm/posts/282574899339672?__tn__=K-R

😎ဒီေန႔ေတာ့ ဒီေလာက္ပဲဗ်ာ
ေနာက္ေန႔ မွ ဆက္ ေဆြးေႏြးၾကတာေပါ့ဗ်ာ😉
😍😍အမွားပါက ေ၀ဖန္ေထာက္ျပအၾကံျပဳေဆြးေႏြးေပးပါခင္ဗ်😍😍
🙏🙏သင္ဆရာ ျမင္ဆရာ ၾကားဆရာအားလုံးကုိေလးစားလ်က္🙏🙏
Freelance Engineer @ Info Star

Permission in Linux😎Permission ဆိုတာကေတာ့ ျပဳလုပ္သူရွိမယ္ ျပဳလုပ္ခံရသူရွိမယ္ ဘာလုပ္မယ္ဆိုတာရွိမယ္။ ျပဳလုပ္္မယ့္သူေန ရာမွ...
24/05/2019

Permission in Linux😎

Permission ဆိုတာကေတာ့ ျပဳလုပ္သူရွိမယ္ ျပဳလုပ္ခံရသူရွိမယ္ ဘာလုပ္မယ္ဆိုတာရွိမယ္။ ျပဳလုပ္္မယ့္သူေန ရာမွာေတာ့ User ေတြေပါ့၊ ျပဳလုပ္ခံရသူေနရာမွာေတာ့ File ေတြ Directory ေတြေပါ့၊ ဘာလုပ္မယ္ ဆိုတဲ့ေနရာ မွာေတာ့ user ေတြက File ေတြ Directory ေတြ ကို Read,Wirte,Execute လုပ္မယ္ဆိုတာေပါ့။
Permission ကို အမ်ိဳးအစားခြဲၾကည့္မယ္ဆိုရင္ (2) ပိုင္းရွိပါတယ္။ DAC (Discretionary Access Control) နဲ႔ MAC (Mandatory Access Control) ဆိုျပီးခြဲလို႔ရပါတယ္။
DAC မွာဆုိ ရင္ Normal ရယ္ Extended ဆိုျပီး ၂ ပိုင္းထပ္ခြဲလို႔ရပါတယ္။
MAC မွာဆုိရင္ ေတာ့ SELinux တို႔ AppArmor တို႔ စသျဖင့္ အမ်ိဳးအစား ထပ္ခြဲ လို႔ရပါတယ္။
ဒီေန႔မွာေတာ့ DAC အေၾကာင္း အေသးစိတ္ Discuss လုပ္ၾကတာေပါ့။
DAC ဆိုတာကေတာ့လြယ္ပါတယ္ ဗ်။ အေပၚမွာေျပာခဲ့ သလိုပဲ User တေယာက္က File ၊ Directory ေတြကို Read, Write, Execute Permission တစ္ခုခုရမယ္ေပါ့။
Linux System မွာ File တစ္ခုရဲ႕ Permission ကို အေသးစိတ္ၾကည့္ခ်င္ရင္ေတာ့
# ls -alh
ဆိုတာနဲ႔ၾကည့္လို႔ရပါတယ္။

[infostar@localhost ~]$ ls -alh test.txt
-rw-rw-r--. 1 infostar infostar 0 May 22 10:55 test.txt

အဲလိုၾကည့္လို္က္မယ္ဆိုရင္ ေရွဆံုးမွာျမင္ရတဲ့ rw ဆိုတာကေတာ့ User ရဲ႕ Permission၊ ဒုတိယ မွာျမင္ရတဲ့ rw ကေတာ့ Group ရဲ႕ Permission၊ ေနာက္ဆံုးမွာျမင္ရတဲ့ r ဆိုတာကေတာ့ Other ရဲ႕ Permission ေပါ့။
ေနာက္မွာျမင္ေနရတဲ့ infostar infostart ဆိုတာကေတာ့ ေရွ့က infostar ကေတာ့ ဒီ file ကို ပိုင္တဲ့ User Ownership ေပါ့၊ ေနာက္က infostar ကေတာ့ ဒီ file ကို ပိုင္တဲ့ Group Ownership ေပါ့။
Linux မွာ user တစ္ေယာက္က File တစ္ခုကို ေဆာက္မယ္ဆို ရင္ အဲဒီ File ကို ေဆာက္လိုက္တဲ့ user ကပိုင္တယ္။
Permission ကို ဂဏန္းေတြအေနနဲ႔လည္း ေဖာ္ျပလို႔ရပါတယ္။

Read - > 2^2 -> 4
Write -> 2^1 = 2
Execute -> 2^0 = 1

ထားပါေတာ့ ကိုယ္က File တစ္ခု ကို User နဲ႔ Group ကို Full permission ေပးမယ္၊ Other ကို က်ေတာ့ Read only ပဲ ေပးမယ္ဆုိရင္ rwx ဆိုတဲ့ character နဲ႔ေပးလို႔ရသလို ဂဏန္းနဲ႔လည္းေပးလို႔ရပါတယ္။
Character နဲ႔ permission ေပးမယ္ဆိုရင္....

ug+rwx
o+r

ဂဏန္းနဲ႔ေပးမယ္ဆိုရင္ေတာ့....

774

ေနာက္တစ္ခုကေတာ့ chown ဆိုတဲ့ command ေလးပါ။
ဥပမာ file တစ္ခုကို infostar ဆိုတဲ့ user ကပိုင္တယ္ပဲထားပါေတာ့။
အဲဒါကို က်ြန္ေတာ္ က mgmg ဆိုတဲ့ user ကို ownership ေျပာင္းေပးခ်င္တယ္ပဲထားပါေတာ့။
အဲဒီအခ်ိန္မွာ ဆိုရင္ chown ဆိုတဲ့ command ကို သံုးလို႔ရပါတယ္။

# chown mgmg

ဆိုျပီး ownership ေျပာင္းလို႔ရပါတယ္။
Group ownership ေျပာင္းခ်င္ရင္လည္း chown ဆိုတဲ့ command ကိုပဲသံုးရပါမယ္။
အေပၚမွာေျပာခဲ့တာေတြကေတာ့ ရိုးရိုးရွင္းရွင္းေလးပဲ user တစ္ေယာက္ Group တစ္ခုကို read, write, execute ေပးမယ္။ အဲဒါကို DAC Normal လို႔ ေခၚပါတယ္။
ေနာက္တစ္ခုကေတာ့ file ေတြ directory ေတြ ေဆာက္ရင္ default permission ေတြရွိပါတယ္။
Default permission ဟာဆိုရင္ umask value ေပၚမွာမူတည္ပါတယ္။
root user ရဲ႕ default umask value ဟာဆိုရင္ 022 ပါ။
normal user ရဲ႕ default umask value ကေတာ့ 002 ပါ။
Default umask value ကို ေျပာင္းလို႔ရပါတယ္။ အဲဒီ umask value ေပၚမူတည္ျပီးေတာ့ permission ေတြေျပာင္းသြားပါတယ္။

root user အေနနဲ႔ directory တစ္ခုကို ေဆာက္မယ္ဆိုရင္ default umask value 022 ကို 777 ထဲကေနႏွုတ္လိုက္ ရင္ 755 ဆိုျပီးရတဲ့ value ဟာ အဲဒီ directory ရဲ႕ default permission value ပါပဲ။

root user အေနနဲ႔ file တစ္ခုကို ေဆာက္မယ္ဆိုရင္ default umask value 022 ကို 666 ထဲကေနႏွုတ္လိုက္ ရင္ 644 ဆိုျပီးရတဲ့ value ဟာ အဲဒီ file ရဲ႕ default permission value ပါပဲ။

normal user အေနနဲ႔ directory တစ္ခုကို ေဆာက္မယ္ဆိုရင္ default umask value 002 ကို 777 ထဲကေနႏွုတ္လိုက္ ရင္ 775 ဆိုျပီးရတဲ့ value ဟာ အဲဒီ directory ရဲ႕ default permission value ပါပဲ။

normal user အေနနဲ႔ file တစ္ခုကို ေဆာက္မယ္ဆိုရင္ default umask value 002 ကို 666 ထဲကေနႏွုတ္လိုက္ ရင္ 664 ဆိုျပီးရတဲ့ value ဟာ အဲဒီ file ရဲ႕ default permission value ပါပဲ။
အေပၚမွာေျပာခဲ့တာေလးေတြကေတာ့ DAC ကိုမွ Normal permission အေၾကာင္းေလးပါ။
ဒီဟာေလးကေတာ့ linux permission ကို intro ေလးအေနနဲ႔ ေျပာေပးတာပါ။
ေနာက္ျကရင္ေတာ့ Permission in linux အေျကာင္းအေသးစိတ္ကို video ေလးအေနနဲ႔ sharing လုပ္ေပး သြားပါမယ္ဗ်။

😎ဒီေန႔ေတာ့ ဒီေလာက္ပဲဗ်ာ
ေနာက္ေန႔ မွ ဆက္ ေဆြးေႏြးၾကတာေပါ့ဗ်ာ😉
😍😍အမွားပါက ေ၀ဖန္ေထာက္ျပအၾကံျပဳေဆြးေႏြးေပးပါခင္ဗ်😍😍
🙏🙏သင္ဆရာ ျမင္ဆရာ ၾကားဆရာအားလုံးကုိေလးစားလ်က္🙏🙏
Freelance Engineer @ Info Star

👉ဒီေန႕ကေတာ့ Linux Package အေၾကာင္းေပါ့👈ကြၽန္ေတာ္တို႔ Linux လို႔ေျပာရင္မေျပာမျဖစ္ေျပာရမယ့္အပိုင္းအထဲမွာ ယခုေျပာျပေပးမယ့္ ...
22/05/2019

👉ဒီေန႕ကေတာ့ Linux Package အေၾကာင္းေပါ့👈

ကြၽန္ေတာ္တို႔ Linux လို႔ေျပာရင္မေျပာမျဖစ္ေျပာရမယ့္အပိုင္းအထဲမွာ
ယခုေျပာျပေပးမယ့္ အေၾကာင္းအရာကလဲ သိထားသင့္တဲ့အပိုင္းမွာ ပါတယ္ခင္မ် အဲ့တာဘာလဲဆိုေတာ့ Package Management နဲ႔ Packaging အေၾကာင္းဘဲျဖစ္ပါတယ္. Package အေၾကာင္းဆိုေတာ့ Repository နဲ႔ Dependency အေၾကာင္းပါေျပာဖို႔လိုလာပါလိမ့္မယ္။

👉Repository
Linux မွာက Software ေတြ install လုပ္ရင္ window မွာလို CD တို႔ DVD တို႔မွာ ထည့္ထားတဲ့ဟာေတြမရိွပါဘူး Linux နဲ႔ပက္သက္တဲ့ softwareေတြက ကြၽန္ေတာ္တို႔Internet ရိွရံုျဖင့္အကုန္ရနိုင္ပါတယ္၊ အဲ့လို software ေတြရယူတဲ့ေနရာကို Repository လို႔ေခၚပါတယ္ ၊ Repository ေတြကို သက္ဆိုင္ရာ Distro ေတြက create လုပ္ထားတာရိွသလို အျခား open source third party ေတြက create ထားတာလဲရိွပါတယ္၊ ဥပမာေျပာရမယ္ဆို EPEL Repo ကို fedora ကျပဳလုပ္ေပးထားတာပါ၊Application တခုခုကို install လုပ္မယ္ဆို Package Manager ဟာ သက္ဆိုင္ရာRepo မွ download လုပ္ၿပီး Install လုပ္သြားပါတယ္ ၊ Fedora ၊ RedHat နဲ႔ CentOS တို႔မွာဆို သက္ဆိုင္ရာ Repository ကိုသိခ်င္ရင္ေတာ့ /etc/yum.repo.d/ ေအာက္မွာၾကည့္နိုင္သလို yum repolist all ဆိုတဲ့command နဲ႔ၾကည့္လိုက္ရင္လဲ disabled နဲ႔ enabled ျဖစ္ေနတဲ့ Repository ေတြအားလံုးကိုၾကည့္နိုင္ပါတယ္၊ Repository ကေတာ့ဒီေလာက္ေပါ့ဗ်ာ......

👉Dependency
Program တစ္ခုက သူတစ္ခုတည္းအေနနဲ႔ၿပီးျပည့္စံုတဲ့ taskတစ္ခုလုပ္ဖို႔ဆိုတာမျဖစ္နိုင္ပါဘူး ၊ ဥပမာေျပာရင္ input/output process တစ္ခုသာလုပ္မယ့္program ဆိုရင္ေတာင္ သူrun ဖို႔ အျခား shared librariesေတြနဲ႔ခ်ိတ္ဆက္ရပါတယ္၊ ျမင္ေအာင္ေျပာရမယ္ဆို standard input/output devicesေတြျဖစ္တဲ့ keyboard တို႔ monitor တို႔device drivers ေတြနဲ႔ခ်ိတ္ဆက္မယ့္ library fileေတြသံုးရပါတယ္ ၊ ဒါကအရိုးရွင္းဆံုး တစ္ခုပါ ၊ ေနာက္ထပ္အေနနဲ႔ေျပာရမယ္ဆို Web Server တို႔ Monitoring Server တို႔ အျခားေသာအဲ့လို High Resources ေတြမွာဆို service တစ္ခုနဲ႔တစ္ခုခ်ိတ္ဆက္ဖို႔ရာ ပိုၿပီးလိုအပ္ပါတယ္၊ web server ဆို database နဲ႔ခ်ိတ္ဆက္ဖို႔ php-mysql တို႔ အဲ့လိုအျခားmodules ေတြလိုအပ္ပါတယ္၊ အဲ့သည္လို လိုအပ္ခ်က္ေတြျဖစ္ေပၚေနတာကိုDependencies လို႔ေခၚပါတယ္.
ဆိုေတာ့ကားး😁

ေျပာခ်င္တာေလးကိုဆက္သြားလိုက္မယ္ေနာ္😁😁
Package Manager ဆိုတာေကာ ဘာလဲေပါ့ 🤔🤔
Package ေတြနဲ႔ပက္သက္ၿပီး Installing and Maintaining လုပ္တယ္လို႔သိထားရရင္ရပါၿပီ.
Package ဆိုတာဘာလဲေပါ့ဗ်ာ (လာျပန္ၿပီ ဘာလဲေပါ့ဗ်ာ😛) ရိုးရိုးရွင္းရွင္းေလးပါဘဲ Package ဆိုတာ အထုတ္ေလးေပါ့ဗ်ာ 😁Compressed လုပ္ထားတဲ့အထုတ္ေလး ၊အဲ့အထုတ္ေလးက ဘာေတြပါလဲဆိုေတာ့ ကြၽန္ေတာ္တို႔ အသံုးျပဳမယ္ Program files ေတြ ၊ Script flies ေတြနဲ႔ ဘယ္ Program က ဘာအတြက္၊ ဘယ္လိုအသံုးျပဳရမယ္ ဆိုတဲ့Metadata ေတြ Contents ေတြပါတယ္ဗ်၊ အဲ့ဒါအျပင္ သူတို႔မွာ pre နဲ႔ post installation အတြက္ Script fileေတြလဲပါ ပါတယ္.Packaging tools ေတြကေတာ့ Distribution ေတြေပၚမူတည္ၿပီ ကြဲျပားၾကပါတယ္.ဒါအျပင္ type ကလဲနွစ္မ်ိဳးရိွျပန္ေရာ Low Level tool နဲ႔ High Level tool ဆိုၿပီးေတာ့.....Debian Base Distro ေတြ Ubuntu တို႔ မွာဆို Low Level tool ကို dpkg ေခၚၿပီးေတာ့ High Level tool ကိုေတာ့ apt-get, aptitude ေတြေပါ့ဗ်ာ Slackware မွာေတာ့ slackware ျဖစ္ၿပီး Arch Linux မွာေတာ့ pacman ၊ Gentoo မွာဆို portage ၊ Red Hat ၊ Fedora နဲ႔ CentOS တို႔မွာဆို Low Level က rpm tool ျဖစ္ၿပီးေတာ့ yum က ေတာ့ High Level tool ျဖစ္ပါတယ္၊
Low Levelနဲ႔ High Level tool ဘာကြာလဲဆိုေတာ့ Spelling ေပါ့ဗ်ာ 😁ေၾကာ္ျငာဝင္တာ ...ဘာကြာလဲဆိုေတာ့ Low Level toolေတြက packageေတြကို installing , removing နဲ႔ query ဘဲလုပ္၊High Level tool ေတြကေတာ့ Program တစ္ခုကိုInstall လုပ္မယ္ဆို သူ႔အတြက္လိုအပ္တဲ့ metadataေတြေကာ ေနာက္ၿပီ လိုအပ္မယ့္ Dependencies ေတြပါ တစ္ခါတည္း Install လုပ္သြားပါတယ္၊ပိုၿပီး smooth ျဖစၿပီး ေခါင္းစားသက္သက္သာတာေပါ့ အသံုးျပဳရတာ၊
ကြၽန္ေတာ္ Fedora Base နဲ႔ Red Hat base ေတြအတြက္Low Level နဲ႔ Hight Level command ေလးေတြ အနည္းငယ္ေျပာျပေပးပါ့မယ္။🙂
Package တစ္ခုကို Install လုပ္ခ်င္ရင္ေတာ့
👉High Level tool
install package_name

👉Low Level tool
-i package_file
တကယ္လို႔မ်ား package file က dependency တစ္ခုခုညိွ႔ရင္ေတာ့ rpm နွင့္install လုပ္တဲ့ fileက error ျပေနပါလိမ့္မယ္။
Package တစ္ခုကို remove လုပ္ခ်င္ရင္ေတာ့
👉High Level tool
erase package_name
remove package_name
👉Low Level tool
-e package_file
Install လုပ္ၿပီးသား package ေတြကိုၾကည့္ခ်င္ရင္ေတာ့
👉High Level tool
list installed
👉Low Level tool
-qa
Package ကို Update လုပ္မယ္ဆို
👉High Level tool
update package_name
👉Low Level tool
-U package_file
တကယ္ကိုယ္runေနတဲ့ program ရဲ႕package fileကိုမသိလို႔ရွာခ်င္ရင္ေတာ့😃😃 ေအာက္ကနည္းေလးအတိုင္းရွာလို႔ရပါတယ္၊
ဥပမာ >> vim ဆိုတဲ့command က ဘယ္package file လဲသိခ်င္ရင္ေတာ့ ...
-qf /usr/bin/vim
ဆိုတဲ့command ေလးနဲ႔အသံုးျပဳၿပီးရွာနိုင္ပါတယ္.☺️
အားလံုးအသိပညာဗဟုသုတတိုးၾကပါေစ😍😍

ဒီေန႔ေတာ့ ဒီေလာက္ပဲဗ်ာ 😎
😍😍အမွားပါကေ၀ဖန္ေထာက္ျပအၾကံျပဳေဆြးေႏြးေပးပါခင္ဗ်😍😍
🙏🙏သင္ဆရာ၊ျမင္ဆရာ၊ၾကားဆရာအားလုံးကုိေလးစားလ်က္🙏🙏
Freelance Engineer @ Info Star

Address

Hlaing River Street(2), Hlaing Township
Yangon

Opening Hours

Monday 09:00 - 18:00
Tuesday 09:00 - 17:00
Wednesday 09:00 - 17:00
Thursday 09:00 - 18:00
Friday 09:00 - 18:00
Saturday 09:00 - 13:00

Website

Alerts

Be the first to know and let us send you an email when Info Star posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share