20 Awọn ofin ilọsiwaju fun Awọn amoye Linux
O ṣeun fun gbogbo awọn ayanfẹ, awọn ọrọ to dara ati atilẹyin ti o fun wa ni apakan akọkọ meji ti nkan yii. Ninu nkan akọkọ a jiroro awọn ofin fun awọn olumulo wọnyẹn ti o kan yipada si Lainos ati pe o nilo imoye ti o yẹ lati bẹrẹ pẹlu.
- Awọn iwulo iwulo 20 fun Awọn tuntun tuntun Linux
Ninu nkan keji a jiroro lori awọn aṣẹ eyiti olumulo ipele arin nilo lati ṣakoso eto tirẹ.
- Awọn ofin To ti ni ilọsiwaju 20 fun Awọn olumulo Lainos Ipele Aarin
Kini Nigbamii? Ninu nkan yii Emi yoo ṣe alaye awọn ofin wọnyẹn ti o nilo fun ṣiṣakoso Server Linux.
41. Commandfin: ifconfig
ifconfig ti lo lati tunto awọn atọkun nẹtiwọọki ti ngbe olugbe. O ti lo ni akoko bata lati ṣeto awọn atọkun bi o ṣe pataki. Lẹhin eyi, o nilo nigbagbogbo nigbati n ṣatunṣe aṣiṣe tabi nigbati o ba nilo atunṣe eto.
[[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)
Ṣe afihan awọn alaye ti Gbogbo awọn atọkun pẹlu awọn atọkun alaabo nipa lilo ariyanjiyan “-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
Firanṣẹ "192.168.1.12" bi adiresi IP fun eth0 wiwo.
[[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
Akiyesi: Ti o ba nlo nẹtiwọọki alailowaya o nilo lati lo aṣẹ “iwconfig“. Fun diẹ sii awọn apẹẹrẹ pipaṣẹ “ifconfig” ati lilo, ka Awọn pipaṣẹ 15 Wulo\"ifconfig".
42. Commandfin: netstat
aṣẹ netstat ṣafihan ọpọlọpọ alaye ti o jọmọ nẹtiwọọki gẹgẹbi awọn isopọ nẹtiwọọki, awọn tabili afisona, awọn iṣiro wiwo, awọn isopọ masquerade, awọn ọmọ ẹgbẹ multicast ati bẹbẹ lọ.,
[[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 ....
O DARA! Fun idi diẹ ti o ba fẹ lati ma yanju ogun, ibudo ati orukọ olumulo bi iṣujade ti netstat.
[[email ~]$ netstat -an
Dara, o le nilo lati gba iṣujade ti netstat lemọlemọfún titi ti ẹkọ ikẹkọ yoo fi kọja (ctrl+c).
[[email ~]$ netstat -c
Fun awọn apẹẹrẹ aṣẹ “netstat” diẹ sii ati lilo, wo nkan 20 Awọn apẹẹrẹ Aṣẹ Netstat.
43. Commandfin: nslookup
Eto iwulo nẹtiwọọki kan ti a lo lati gba alaye nipa awọn olupin Ayelujara. Gẹgẹbi orukọ rẹ ti ṣe imọran, iwulo wa alaye olupin orukọ fun awọn ibugbe nipasẹ bibere 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:
Yi nọmba ibudo pada nipa lilo eyiti o fẹ sopọ
[[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. Commandfin: ma wà
iwo jẹ ohun elo kan fun wiwa awọn orukọ olupin DNS fun alaye nipa awọn adirẹsi alejo, awọn paṣipaaro meeli, awọn olupin orukọ, ati alaye ti o jọmọ. Ọpa yii le ṣee lo lati eyikeyi Linux (Unix) tabi ẹrọ ṣiṣe Macintosh OS X. Lilo aṣoju julọ ti iwo ni lati jiroro ni ibeere fun alejo kan.
[[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. Commandfin: akoko asiko
O kan ti sopọ si Ẹrọ olupin Linux rẹ ati awọn nkan Nkan dani tabi irira, kini iwọ yoo ṣe? Ni imọran ... Rara, dajudaju kii ṣe o le ṣiṣe akoko asiko lati ṣayẹwo ohun ti o ṣẹlẹ gangan nigbati olupin ko ṣe abojuto.
[[email ~]$ uptime 14:37:10 up 4:21, 2 users, load average: 0.00, 0.00, 0.04
46. Commandfin: odi
ọkan ninu aṣẹ ti o ṣe pataki julọ fun alakoso, odi n ranṣẹ si gbogbo eniyan ti o wọle pẹlu igbanilaaye mesg wọn ti ṣeto si “bẹẹni”. A le fun ifiranṣẹ naa bi ariyanjiyan si odi, tabi o le firanṣẹ si igbewọle boṣewa odi.
[[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. pipaṣẹ: mesg
Jẹ ki o ṣakoso ti awọn eniyan ba le lo aṣẹ\"kọ", lati fi ọrọ ranṣẹ si ọ lori iboju naa.
mesg [n|y] n - prevents the message from others popping up on the screen. y – Allows messages to appear on your screen.
48. Commandfin: kọ
Jẹ ki o firanṣẹ ọrọ taara si iboju ti ẹrọ Linux miiran ti ‘mesg’ ba jẹ ‘y’.
[[email ~]$ write ravisaive
49. Commandfin: sọrọ
Imudara lati kọ aṣẹ, aṣẹ ọrọ n jẹ ki o sọrọ si awọn olumulo ti o wọle.
[[email ~]$ talk ravisaive
Akiyesi: Ti a ko ba fi aṣẹ ọrọ sii, o le gbamu nigbagbogbo tabi yum awọn idii ti o nilo.
[[email ~]$ yum install talk OR [[email ~]$ apt-get install talk
50. Commandfin: w
aṣẹ wo ni ‘w’ dabi pe o rẹrin? Ṣugbọn kosi kii ṣe. t ni aṣẹ, paapaa ti o ba kan jẹ lẹta kan ni gigun! Aṣẹ “w” jẹ apapọ akoko asiko ati ẹniti o paṣẹ fun ọkan lẹsẹkẹsẹ lẹhin ekeji, ni aṣẹ yẹn.
[[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. Commandfin: fun lorukọ mii
Bi orukọ ṣe daba, aṣẹ yii fun lorukọ mii awọn faili. fun lorukọ mii yoo fun lorukọ mii awọn faili pàtó nipa rirọpo iṣẹlẹ akọkọ lati orukọ faili naa.
Give the file names a1, a2, a3, a4.....1213
Kan tẹ aṣẹ naa.
rename a1 a0 a? rename a1 a0 a??
52. Commandfin: top
Han awọn ilana ti Sipiyu. Aṣẹ yii sọ di alaifọwọyi, nipasẹ aiyipada ati tẹsiwaju lati ṣe afihan awọn ilana Sipiyu ayafi ti a ba fun ni idilọwọ-ẹkọ.
[[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
Ka Tun: Awọn apẹẹrẹ TOfin 12 TOP
53. Commandfin: mkfs.ext4
Aṣẹ yii ṣẹda eto faili ext4 tuntun lori ẹrọ ti a ṣalaye, ti ẹrọ atẹle ba tẹle lẹhin aṣẹ yii, gbogbo bulọọki yoo parun ati pa akoonu rẹ, nitorinaa o daba pe ki o ma ṣe ṣiṣe aṣẹ yii ayafi ti ati titi o fi ye ohun ti o n ṣe.
Mkfs.ext4 /dev/sda1 (sda1 block will be formatted) mkfs.ext4 /dev/sdb1 (sdb1 block will be formatted)
Ka siwaju: Kini Ext4 ati Bii o ṣe Ṣẹda ati Yiyipada
54. Commandfin: vi/emacs/nano
vi (iworan), emacs, nano jẹ diẹ ninu awọn olootu ti a nlo julọ ni Linux. Wọn lo nigbagbogbo lati satunkọ ọrọ, iṣeto, awọn faili…. Itọsọna iyara lati ṣiṣẹ ni ayika vi ati nano ni, emacs jẹ a.
[[email ~]$ touch a.txt (creates a text file a.txt) [[email ~]$ vi a.txt (open a.txt with vi editor)
[tẹ 'i' lati tẹ ipo ifibọ sii, tabi o ko le ni-tẹ ohunkohun]
echo "Hello" (your text here for the file)
- alt + x (ipo ti a fi sii jade, ranti lati tọju aaye diẹ laarin lẹta ti o kẹhin.
- ctrl+x pipaṣẹ tabi ọrọ ikẹhin rẹ yoo paarẹ).
- : wq! (ṣafipamọ faili naa, pẹlu ọrọ lọwọlọwọ, ranti ‘!’ ni lati fagile).
[[email ~]$ nano a.txt (open a.txt file to be edited with nano)
edit, with the content, required
ctrl+x (lati pa olootu naa). Yoo fihan iṣẹjade bi:
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ? Y Yes N No ^C Cancel
Tẹ ‘y’ si bẹẹni ki o tẹ orukọ faili sii, ati pe o ti pari.
55. Commandfin: rsync
Awọn faili idaako Rsync ati pe o ni iyipada -P fun ọpa ilọsiwaju. Nitorina ti o ba ti fi sori ẹrọ rsync, o le lo inagijẹ ti o rọrun.
alias cp='rsync -aP'
Nisisiyi gbiyanju lati daakọ faili nla kan ni ebute ki o wo iṣẹjade pẹlu awọn ohun ti o ku, iru si ọpa ilọsiwaju.
Pẹlupẹlu, Ntọju ati Itọju afẹyinti jẹ ọkan ninu iṣẹ ti o ṣe pataki julọ ati alaidun ti oludari eto kan, nilo lati ṣe. Rsync jẹ ọpa ti o wuyi pupọ (o wa, ọpọlọpọ miiran) lati ṣẹda ati ṣetọju afẹyinti, ni ebute.
[[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
Akiyesi: -z fun funmorawon, -v fun ọrọ-ọrọ ati -r fun atunṣe.
56. Commandfin: ọfẹ
Mimu orin ti iranti ati awọn ohun elo jẹ pataki pupọ, bi eyikeyi iṣẹ-ṣiṣe miiran ti oludari kan ṣe, ati pe ‘ọfẹ’ aṣẹ wa lati gbala nihin.
[[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. Commandfin: mysqldump
O dara titi di isisiyi iwọ yoo ti loye kini aṣẹ yii jẹ gangan fun, lati orukọ aṣẹ yii. MySQL aṣẹ paṣẹ awọn fifọ (awọn afẹyinti) gbogbo tabi data ibi ipamọ data kan sinu faili ti a fun.
[[email ~]$ mysqldump -u root -p --all-databases > /home/server/Desktop/backupfile.sql
Akiyesi: mysqldump nilo MySQL lati ṣiṣẹ ati ṣatunṣe ọrọ igbaniwọle fun asẹ. A ti bo diẹ ninu iwulo “mysqldump” to wulo ni Afẹyinti data pẹlu mysqldump Command
58. Commandfin: mkpasswd
Ṣe a lile-lati-gboju le won, ọrọigbaniwọle laileto ti ipari bi a ti ṣalaye.
[[email ~]$ mkpasswd -l 10 zI4+Ybqfx9
[[email ~]$ mkpasswd -l 20 w0Pr7aqKk&hmbmqdrlmk
Akiyesi: -l 10 ṣe agbejade ọrọigbaniwọle alailẹgbẹ ti awọn ohun kikọ 10 lakoko ti -l 20 ṣe gbogbo ọrọ igbaniwọle ti ohun kikọ 20, o le ṣeto si ohunkohun lati gba abajade ti o fẹ. Aṣẹ yii wulo pupọ ati gbekalẹ ni ede afọwọkọ nigbagbogbo lati ṣe awọn ọrọ igbaniwọle laileto. O le nilo lati yum tabi yẹ package ‘reti’ lati lo aṣẹ yii.
yum install expect OR apt-get install expect
59. Commandfin: lẹẹ
Dapọ awọn faili ọrọ meji tabi diẹ sii lori awọn ila nipa lilo. Apẹẹrẹ. Ti akoonu ti faili1 ba jẹ:
1 2 3 and file2 was: a b c d the resulting file3 would be: 1 a 2 b 3 c d
60.Command: lsof
lsof duro fun\"ṣe akojọ awọn faili ṣiṣii" ati ṣafihan gbogbo awọn faili ti eto rẹ ti ṣii lọwọlọwọ. O wulo pupọ lati ṣawari iru awọn ilana ti o nlo faili kan, tabi lati ṣe afihan gbogbo awọn faili fun ilana kan. Diẹ ninu iwulo 10 lsof wulo awọn apẹẹrẹ, o le nifẹ ninu kika.
[[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)
Eyi kii ṣe opin, Oluṣakoso System ṣe ọpọlọpọ nkan, lati pese irufẹ wiwo ti o dara fun ọ, lori eyiti o ṣiṣẹ. Isakoso eto jẹ gangan iṣe ti ẹkọ ati imuse ni ọna pipe pupọ pupọ. A yoo gbiyanju lati gba ọ pẹlu gbogbo nkan miiran ti o jẹ dandan eyiti ọjọgbọn linux gbọdọ kọ, linux ni ipilẹ rẹ funrararẹ, jẹ ilana ti ẹkọ ati ẹkọ. Awọn ọrọ rẹ ti o dara ni a wa nigbagbogbo, eyiti o ṣe iwuri fun wa lati ni ipa diẹ sii lati fun ọ ni nkan ti oye.\"Fẹran ki o pin Wa, lati ṣe iranlọwọ fun wa kaakiri".