Iwu 20 dị elu maka ndị ọkachamara Linux
Daalụ maka mmasị niile, okwu ọma na nkwado ị nyere anyị n'akụkụ abụọ mbụ nke edemede a. N'isiokwu nke mbụ, anyị tụlere iwu maka ndị ọrụ ahụ gbanwere na Linux ma chọọ ihe ọmụma dị mkpa iji malite.
- Iwu 20 bara uru maka ndị ọhụrụ Linux
N'isiokwu nke abụọ anyị tụlere iwu nke onye ọrụ etiti na-achọ iji jikwaa usoro nke ya.
- Iwu 20 dị elu maka ndị ọrụ Linux nke etiti
Gịnị ọzọ? N'isiokwu a, m ga-akọwa iwu ndị a chọrọ maka ijikwa Linux Server.
41. Iwu: ifconfig
ifconfig na-eji hazie kernel-bi na netwọk interfaces. A na-eji ya n'oge buut iji melite interfaces dị ka ọ dị mkpa. Mgbe nke ahụ gasịrị, a na-achọkarị ya naanị mgbe nbipu ma ọ bụ mgbe ọ dị mkpa ngbanwe usoro.
[[email ~]$ ifconfig eth0 Link encap:Ethernet HWaddr 40:2C:F4:EA:CF:0E inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::422c:f4ff:feea:cf0e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:163843 errors:0 dropped:0 overruns:0 frame:0 TX packets:124990 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:154389832 (147.2 MiB) TX bytes:65085817 (62.0 MiB) Interrupt:20 Memory:f7100000-f7120000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:78 errors:0 dropped:0 overruns:0 frame:0 TX packets:78 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4186 (4.0 KiB) TX bytes:4186 (4.0 KiB)
Gosipụta nkọwa nke ihu niile gụnyere oghere ndị nwere nkwarụ site na iji arụmụka -a.
[[email ~]$ ifconfig -a eth0 Link encap:Ethernet HWaddr 40:2C:F4:EA:CF:0E inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::422c:f4ff:feea:cf0e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:163843 errors:0 dropped:0 overruns:0 frame:0 TX packets:124990 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:154389832 (147.2 MiB) TX bytes:65085817 (62.0 MiB) Interrupt:20 Memory:f7100000-f7120000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:78 errors:0 dropped:0 overruns:0 frame:0 TX packets:78 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4186 (4.0 KiB) TX bytes:4186 (4.0 KiB) virbr0 Link encap:Ethernet HWaddr 0e:30:a3:3a:bf:03 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
[[email ~]$ ifconfig eth0 down
[[email ~]$ ifconfig eth0 up
Kee “192.168.1.12” dị ka adreesị IP maka interface eth0.
[[email ~]$ ifconfig eth0 192.168.1.12
[[email ~]$ ifconfig eth0 netmask 255.255.255.
[[email ~]$ ifconfig eth0 broadcast 192.168.1.255
[[email ~]$ ifconfig eth0 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255
Mara: Ọ bụrụ na ị na-eji netwọk ikuku, ịkwesịrị iji iwu iwconfig. Maka ihe atụ na ojiji “ifconfig” ndị ọzọ, gụọ Iwu 15 bara uru \ifconfig.
42. Iwu: netstat
iwu netstat na-egosiputa ozi metụtara netwọkụ dị iche iche dị ka njikọ netwọkụ, tebụl ntụgharị, ọnụ ọgụgụ interface, njikọ masquerade, ndị otu multicast wdg.,
[[email ~]$ netstat -a Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State I-Node Path unix 2 [ ACC ] STREAM LISTENING 741379 /run/user/user1/keyring-I5cn1c/gpg unix 2 [ ACC ] STREAM LISTENING 8965 /var/run/acpid.socket unix 2 [ ACC ] STREAM LISTENING 18584 /tmp/.X11-unix/X0 unix 2 [ ACC ] STREAM LISTENING 741385 /run/user/user1/keyring-I5cn1c/ssh unix 2 [ ACC ] STREAM LISTENING 741387 /run/user/user1/keyring-I5cn1c/pkcs11 unix 2 [ ACC ] STREAM LISTENING 20242 @/tmp/dbus-ghtTjuPN46 unix 2 [ ACC ] STREAM LISTENING 13332 /var/run/samba/winbindd_privileged/pipe unix 2 [ ACC ] STREAM LISTENING 13331 /tmp/.winbindd/pipe unix 2 [ ACC ] STREAM LISTENING 11030 /var/run/mysqld/mysqld.sock unix 2 [ ACC ] STREAM LISTENING 19308 /tmp/ssh-qnZadSgJAbqd/agent.3221 unix 2 [ ACC ] STREAM LISTENING 436781 /tmp/HotShots unix 2 [ ACC ] STREAM LISTENING 46110 /run/user/ravisaive/pulse/native unix 2 [ ACC ] STREAM LISTENING 19310 /tmp/gpg-zfE9YT/S.gpg-agent ....
[[email ~]$ netstat -at Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 localhost:mysql *:* LISTEN tcp 0 0 *:5901 *:* LISTEN tcp 0 0 *:5902 *:* LISTEN tcp 0 0 *:x11-1 *:* LISTEN tcp 0 0 *:x11-2 *:* LISTEN tcp 0 0 *:5938 *:* LISTEN tcp 0 0 localhost:5940 *:* LISTEN tcp 0 0 ravisaive-OptiPl:domain *:* LISTEN tcp 0 0 ravisaive-OptiPl:domain *:* LISTEN tcp 0 0 localhost:ipp *:* LISTEN tcp 0 0 ravisaive-OptiPle:48270 ec2-23-21-236-70.c:http ESTABLISHED tcp 0 0 ravisaive-OptiPle:48272 ec2-23-21-236-70.c:http TIME_WAIT tcp 0 0 ravisaive-OptiPle:48421 bom03s01-in-f22.1:https ESTABLISHED tcp 0 0 ravisaive-OptiPle:48269 ec2-23-21-236-70.c:http ESTABLISHED tcp 0 0 ravisaive-OptiPle:39084 channel-ecmp-06-f:https ESTABLISHED ...
[[email ~]$ netstat -s Ip: 4994239 total packets received 0 forwarded 0 incoming packets discarded 4165741 incoming packets delivered 3248924 requests sent out 8 outgoing packets dropped Icmp: 29460 ICMP messages received 566 input ICMP message failed. ICMP input histogram: destination unreachable: 98 redirects: 29362 2918 ICMP messages sent 0 ICMP messages failed ICMP output histogram: destination unreachable: 2918 IcmpMsg: InType3: 98 InType5: 29362 OutType3: 2918 Tcp: 94533 active connections openings 23 passive connection openings 5870 failed connection attempts 7194 connection resets received ....
Ọ DỊ MMA! Maka ihe ụfọdụ ma ọ bụrụ na ịchọghị idozi onye ọbịa, ọdụ ụgbọ mmiri na aha njirimara dị ka mmepụta netstat.
[[email ~]$ netstat -an
Ọ dị mma, ọ ga-adị mkpa ka ị nweta nsonaazụ netstat na-aga n'ihu ruo mgbe agafere ntuziaka (ctrl+c).
[[email ~]$ netstat -c
Maka ọmụmaatụ iwu “netstat” ndị ọzọ na ojiji, lee edemede 20 Netstat Command Examples.
43. Iwu: nslookup
Mmemme ịba uru netwọkụ ejiri nweta ozi gbasara sava ịntanetị. Dị ka aha ya na-egosi, ụlọ ọrụ na-achọta ozi nkesa aha maka ngalaba site na ịjụ DNS.
[[email ~]$ nslookup linux-console.net Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: Name: linux-console.net Address: 50.16.67.239
[[email ~]$ nslookup -query=mx linux-console.net Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: linux-console.net mail exchanger = 0 smtp.secureserver.net. linux-console.net mail exchanger = 10 mailstore1.secureserver.net. Authoritative answers can be found from:
[[email ~]$ nslookup -type=ns linux-console.net Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: linux-console.net nameserver = ns3404.com. linux-console.net nameserver = ns3403.com. Authoritative answers can be found from:
[[email ~]$ nslookup -type=any linux-console.net Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: linux-console.net mail exchanger = 10 mailstore1.secureserver.net. linux-console.net mail exchanger = 0 smtp.secureserver.net. linux-console.net nameserver = ns06.domaincontrol.com. linux-console.net nameserver = ns3404.com. linux-console.net nameserver = ns3403.com. linux-console.net nameserver = ns05.domaincontrol.com. Authoritative answers can be found from:
[[email ~]$ nslookup -type=soa linux-console.net Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: linux-console.net origin = ns3403.hostgator.com mail addr = dnsadmin.gator1702.hostgator.com serial = 2012081102 refresh = 86400 retry = 7200 expire = 3600000 minimum = 86400 Authoritative answers can be found from:
Gbanwee nọmba ọdụ ụgbọ mmiri site na iji nke ịchọrọ ijikọ
[[email ~]$ nslookup -port 56 linux-console.net Server: linux-console.net Address: 50.16.76.239#53 Name: 56 Address: 14.13.253.12
44. Iwu: igwu
dig bụ ngwá ọrụ maka ịjụ DNS nameservers maka ozi gbasara adreesị nnabata, ozi mgbanwe, nameservers, na ozi metụtara ya. Enwere ike iji ngwa a site na sistemụ arụmọrụ Linux ọ bụla (Unix) ma ọ bụ Macintosh OS X. Ihe kacha eji egwu egwu egwu bụ naanị ịjụ otu onye ọbịa.
[[email ~]$ dig linux-console.net ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6 <<>> linux-console.net ;; global options: +cmd ;; Got answer: ;; ->>HEADER<
[[email ~]$ dig linux-console.net +nocomments ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6 <<>> linux-console.net +nocomments ;; global options: +cmd ;linux-console.net. IN A linux-console.net. 14400 IN A 40.216.66.239 ;; Query time: 418 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Sat Jun 29 13:53:22 2013 ;; MSG SIZE rcvd: 45
[[email ~]$ dig linux-console.net +noauthority ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6 <<>> linux-console.net +noauthority ;; global options: +cmd ;; Got answer: ;; ->>HEADER<
[[email ~]$ dig linux-console.net +noadditional ; <<>> DiG 9.9.2-P1 <<>> linux-console.net +noadditional ;; global options: +cmd ;; Got answer: ;; ->>HEADER<
[[email ~]$ dig linux-console.net +nostats ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6 <<>> linux-console.net +nostats ;; global options: +cmd ;; Got answer: ;; ->>HEADER<
[[email ~]$ dig linux-console.net +noanswer ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6 <<>> linux-console.net +noanswer ;; global options: +cmd ;; Got answer: ;; ->>HEADER<
[[email ~]$ dig linux-console.net +noall ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6 <<>> linux-console.net +noall ;; global options: +cmd
45. Iwu: uptime
Ị jikọọla na igwe nkesa Linux gị wee chọta ihe na-adịghị ahụkebe ma ọ bụ obi ọjọọ, gịnị ka ị ga-eme? Na-eche…. Mba, ị nweghị ike ịgba ọsọ oge iji nyochaa ihe mere n'ezie mgbe ihe nkesa na-anọghị ya.
[[email ~]$ uptime 14:37:10 up 4:21, 2 users, load average: 0.00, 0.00, 0.04
46. Iwu: mgbidi
otu n'ime iwu kachasị mkpa maka onye nchịkwa, mgbidi na-ezigara onye ọ bụla wee banye na ikike mesg ha ka edobere ee. Enwere ike ịnye ozi ahụ dị ka arụmụka na mgbidi, ma ọ bụ zipu ya na ntinye ọkọlọtọ nke mgbidi.
[[email ~]$ wall "we will be going down for maintenance for one hour sharply at 03:30 pm" Broadcast message from [email (pts/0) (Sat Jun 29 14:44:02 2013): we will be going down for maintenance for one hour sharply at 03:30 pm
47. iwu: ozi
Na-ahapụ gị ijikwa ma ọ bụrụ na ndị mmadụ nwere ike iji iwu \write, iziga gị ederede n'ihuenyo.
mesg [n|y] n - prevents the message from others popping up on the screen. y – Allows messages to appear on your screen.
48. Iwu: dee
Ka izipu ozi ozugbo na ihuenyo igwe Linux ọzọ ma ọ bụrụ 'mesg' bụ 'y'.
[[email ~]$ write ravisaive
49. Iwu: okwu
Nkwalite ide iwu, iwu okwu na-enye gị ohere ịgwa ndị ọrụ abanyela okwu.
[[email ~]$ talk ravisaive
Mara: Ọ bụrụ na arụnyeghị iwu okwu, ị nwere ike dabara ma ọ bụ mebie ngwugwu achọrọ.
[[email ~]$ yum install talk OR [[email ~]$ apt-get install talk
50. Iwu: w
kedu iwu 'w' ka ị na-akpa ọchị? Ma n'ezie ọ bụghị. t bụ iwu, ọ bụrụgodị na ọ bụ naanị otu mkpụrụedemede ogologo! Iwu w bụ ngwakọta nke oge na onye nyere iwu ka e nyere otu ozugbo na nke ọzọ, n'usoro ahụ.
[[email ~]$ w 15:05:42 up 4:49, 3 users, load average: 0.02, 0.01, 0.00 USER TTY FROM [email IDLE JCPU PCPU WHAT server tty7 :0 14:06 4:43m 1:42 0.08s pam: gdm-passwo server pts/0 :0.0 14:18 0.00s 0.23s 1.65s gnome-terminal server pts/1 :0.0 14:47 4:43 0.01s 0.01s bash
51. Iwu: nyegharịa aha
Dị ka aha ahụ na-egosi, iwu a nyegharịa faịlụ aha. rename ga-enyegharị faịlụ ndị akọwapụtara aha site na dochie ihe mbụ mere site na aha faịlụ ahụ.
Give the file names a1, a2, a3, a4.....1213
Naanị pịnye iwu.
rename a1 a0 a? rename a1 a0 a??
52. Iwu: elu
Na-egosiputa usoro nke CPU. Iwu a na-enye ume ọhụrụ na-akpaghị aka, na ndabara ma na-aga n'ihu na-egosi usoro CPU ọ gwụla ma enyereghị ntuziaka nkwụsịtụ.
[[email ~]$ top top - 14:06:45 up 10 days, 20:57, 2 users, load average: 0.10, 0.16, 0.21 Tasks: 240 total, 1 running, 235 sleeping, 0 stopped, 4 zombie %Cpu(s): 2.0 us, 0.5 sy, 0.0 ni, 97.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem: 2028240 total, 1777848 used, 250392 free, 81804 buffers KiB Swap: 3905532 total, 156748 used, 3748784 free, 381456 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 23768 ravisaiv 20 0 1428m 571m 41m S 2.3 28.9 14:27.52 firefox 24182 ravisaiv 20 0 511m 132m 25m S 1.7 6.7 2:45.94 plugin-containe 26929 ravisaiv 20 0 5344 1432 972 R 0.7 0.1 0:00.07 top 24875 ravisaiv 20 0 263m 14m 10m S 0.3 0.7 0:02.76 lxterminal 1 root 20 0 3896 1928 1228 S 0.0 0.1 0:01.62 init 2 root 20 0 0 0 0 S 0.0 0.0 0:00.06 kthreadd 3 root 20 0 0 0 0 S 0.0 0.0 0:17.28 ksoftirqd/0 5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H 7 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/u:0H 8 root rt 0 0 0 0 S 0.0 0.0 0:00.12 migration/0 9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh 10 root 20 0 0 0 0 S 0.0 0.0 0:26.94 rcu_sched 11 root rt 0 0 0 0 S 0.0 0.0 0:01.95 watchdog/0 12 root rt 0 0 0 0 S 0.0 0.0 0:02.00 watchdog/1 13 root 20 0 0 0 0 S 0.0 0.0 0:17.80 ksoftirqd/1 14 root rt 0 0 0 0 S 0.0 0.0 0:00.12 migration/1 16 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H 17 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 cpuset 18 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper 19 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs 20 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns 21 root 20 0 0 0 0 S 0.0 0.0 0:00.04 bdi-default 22 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd 23 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd 24 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ata_sff
Gụọkwa: 12 TOP Command Examples
53. Iwu: mkfs.ext4
Iwu a na-emepụta usoro faịlụ ext4 ọhụrụ na ngwaọrụ a kapịrị ọnụ, ọ bụrụ na a na-agbaso ngwaọrụ na-ezighị ezi mgbe iwu a gasịrị, a ga-ehichapụ ihe mgbochi ahụ ma hazie ya, n'ihi ya, a na-atụ aro ka ị ghara ịme iwu a ma ọ bụrụ na ị ghọtara ihe ị na-eme.
Mkfs.ext4 /dev/sda1 (sda1 block will be formatted) mkfs.ext4 /dev/sdb1 (sdb1 block will be formatted)
Gụkwuo: Gịnị bụ Ext4 na otu esi emepụta ma tụgharịa
54. Iwu: vi/emacs/nano
vi (visual), emacs, nano bụ ụfọdụ ndị editọ a na-ejikarị na Linux. A na-ejikarị ha dezie ederede, nhazi,… faịlụ. Ntuziaka ngwa ngwa maka ịrụ ọrụ gburugburu vi na nano bụ, emacs bụ a.
[[email ~]$ touch a.txt (creates a text file a.txt) [[email ~]$ vi a.txt (open a.txt with vi editor)
[pịa 'i' ka itinye ọnọdụ, ma ọ bụ na ị gaghị enwe ike pịnye ihe ọ bụla]
echo "Hello" (your text here for the file)
- alt+x (wepu tinye mode, cheta idowe ụfọdụ oghere n'etiti mkpụrụedemede ikpeazụ.
- iwu ctrl+x ma ọ bụ okwu ikpeazụ gị ga-ehichapụ).
- : wq! ( na-echekwa faịlụ ahụ, yana ederede dị ugbu a, cheta '!' bụ ịkagbu).
[[email ~]$ nano a.txt (open a.txt file to be edited with nano)
edit, with the content, required
ctrl +x (iji mechie nchịkọta akụkọ). Ọ ga-egosi mmepụta dị ka:
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ? Y Yes N No ^C Cancel
Pịa 'y' ka ee wee tinye aha faịlụ, ị mechara.
55. Iwu: rsync
Rsync na-eṅomi faịlụ ma nwee mgbanwe -P maka ogwe ọganihu. Yabụ ọ bụrụ na etinyere rsync, ịnwere ike iji utu aha dị mfe.
alias cp='rsync -aP'
Ugbu a gbalịa iṅomi nnukwu faịlụ na njedebe wee hụ mmepụta ya na ihe ndị fọdụrụ, dị ka ogwe ọganihu.
Ọzọkwa, Idokwa na Idokwa ndabere bụ otu n'ime ọrụ kachasị mkpa na nke na-agwụ ike onye na-ahụ maka sistemụ, kwesịrị ịrụ ya. Rsync bụ ngwá ọrụ mara mma (enwere, ọtụtụ ndị ọzọ) iji mepụta na idobe ndabere, na ọnụ.
[[email ~]$ rsync -zvr IMG_5267\ copy\=33\ copy\=ok.jpg ~/Desktop/ sending incremental file list IMG_5267 copy=33 copy=ok.jpg sent 2883830 bytes received 31 bytes 5767722.00 bytes/sec total size is 2882771 speedup is 1.00
Rịba ama: -z maka mkpakọ, -v maka verbose na -r maka ntughari.
56. Iwu: efu
Idobe ebe nchekwa na ihe onwunwe dị oke mkpa, dịka ọrụ ọ bụla nke onye nchịkwa na-arụ, yana iwu 'free' na-abịa napụta ebe a.
[[email ~]$ free total used free shared buffers cached Mem: 2028240 1788272 239968 0 69468 363716 -/+ buffers/cache: 1355088 673152 Swap: 3905532 157076 3748456
[[email ~]$ free -b total used free shared buffers cached Mem: 2076917760 1838272512 238645248 0 71348224 372670464 -/+ buffers/cache: 1394253824 682663936 Swap: 3999264768 160845824 3838418944
[[email ~]$ free -k total used free shared buffers cached Mem: 2028240 1801484 226756 0 69948 363704 -/+ buffers/cache: 1367832 660408 Swap: 3905532 157076 3748456
[[email ~]$ free -m total used free shared buffers cached Mem: 1980 1762 218 0 68 355 -/+ buffers/cache: 1338 641 Swap: 3813 153 3660
[[email ~]$ free -g total used free shared buffers cached Mem: 1 1 0 0 0 0 -/+ buffers/cache: 1 0 Swap: 3 0 3
[[email ~]$ free -h total used free shared buffers cached Mem: 1.9G 1.7G 208M 0B 68M 355M -/+ buffers/cache: 1.3G 632M Swap: 3.7G 153M 3.6G
[[email ~]$ free -s 3 total used free shared buffers cached Mem: 2028240 1824096 204144 0 70708 364180 -/+ buffers/cache: 1389208 639032 Swap: 3905532 157076 3748456 total used free shared buffers cached Mem: 2028240 1824192 204048 0 70716 364212 -/+ buffers/cache: 1389264 638976 Swap: 3905532 157076 3748456
57. Iwu: mysqldump
Ọ dị mma ruo ugbu a, ị gaara aghọta ihe iwu a pụtara n'ezie, site na aha iwu a.mysqldump na-enye iwu ikpofu (ndabere) niile ma ọ bụ otu data nchekwa data n'ime faịlụ enyere. Dịka ọmụmaatụ,
[[email ~]$ mysqldump -u root -p --all-databases > /home/server/Desktop/backupfile.sql
Mara: mysqldump chọrọ mysql ka ọ na-agba ọsọ na paswọọdụ ziri ezi maka ikike. Anyị ejirila mysqldump Command kpuchie ụfọdụ iwu mysqldump bara uru na ndabere data.
58. Iwu: mkpasswd
Mepụta okwuntughe siri ike nghọta, nke ogologo dị ka akọwapụtara.
[[email ~]$ mkpasswd -l 10 zI4+Ybqfx9
[[email ~]$ mkpasswd -l 20 w0Pr7aqKk&hmbmqdrlmk
Mara: -l 10 na-ewepụta paswọọdụ na-enweghị usoro nke mkpụrụedemede 10 ebe -l 20 na-ewepụta paswọọdụ agwa 20, enwere ike ịtọ ya na ihe ọ bụla iji nweta nsonaazụ achọrọ. Iwu a bara ezigbo uru yana etinyere ya n'asụsụ scripting maka iwepụta okwuntughe enweghị usoro. Ị nwere ike ịnwe yum ma ọ bụ dabara ngwungwu 'atụ anya' iji iwu a.
yum install expect OR apt-get install expect
59. Iwu: tapawa
Jikọọ faịlụ ederede abụọ ma ọ bụ karịa na ahịrị iji. Ọmụmaatụ. Ọ bụrụ na ọdịnaya nke faịlụ 1 bụ:
1 2 3 and file2 was: a b c d the resulting file3 would be: 1 a 2 b 3 c d
60.Iwu: lsof
lsof na-anọchi anya \depụta faịlụ mepere emepe wee gosipụta faịlụ niile nke sistemụ gị meghere ugbu a. Ọ bara ezigbo uru ịchọpụta usoro nke na-eji otu faịlụ, ma ọ bụ gosipụta faịlụ niile maka otu usoro ụfọdụ bara uru 10 lsof Command. ọmụmaatụ, ị nwere ike ịmasị ịgụ.
[[email ~]$ lsof COMMAND PID TID USER FD TYPE DEVICE SIZE/OFF NODE NAME init 1 root cwd DIR 8,1 4096 2 / init 1 root rtd DIR 8,1 4096 2 / init 1 root txt REG 8,1 227432 395571 /sbin/init init 1 root mem REG 8,1 47080 263023 /lib/i386-linux-gnu/libnss_files-2.17.so init 1 root mem REG 8,1 42672 270178 /lib/i386-linux-gnu/libnss_nis-2.17.so init 1 root mem REG 8,1 87940 270187 /lib/i386-linux-gnu/libnsl-2.17.so init 1 root mem REG 8,1 30560 263021 /lib/i386-linux-gnu/libnss_compat-2.17.so init 1 root mem REG 8,1 124637 270176 /lib/i386-linux-gnu/libpthread-2.17.so init 1 root mem REG 8,1 1770984 266166 /lib/i386-linux-gnu/libc-2.17.so init 1 root mem REG 8,1 30696 262824 /lib/i386-linux-gnu/librt-2.17.so init 1 root mem REG 8,1 34392 262867 /lib/i386-linux-gnu/libjson.so.0.1.0 init 1 root mem REG 8,1 296792 262889 /lib/i386-linux-gnu/libdbus-1.so.3.7.2 init 1 root mem REG 8,1 34168 262840 /lib/i386-linux-gnu/libnih-dbus.so.1.0.0 init 1 root mem REG 8,1 95616 262848 /lib/i386-linux-gnu/libnih.so.1.0.0 init 1 root mem REG 8,1 134376 270186 /lib/i386-linux-gnu/ld-2.17.so init 1 root 0u CHR 1,3 0t0 1035 /dev/null init 1 root 1u CHR 1,3 0t0 1035 /dev/null init 1 root 2u CHR 1,3 0t0 1035 /dev/null init 1 root 3r FIFO 0,8 0t0 1714 pipe init 1 root 4w FIFO 0,8 0t0 1714 pipe init 1 root 5r 0000 0,9 0 6245 anon_inode init 1 root 6r 0000 0,9 0 6245 anon_inode init 1 root 7u unix 0xf5e91f80 0t0 8192 @/com/ubuntu/upstart init 1 root 8w REG 8,1 3916 394 /var/log/upstart/teamviewerd.log.1 (deleted)
Nke a abụghị njedebe, onye nchịkwa Sistemu na-eme ọtụtụ ihe, iji nye gị ọmarịcha interface dị otú ahụ, nke ị na-arụ ọrụ. Nchịkwa Sistemụ n'ezie bụ nka mmụta na itinye n'ọrụ n'ụzọ zuru oke. Anyị ga-agbalị ịnweta gị ihe ndị ọzọ dị mkpa nke onye ọkachamara Linux ga-amụtarịrị, linux na isi ya n'onwe ya, bụ usoro mmụta na mmụta. A na-achọ okwu ọma gị mgbe niile, nke na-agba anyị ume itinyekwu mgbalị iji nye gị akụkọ maara ihe.\Like na share Anyị, iji nyere anyị aka ịgbasa.