කොහොමද යාලුවනේ...ලිනක්ස් ගැන ගොඩ කාලෙකට පස්සෙ කතාකරන්න හිතුන...ඕනෙම ලිනක්ස්
OS එකක එන බේසික් commands ටිකක් තමා කියන්න යන්නෙ...Beginners ලට ගොඩක් වටී කියල හිතුව
නිසා post කලේ...හරි එහෙනම් වැඩි කතා නැතුව terminal එක open කරගෙන පටන් ගමු...
1.pwd
මේ කමාන්ඩ් එකෙන් කරන්නෙ අපි දැන් ඉන්න path එක පෙන්නන එක...
root@sltechzone :-# pwd
/Downloads/
2.ls
මේකෙන් කරන්නෙ අපි ඉන්න පාත් එකේ තියන file folder වල නම්
පෙන්නන එක..
root@sltechzone :-# ls
Video Music Documents
Other Compressed
තව දෙයක් hidden
file බලාගන්න ඕනෙනම් ls –a පාවිච්චි කරන්න පුලුවන්...
3.cd
මේ කමාන්ඩ්
එකෙන් අපිට folder navigate වෙන්න පුලුවන්...උදාහරනයක් විදිහට අපිට Desktop එකට යන්න
ඕනෙනම්..
root@sltechzone
:-# cd Desktop
Home path
එකටලේසියෙන්ම යන්න පුලුවන් cd නිකම්ම දීල
root@sltechzone
:-# cd
ඕනෙමදුර තියන
path එකකට යන්න ඕනෙනම් / ලකුනත් එක්ක මේ ඉදිහට command එක දෙන්න...
root@sltechzone
:-# cd /Downloads/Documents/
අපිට
folder එක පිලිපස්සට යන්න ඕනෙනම් cd .. දෙන්න
root@sltechzone
:-# cd ..
folder එකේ
නම space එක්ක තියෙයිනම් “ “ යටතෙ folder එකේ නම දෙන්න
root@sltechzone
:-# cd “Kali Tut”
4.mkdir
& rmdir
mkdir පාවිච්චි
කරල folder එකක් හදන්න පුලුවන් ...
root@sltechzone
:-# mkdir NewFolder
rmdir පාවිච්චි
කරල folder එකක් මකන්න පුලුවන්...
root@sltechzone
:-# rmdir NewFolder
5.rm
මේ
command එකෙන් file මකන්න පුලුවන්...
root@sltechzone
:-# rm sltechzone.py
ඒවගේම
folder මකන්නත් පොඩි වෙනසක් command එකේ කරන්න තියෙන්නෙ...ඉස්සරහට -r දාල ෆෝල්ඩර් එකේ
නම දෙන්න...
root@sltechzone
:-# rm –r tut
6.touch
මේ command
එකෙන් අපිට ඕනෙම ෆයිල් එකක් හදන්න පුලුවන්...උදාහරනයම් ඉදිහට අපිට new.txt කියල file එකක් හදන්න ඕනෙනම් මෙහෙම
command එක දෙන්න...
root@sltechzone
:-# touch new.txt
7.man
& --help
මේ කමාන්ඩ්
දෙකෙන්ම වෙන්නෙ අපි ගහන command එකේ සම්පූර්න විස්තරයක් ගන්න...උදාහරනයක් විදිහට අපිට
cp command එකෙන් මොකද වෙන්නෙ කියල දැනගන්න ඕනෙනම් මෙහෙම command කරන්න..
root@sltechzone
:-# man cp
root@sltechzone
:-# cp --help
ඔය දෙකෙන්ම
වෙන්නෙ එකම දේ...
8.cp
මේ command
එකෙන් අපිට file copy කරන්න පුලුවන්... command එක එන්නෙ cp අපිට කොපි කරන්න ඕනෙ
file එකේ නම,space,ෆෝල්ඩර් එකේ නම...
root@sltechzone :-# cp sltechzone.py /Desktop/
9.mv
මේ කමාන්ඩ්
එක ඕනෙ වෙන්නෙ file එකක් move කරන්න...
root@sltechzone
:-# mv sltechzone.py /Download/
මේ කමාන්ඩ්
එකම file එකක් rename කරන්නත් යොදාගන්න පුලුවන්... sltechzone.py file එකේ නම tut.py කරන්න ඕනෙනම් මේ විදිහට
command කරන්න...
root@sltechzone
:-# mv sltechzone.py tut.py
10.locate
මේකමාන්ඩ්
එක පාවිච්චි කරල pc එකේ තියන ඕනෙම file එකක නමක් තියන තැන හොයාගන්න පුලුවන්...අපිට
හරියටම file එකේ නම මතකනම මතකනම් නිකම්ම මේ විදිහට file එකේ නම දෙන්න...
root@sltechzone
:-# locate search.txt
කැපිටල්සිම්පල්
ප්රද්නයක් තියෙයිනම් මේ ඉදිහට case sensetive අයින් කරන්න පුලුවන්...
root@sltechzone
:-# locate –i SeArCh.txt
file එකේ තියන
නම් දෙක් විතර මතකනම් මේ ඉදිහට command එක දෙන්න...
root@sltechzone
:-# locate *TUT*sltechzone
11.echo
මේ කමාන්ඩ්
එකෙන් අපිට txt file එකක් හදල ඒකට text ඇතුලත් කරන්න පුලුවන්...
root@sltechzone
:-# echo thanks to visit our blog >> sltechzone.txt
ඒ වගේම හදපු
txt file එකකට text එකක් ඇතුලත් කරන්න පුලුවන්...
root@sltechzone
:-# echo SL_TECH_ZONE >> sltechzone.txt
12.cat
මේ කමාන්ඩ්
එකෙන් txt file එකේ content එක බලන්න පුලුවන්...
root@sltechzone
:-# cat sltechzone.txt
thanks to
visit our blog
SL_TECH_ZONE
13.nano
මේ කමාන්ඩ්
එකෙන් අපිට terminal එක text eitor එකක් විදිහට පාවිච්චි කරන්න පුලුවන්...අපිට
terminal එකෙන් sltechzone.txt file එක edit කරන්න ඕනෙනම් ඒ විදිහට command කරන්න...
root@sltechzone
:-# nano sltechzone.txt
14.sudo
මේකමාන්ඩ්
එකෙන් කරන්නෙ admin privilage එකෙන් මොනවහරි කමාන්ඩ් රන් කරන එක....
උදාහරනයක් විදිහට අපිට රූට් පාස්වර්ඩ් වෙනස් කරන්න ඕනෙනම්
මේ විදිහට කරන්න...
root@sltechzone
:-# sudo passwd
[sudo]
password for root: මෙතන ඔයාගෙ දැන් තියන රූට් pass එක දෙන්න
Enter new
LINUX password: අලුත් පාස්වඩ් එක
Retype
new LINUX password: අලුත් පාස්වඩ් එක ආය ටයිප් කරන්න
Passwd:
password updated successfully
15.df
මේකමාන්ඩ්
එකෙන් හාඩ් එකේ පාටිශන් වල ඉඩ බලාගන්න පුලුවන් ..
root@sltechzone
:-# df
මෙතෙන්දි
KB වලින් space පෙන්නන්නෙ...කමාන්ඩ් එක ඉස්සරහින්
-m ගැහුවහම mb වලින් පෙන්නනව...
root@sltechzone
:-# df –m
16.du
මේ කමාන්ඩ්
එකෙන් ඉඩ ප්රමානය බලාගන්න පුලුවන් ෆෝල්ඩර් වල...
root@sltechzone
:-# du Download
ඒවගේම ෆෝල්ඩර්
එකේ තියන ෆයිල් වල ඉඩ ප්රමාන දැන ගන්න ls –lah කමාන්ඩ් එක පාවිච්චි කරන්න පුලුවන්...
root@sltechzone
:-# ls –lah
17.zip ,
unzip
File zip
unzip කරන්න මේ කමාන්ඩ් එක පාවිච්චි කරන්න පුලුවන්...
root@sltechzone
:-# zip tut.zip /Desktop/tut/
root@sltechzone
:-#unzip tut.zip
18.uname
OS එකේ details
දැනගන්න මේ කමාන්ඩ් එක පාවිච්චි කරන්න පුලුවන්...
root@sltechzone
:-# uname
Linux
වැඩිතොරතුරක්
දෙනගන්න -a කියන එක command එක ඉස්සරහට දාන්න..
root@sltechzone
:-# uname –a
Linux
sltechzone 4.14.0-kali3-amd64 #1 SMP Debain 4.14.12-2kali1 (2018-01-08) x86_64
GNU/Linux
19.apt-get
මේ කමාන්ඩ්
එකෙන් linux package install කරන්න පුලුවන්....ඒ අගේම මේක sudo එක්ක use කරන්න...admin
previlade එක්ක...උදාහරනයක් ඉදිහට sltechzone package එක install කරන්න ඕනෙනම්..
root@sltechzone
:-# sudo apt-get install sltechzone
ඒවගේම
linux update කරන්නත් මේ කමාන්ඩ් එක යොදාගන්නව...
root@sltechzone
:-# sudo apt-get update
upgrade කරන්න
මේ කමාන්ඩ් එක...
root@sltechzone
:-# sudo apt-get upgrade
distro එක
update කරන්ජවනම් මේ command එක පාවිච්කි කරන්න...
root@sltechzone
:-# sudo apt-get dist-upgrade
20.chmod
අපිටතියන
file එකක් executable කරන්න මේ කමාන්ඩ් ක යොදාගන්න පුලුවන්...උදාහරනයක් ඉදිහට
sltechzone.py file එක ගන්නම්...
මේ ෆයිල් එකේ
සාමන්යෙන් රන් කරන්න තියෙන්නෙ python sltechzone.py විදිහට...මේක executable කලොත්
නිකම්ම sltechzone.py කියන command එකෙන් ඔය pkg එක run කරන්න පුලුවන්...
සාමාන්ය විදිහට
executable කරන්නෙ මෙහෙමයි...
root@sltechzone
:-# chmod +x sltechzone.py
root
permission දෙන්න ඕනෙනම් මේ විදිහට කරන්න...
root@sltechzone
:-# chmod 755 sltechzone.py
root
executable එකක් කරන්න ඕනෙනම් මේ විදිහට...
root@sltechzone
:-# sudo chmod +x sltechzone.py
21.hostname
අපේ හොස්ට්
එකේ නම් බලාගන්න පුලුවන් මේ කමාන්ඩ් එකෙන්
root@sltechzone
:-# hostname
sltechzone
අපේ ip එක
බලාගන්න ඕනෙනම් අර කමන්ඩ් එකට -I එකතුකරන්න
root@sltechzone
:-# hostname –I
192.168.43.96
22.ping
මේ කමාන්ඩ්
එකෙන් Ping එක හොයාගන්න පුලුවන් ඕනෙම site එකකට හරි ip එකකට හරි තියන...
root@sltechzone
:-# ping http://sl-tech-zone.blogspot.com
root@sltechzone
:-# ping 192.168.1.1
command ටිකනම්
ඉවරයි...
පොඩි tricks ටිකකුත් කියන්නම්...
අපිට තියන
terminal එකේ තියන code ඔක්කොම මකන්න ඕනෙනම් clear කියල type කරල enter කරන්න...
root@sltechzone
:-# clear
ඒවගේම tab
එකෙන් අපිට සමහර ව්චන පොඩ්ඩක් type කරල සම්පූර්න කරන්න පුලුවන්...
root@sltechzone
:-# cd Dow [TAB] root@sltechzone :-# cd
Downloads
Run වෙන
pkg එකක් stop කරන්න Ctrl + C යොදාගන්න පුලුවන්...
Force
Stop කරන්න Ctrl+Z වලින් පුලුවන්...
Terminal එකෙන්අයින්
වෙන්න exit command එක පාවිච්චි කරන්න පුලුවන්...
root@sltechzone
:-# exit
terminal එකේ
අන්තිමට ගහපු command ටික ගන්න පුලුවන් up down arrow වලින්...
Terminal එකෙන්
pc එක power off කරන්න පුලුවන් මේ .විදිහට..
root@sltechzone
:-# sudo half
restart කරන්නපුලුවන්
මෙහෙම...
root@sltechzone
:-# sudo reboot
එහෙනම් පෝස්ට්
එක ඉවරකරනව...කට්ටියට ගොඩක් වටිනව කියල හිතනව...අපේ බ්ලොග් එකත් එක්ක දිගටම රැදී ඉන්න...තවත්
පට්ට පෝස්ට් එකින් සෙට් එමු...එහෙනම් මං කැපුන...බුදු සරණයි!!!

Good post bro, keep it up
ReplyDeleteEla bro!!!Thanx!
Delete