This isn’t really a tutorial, more like a list of some of the bash commands that I use the most and a very brief description of what I use them for. Questo non è realmente un tutorial, più simile a un elenco di alcuni dei comandi bash che uso di più e una breve descrizione di ciò che ho per loro uso.
ifconfig
Used to find out your IP address. Usato per scoprire il vostro indirizzo IP. (look at wlan0, the line beginning with ‘inet addr’) (si guardi wlan0, la linea che inizia con 'inet addr')
[kmurray@radon ~]$ /sbin/ifconfig [kmurray @ radon ~] $ / sbin / ifconfig
lo Link encap:Local Loopback lo Link encap: Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet addr: 127.0.0.1 Mask: 255.0.0.0
inet6 addr: ::1/128 Scope:Host inet6 addr::: 1 / 128 Scope: Host
UP LOOPBACK RUNNING MTU:16436 Metric:1 UP loopback RUNNING MTU: 16436 Metric: 1
RX packets:19266 errors:0 dropped:0 overruns:0 frame:0 RX pacchetti: 19266 errori: 0 abbandonato: 0 overruns: 0 frame: 0
TX packets:19266 errors:0 dropped:0 overruns:0 carrier:0 TX pacchetti: 19266 errori: 0 abbandonato: 0 overruns: 0 carrier: 0
collisions:0 txqueuelen:0 collisions: 0 txqueuelen: 0
RX bytes:963988 (941.3 KiB) TX bytes:963988 (941.3 KiB) RX bytes: 963988 (941.3 KIB) TX bytes: 963988 (941.3 KIB)
wlan0 Link encap:Ethernet HWaddr 00:1A:73:0F:0E:FD wlan0 Link encap: Ethernet HWaddr 0:01 A: 73:0 F: 0E: FD
inet addr:192.168.1.139 Bcast:192.168.1.255 Mask:255.255.255.0 inet addr: 192.168.1.139 Bcast: 192.168.1.255 Mask: 255.255.255.0
inet6 addr: fe80::21a:73ff:fe0f:efd/64 Scope:Link inet6 addr: fe80:: 21: 73ff: fe0f: efd/64 Ambito di applicazione: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1
RX packets:8712 errors:0 dropped:0 overruns:0 frame:0 RX pacchetti: 8712 errori: 0 abbandonato: 0 overruns: 0 frame: 0
TX packets:8944 errors:0 dropped:0 overruns:0 carrier:0 TX pacchetti: 8944 errori: 0 abbandonato: 0 overruns: 0 carrier: 0
collisions:0 txqueuelen:1000 collisions: 0 txqueuelen: 1000
RX bytes:8002586 (7.6 MiB) TX bytes:3113446 (2.9 MiB) RX bytes: 8002586 (7.6 MiB) TX bytes: 3113446 (2.9 MiB)
route -n route-n
Used to find the IP address of your default gateway. Usato per trovare l'indirizzo IP del gateway predefinito. (look for the line with a G in the Flags column} (look per la linea con una G nella colonna Flags)
[kmurray@radon ~]$ /sbin/route -n [kmurray @ radon ~] $ / sbin / route-n
Kernel IP routing table Kernel tabella di routing IP
Destination Gateway Genmask Flags Metric Ref Use Iface Destination Gateway Genmask Flags Metric Ref uso iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
ip
I use this one similarly to ifconfig and route. Io uso questa uno simile a quello di ifconfig e route.
[kmurray@radon ~]$ /sbin/ip route [kmurray @ radon ~] $ / sbin / ip route
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.139 192.168.1.0/24 dev wlan0 proto kernel portata collegamento src 192.168.1.139
default via 192.168.1.1 dev wlan0 proto static default via 192.168.1.1 dev wlan0 proto statica
[kmurray@radon ~]$ /sbin/ip addr [kmurray @ radon ~] $ / sbin / ip addr
1: lo: 1: lo:
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 link / loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo inet 127.0.0.1 / 8 portata ospitante lo
inet6 ::1/128 scope host inet6:: 1 / 128 portata ospitante
valid_lft forever preferred_lft forever valid_lft eterno preferred_lft forever
2: eth0: 2: eth0:
link/ether 00:16:d4:ec:25:4b brd ff:ff:ff:ff:ff:ff link / ether 00:16: d4: CE: 25:4 b brd ff: ff: ff: ff: ff: ff
3: wlan0: 3: wlan0:
link/ether 00:1a:73:0f:0e:fd brd ff:ff:ff:ff:ff:ff link / etere 0:01 A: 73:0 f: 0e: fd brd ff: ff: ff: ff: ff: ff
inet 192.168.1.139/24 brd 192.168.1.255 scope global wlan0 inet 192.168.1.139/24 brd 192.168.1.255 portata globale wlan0
inet6 fe80::21a:73ff:fe0f:efd/64 scope link inet6 fe80:: 21: 73ff: fe0f: efd/64 portata link
valid_lft forever preferred_lft forever valid_lft eterno preferred_lft forever
ping
Used to test network connectivity. Usato per testare la connettività di rete.
[kmurray@radon ~]$ ping 192.168.1.1 [kmurray @ radon ~] $ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. PING 192.168.1.1 (192.168.1.1) 56 (84) byte di dati.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.23 ms 64 byte da 192.168.1.1: icmp_seq = 1 ttl = 64 time = 1.23 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=1.17 ms 64 byte da 192.168.1.1: icmp_seq = 2 ttl = 64 time = 1.17 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=1.14 ms 64 byte da 192.168.1.1: icmp_seq = 3 ttl = 64 time = 1.14 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=1.19 ms 64 byte da 192.168.1.1: icmp_seq = 4 ttl = 64 time = 1.19 ms
^C ^ C
— 192.168.1.1 ping statistics — - 192.168.1.1 ping statistiche --
4 packets transmitted, 4 received, 0% packet loss, time 3268ms 4 pacchetti trasmessi, ricevuti 4, 0% la perdita del pacchetto, il tempo 3268ms
rtt min/avg/max/mdev = 1.149/1.190/1.238/0.032 ms RTT min / avg / max / mdev = 1.149/1.190/1.238/0.032 ms
traceroute
Another network connectivity tool. Un altro strumento di connettività di rete. This one tells you how many routers you have to go through in order to connect to a particular host. Questo indica il numero di router dovete passare attraverso al fine di connettersi a un particolare host.
[kmurray@radon ~]$ traceroute simplehelp.net [kmurray @ radon ~] $ traceroute simplehelp.net
traceroute to simplehelp.net (74.52.95.42), 30 hops max, 60 byte packets traceroute per simplehelp.net (74.52.95.42), 30 luppolo max, 60 byte pacchetti
1 192.168.1.1 (192.168.1.1) 1.121 ms 2.010 ms 2.218 ms 1 192.168.1.1 (192.168.1.1) 1.121 ms 2.010 ms 2.218 ms
2 24.68.178.1 (24.68.178.1) 25.950 ms * * 2 24.68.178.1 (24.68.178.1) 25,950 ms * *
3 * * * 3 * * *
4 * * * 4 * * *
5 rc2bb-pos0-1-5-0.vc.shawcable.net (66.163.77.185) 39.178 ms 128.371 ms 50.787 ms 5 rc2bb-pos0-1-5-0.vc.shawcable.net (66.163.77.185) 39,178 ms 128.371 ms 50.787 ms
6 rc2sj-pos6-0-0.cl.shawcable.net (66.163.77.70) 119.703 ms 76.364 ms 88.337 ms 6 rc2sj-pos6-0-0.cl.shawcable.net (66.163.77.70) 119,703 ms 76.364 ms 88.337 ms
7 rc2sj-ge2-0-0.cl.shawcable.net (66.163.67.10) 110.862 ms 55.853 ms * 7 rc2sj-ge2-0-0.cl.shawcable.net (66.163.67.10) 110,862 ms 55.853 ms *
8 * rx0sj-comcast.cl.shawcable.net (66.163.67.110) 61.930 ms 109.439 ms 8 * rx0sj-comcast.cl.shawcable.net (66.163.67.110) 61,930 ms 109.439 ms
9 pos-0-8-0-0-cr01.losangeles.ca.ibone.comcast.net (68.86.85.82) 79.587 ms 102.306 ms 81.225 ms 9 pos-0-8-0-0-cr01.losangeles.ca.ibone.comcast.net (68.86.85.82) 79,587 ms 102.306 ms 81.225 ms
10 pos-0-9-0-0-cr01.dallas.tx.ibone.comcast.net (68.86.85.142) 120.064 ms 125.584 ms 118.207 ms 10 pos-0-9-0-0-cr01.dallas.tx.ibone.comcast.net (68.86.85.142) 120,064 ms 125.584 ms 118.207 ms
11 68.86.88.50 (68.86.88.50) 107.133 ms 109.350 ms 113.994 ms 11 68.86.88.50 (68.86.88.50) 107,133 ms 109.350 ms 113.994 ms
12 te9-1.dsr02.dllstx3.theplanet.com (70.87.253.22) 87.928 ms 87.949 ms te9-1.dsr01.dllstx3.theplanet.com (70.87.253.6) 89.500 ms 12 te9-1.dsr02.dllstx3.theplanet.com (70.87.253.22) 87,928 ms 87.949 ms te9-1.dsr01.dllstx3.theplanet.com (70.87.253.6) 89,500 ms
13 76.fd.5746.static.theplanet.com (70.87.253.118) 99.789 ms 97.329 ms 100.789 ms 13 76.fd.5746.static.theplanet.com (70.87.253.118) 99,789 ms 97.329 ms 100.789 ms
14 po1.car03.dllstx6.theplanet.com (12.96.160.5) 91.323 ms 91.788 ms po2.car03.dllstx6.theplanet.com (12.96.160.37) 89.571 ms 14 po1.car03.dllstx6.theplanet.com (12.96.160.5) 91,323 ms 91.788 ms po2.car03.dllstx6.theplanet.com (12.96.160.37) 89,571 ms
15 2a.5f.344a.static.theplanet.com (74.52.95.42) 92.695 ms 92.601 ms 91.871 ms 15 2a.5f.344a.static.theplanet.com (74.52.95.42) 92,695 ms 92.601 ms 91.871 ms
host ospite
Used to look up the IP address of a fully qualified domain name. Usato per cercare l'indirizzo IP di un nome di dominio pienamente qualificato.
[kmurray@radon ~]$ host simplehelp.net [kmurray @ radon ~] $ host simplehelp.net
simplehelp.net has address 74.52.95.42 simplehelp.net ha indirizzo 74.52.95.42
simplehelp.net mail is handled by 10 aspmx.l.google.com. simplehelp.net mail è gestito da 10 aspmx.l.google.com.
dig scavare
A more advanced DNS query tool. Un più avanzato strumento di query DNS.
[kmurray@radon ~]$ dig simplehelp.net a [kmurray @ radon ~] $ dig simplehelp.net uno
; <<>> DiG 9.5.0-P2 <<>> simplehelp.net a ; <<>> DIG 9.5.0-P2 <<>> simplehelp.net uno
;; global options: printcmd ;; Globale opzioni: printcmd
;; Got answer: ;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25242 ;; ->> HEADER <<- opcode: QUERY, status: NOERROR, id: 25242
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; Flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION: ;; QUESTION SECTION:
;simplehelp.net. ; simplehelp.net. IN A IN UN
;; ANSWER SECTION: ;; ANSWER SECTION:
simplehelp.net. 86238 IN A 74.52.95.42 86238 IN A 74.52.95.42
;; Query time: 1 msec ;; Query time: 1 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) ;; SERVER: 192.168.1.1 # 53 (192.168.1.1)
;; WHEN: Fri Oct 31 20:21:49 2008 ;; QUANDO: ven ott 31 20:21:49 2008
;; MSG SIZE rcvd: 48 ;; MSG SIZE rcvd: 48
This shows that the IP address of the server where simplehelp.net resides is 74.52.95.42. Ciò dimostra che l'indirizzo IP del server su cui risiede è simplehelp.net 74.52.95.42.
[kmurray@radon ~]$ dig simplehelp.net mx [kmurray @ radon ~] $ dig simplehelp.net mx
; <<>> DiG 9.5.0-P2 <<>> simplehelp.net mx ; <<>> DIG 9.5.0-P2 <<>> mx simplehelp.net
;; global options: printcmd ;; Globale opzioni: printcmd
;; Got answer: ;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17277 ;; ->> HEADER <<- opcode: QUERY, status: NOERROR, id: 17277
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 2 ;; Flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 2
;; QUESTION SECTION: ;; QUESTION SECTION:
;simplehelp.net. ; simplehelp.net. IN MX IN MX
;; ANSWER SECTION: ;; ANSWER SECTION:
simplehelp.net. 86317 IN MX 10 aspmx.l.google.com. 86317 IN MX 10 aspmx.l.google.com.
;; ADDITIONAL SECTION: ;; ADDITIONAL SECTION:
aspmx.l.google.com. 180 IN A 209.85.199.27 180 IN A 209.85.199.27
aspmx.l.google.com. 180 IN A 209.85.199.114 180 IN UN 209.85.199.114
;; Query time: 40 msec ;; Query time: 40 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) ;; SERVER: 192.168.1.1 # 53 (192.168.1.1)
;; WHEN: Fri Oct 31 20:21:51 2008 ;; QUANDO: ven ott 31 20:21:51 2008
;; MSG SIZE rcvd: 98 ;; MSG SIZE rcvd: 98
This shows that mail for simplehelp.net is managed by aspmx.l.google.com and that aspmx.l.google.com has two IP addresses, 209.85.199.27 and 209.85.199.114. Ciò dimostra che la posta per simplehelp.net è gestito da aspmx.l.google.com aspmx.l.google.com e che ha due indirizzi IP, 209.85.199.27 e 209.85.199.114.
[kmurray@radon ~]$ dig simplehelp.net ns [kmurray @ radon ~] $ dig simplehelp.net ns
; <<>> DiG 9.5.0-P2 <<>> simplehelp.net ns ; <<>> DIG 9.5.0-P2 <<>> simplehelp.net ns
;; global options: printcmd ;; Globale opzioni: printcmd
;; Got answer: ;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62957 ;; ->> HEADER <<- opcode: QUERY, status: NOERROR, id: 62957
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 8 ;; Flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 8
;; QUESTION SECTION: ;; QUESTION SECTION:
;simplehelp.net. ; simplehelp.net. IN NS IN NS
;; ANSWER SECTION: ;; ANSWER SECTION:
simplehelp.net. 70617 IN NS ns1.theplanet.com. 70617 IN NS ns1.theplanet.com.
simplehelp.net. 70617 IN NS ns2.theplanet.com. 70617 IN NS ns2.theplanet.com.
;; ADDITIONAL SECTION: ;; ADDITIONAL SECTION:
ns1.theplanet.com. 172785 IN A 70.86.61.133 172785 IN A 70.86.61.133
ns2.theplanet.com. 172785 IN A 70.86.61.135 172785 IN A 70.86.61.135
ns1.theplanet.com. 172785 IN A 70.86.61.134 172785 IN A 70.86.61.134
ns2.theplanet.com. 172785 IN A 70.87.7.73 172785 IN UN 70.87.7.73
ns1.theplanet.com. 172785 IN A 70.87.7.71 172785 IN UN 70.87.7.71
ns1.theplanet.com. 172785 IN A 70.87.7.70 172785 IN UN 70.87.7.70
ns2.theplanet.com. 172785 IN A 70.86.61.136 172785 IN A 70.86.61.136
ns2.theplanet.com. 172785 IN A 70.87.7.72 172785 IN UN 70.87.7.72
;; Query time: 33 msec ;; Query time: 33 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) ;; SERVER: 192.168.1.1 # 53 (192.168.1.1)
;; WHEN: Fri Oct 31 20:21:55 2008 ;; QUANDO: ven ott 31 20:21:55 2008
;; MSG SIZE rcvd: 209 ;; MSG SIZE rcvd: 209
This shows that DNS for simplehelp.net is handled by ns1.theplanet.com and ns2.theplanet.com. Ciò dimostra che il DNS per simplehelp.net è gestita da ns1.theplanet.com e ns2.theplanet.com. It also shows that these nameservers have multiple IP addresses. Esso dimostra inoltre che questi nomi sono più indirizzi IP.
iwlist
Get information from a wireless interface. Ottenere informazioni da un interfaccia wireless. (this one needs to be run as root) (questo deve essere eseguito da root)
[root@radon ~]# iwlist wlan0 scan [root @ radon ~] # iwlist wlan0 scansione
wlan0 Scan completed : wlan0 Scan completato:
Cell 01 - Address: 00:10:18:90:20:DB Cell 01 - Indirizzo: 00:10:18:90:20: DB
ESSID:”Coffee” ESSID: "Caffè"
Mode:Master Modalità: Master
Channel:6 Canale: 6
Frequency:2.437 GHz (Channel 6) Frequenza: 2.437 GHz (Canale 6)
Quality=96/100 Signal level:-37 dBm Noise level=-70 dBm Qualità = 96/100 Signal level: -37 dBm livello di rumore =- 70 dBm
Encryption key:off Chiave di cifratura: off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s Bit Prezzi: 1 Mb / s, 2 Mb / s; 5.5 Mb / s; 11 Mb / s; 6 Mb / s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s 9 Mb / s; 12 Mb / s; 18 Mb / s; 24 Mb / s; 36 Mb / s
48 Mb/s; 54 Mb/s 48 Mb / s; 54 Mb / s
Extra:tsf=0000017f91cc818a Extra: TSF = 0000017f91cc818a
Extra: Last beacon: 19ms ago Extra: Ultimo faro: 19ms fa
Cell 02 - Address: 00:11:50:6E:BC:3A Cell 02 - Indirizzo: 00:11:50:6 E: BC: 3A
ESSID:”Belkin Traveler” ESSID: "Belkin Traveler"
Mode:Master Modalità: Master
Channel:1 Canale: 1
Frequency:2.412 GHz (Channel 1) Frequenza: 2.412 GHz (Canale 1)
Quality=88/100 Signal level:-44 dBm Noise level=-70 dBm Qualità = 88/100 Signal level: -44 dBm livello di rumore =- 70 dBm
Encryption key:off Chiave di cifratura: off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s Bit Prezzi: 1 Mb / s, 2 Mb / s; 5.5 Mb / s; 11 Mb / s; 6 Mb / s
12 Mb/s; 24 Mb/s; 36 Mb/s; 9 Mb/s; 18 Mb/s 12 Mb / s; 24 Mb / s; 36 Mb / s; 9 Mb / s; 18 Mb / s
48 Mb/s; 54 Mb/s 48 Mb / s; 54 Mb / s
Extra:tsf=0000017f13571181 Extra: TSF = 0000017f13571181
Extra: Last beacon: 601ms ago Extra: Ultimo faro: 601ms fa
Cell 03 - Address: 00:17:9A:9C:14:28 Cell 03 - Indirizzo: 00:17:9 A: 9C: 14:28
ESSID:”Abby” ESSID: "Abby"
Mode:Master Modalità: Master
Channel:6 Canale: 6
Frequency:2.437 GHz (Channel 6) Frequenza: 2.437 GHz (Canale 6)
Quality=50/100 Signal level:-79 dBm Noise level=-70 dBm Qualità = 50/100 Signal level: -79 dBm livello di rumore =- 70 dBm
Encryption key:off Chiave di cifratura: off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s Bit Prezzi: 1 Mb / s, 2 Mb / s; 5.5 Mb / s; 11 Mb / s; 6 Mb / s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s 9 Mb / s; 12 Mb / s; 18 Mb / s; 24 Mb / s; 36 Mb / s
48 Mb/s; 54 Mb/s 48 Mb / s; 54 Mb / s
Extra:tsf=00000000cbe364d6 Extra: TSF = 00000000cbe364d6
Extra: Last beacon: 272ms ago Extra: Ultimo faro: 272ms fa
Cell 04 - Address: 00:18:D1:A8:E8:1A Cell 04 - Indirizzo: 00:18: D1: A8: E8: 1A
ESSID:”Gigaset815″ ESSID: "Gigaset815"
Mode:Master Modalità: Master
Channel:4 Canale: 4
Frequency:2.427 GHz (Channel 4) Frequenza: 2.427 GHz (Channel 4)
Quality=45/100 Signal level:-83 dBm Noise level=-70 dBm Qualità = 45/100 Signal level: -83 dBm livello di rumore =- 70 dBm
Encryption key:on Chiave di cifratura: su
IE: WPA Version 1 IE: WPA Versione 1
Group Cipher : TKIP Cifratura Gruppo: TKIP
Pairwise Ciphers (1) : TKIP A due a due cifre (1): TKIP
Authentication Suites (1) : PSK Autenticazione Suite (1): PSK
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 22 Mb/s Bit Prezzi: 1 Mb / s, 2 Mb / s; 5.5 Mb / s; 11 Mb / s; 22 Mb / s
6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s 6 Mb / s; 9 Mb / s; 12 Mb / s; 18 Mb / s; 24 Mb / s
36 Mb/s; 48 Mb/s; 54 Mb/s 36 Mb / s; 48 Mb / s; 54 Mb / s
Extra:tsf=0000015633a50e12 Extra: TSF = 0000015633a50e12
Extra: Last beacon: 571ms ago Extra: Ultimo faro: 571ms fa
This shows that my computer currently sees four different wireless networks in the area along with their names, channels, signal strength, and whether or not they are encrypted or open. Ciò dimostra che il mio computer attualmente vede quattro diverse reti wireless nella zona insieme con i loro nomi, i canali, la potenza del segnale, e il fatto che siano o meno aperte o criptati.
iwconfig
Like ifconfig, but for information about your wireless settings. Come ifconfig, ma per informazioni su mettere le impostazioni wireless.
[kmurray@radon ~]$ /sbin/iwconfig [kmurray @ radon ~] $ / sbin / iwconfig
lo no wireless extensions. In verità non senza fili estensioni.
eth0 no wireless extensions. eth0 no wireless extensions.
wlan0 IEEE 802.11bg ESSID:”Coffee” wlan0 IEEE 802.11bg ESSID: "Caffè"
Mode:Managed Frequency:2.437 GHz Access Point: 00:10:18:90:20:DB Mode: Managed Frequency: 2.437 GHz Access Point: 00:10:18:90:20: DB
Bit Rate=54 Mb/s Tx-Power=27 dBm Bit Rate = 54 Mb / s Tx-Power = 27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B Riprova limite min: 7 RTS Gio: Gio off Frammento B = 2352
Link Quality=96/100 Signal level:-37 dBm Noise level=-70 dBm Link Quality = 96/100 Signal level: -37 dBm livello di rumore =- 70 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Rx non validi nwid: 0 Rx cripta non valido: 0 Rx invalido frammentato: 0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0 Tx eccessivo tentativi: 0 Invalid misc: 0 Missed beacon: 0
This shows that I’m currently connected to a wireless network called Coffee at 54 Mb/s and the signal strength is very good at 96%. Ciò dimostra che sto attualmente collegato a una rete wireless, chiamato caffè a 54 Mb / s e la potenza del segnale è molto buona al 96%.
free libero
How much memory and swap space is used/free. La quantità di memoria e lo spazio di swap viene usata / libera.
[kmurray@radon ~]$ free -m [kmurray @ radon ~] $ free-m
total used free shared buffers cached totale utilizzato gratuitamente buffer cache condivisa
Mem: 2017 1659 357 0 42 1078 Mem: 2017 1659 357 0 42 1078
-/+ buffers/cache: 538 1478 - / + Buffers / cache: 538 1478
Swap: 1983 0 1983 Swap: 1983 0 1983
mount montare
Without any parameters, used to display mounted filesystems. Senza parametri, utilizzato per visualizzare i filesystem montato.
[kmurray@radon ~]$ mount [kmurray @ radon ~] $ mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw,noatime) / dev/mapper/VolGroup00-LogVol00 il / tipo ext3 (rw, noatime)
proc on /proc type proc (rw) proc su / proc tipo proc (rw)
sysfs on /sys type sysfs (rw) sysfs su / sys sysfs tipo (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620) devpts in / dev / pts tipo devpts (rw, gid = 5, mode = 620)
/dev/sda2 on /boot type ext3 (rw,noatime) / dev/sda2 su / boot ext3 tipo (rw, noatime)
tmpfs on /dev/shm type tmpfs (rw) tmpfs in / dev / shm tmpfs tipo (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) nessuno in / proc / sys / fs / binfmt_misc tipo binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) sunrpc in / var / lib / nfs / rpc_pipefs tipo rpc_pipefs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw) fusectl su / sys / fs / fusibile / connessioni di tipo fusectl (rw)
gvfs-fuse-daemon on /home/kmurray/.gvfs type fuse.gvfs-fuse-daemon(rw,nosuid,nodev,user=kmurray) gvfs-fusibile-demone in / home / kmurray / .gvfs tipo fuse.gvfs-fusibile-demone (rw, nosuid, nodev, user = kmurray)
/dev/sda1 on /media/disk type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096) / dev/sda1 on / media / fuseblk tipo di disco (rw, nosuid, nodev, allow_other, blksize = 4096)
The interesting lines above are the ones indicating /dev/mapper/VolGroup00-LogVol00 on /, /dev/sda2 on /boot, and /dev/sda1 on /media/disk. Le linee sopra interessanti sono quelli che indicano / dev/mapper/VolGroup00-LogVol00 a /, / dev/sda2 su / boot, e / dev/sda1 on / media / disco.
df
Show disk space usage. Visualizza l'utilizzo di spazio su disco.
[kmurray@radon ~]$ df -h [kmurray @ radon ~] $ df-h
Filesystem Size Used Avail Use% Mounted on Filesystem dimensioni, utilizzati Libero uso montato su%
/dev/sda2 190M 19M 162M 11% /boot / dev/sda2 190 19m 162M 11% / boot
tmpfs 1009M 1.1M 1008M 1% /dev/shm tmpfs 1009M 1.1M 1008M 1% / dev / shm
gvfs-fuse-daemon 60G 44G 16G 74% /home/kmurray/.gvfs gvfs-fusibile-demone 60g 44G 16G 74% / home / kmurray / .gvfs
/dev/sda1 31G 29G 2.5G 93% /media/disk / dev/sda1 31G 29g 2.5G 93% / media / disco
This shows that /dev/sda1 is almost full at 93%. Ciò dimostra che / dev/sda1 è quasi completo a 93%. Time to delete some files or upgrade the disk. Tempo di eliminare alcuni file o aggiornare il disco.
du
Show disk space usage in a directory. Visualizza l'utilizzo di spazio su disco in una directory.
[kmurray@radon ~]$ du -hc Documents/N95/tutorials/ [kmurray @ radon ~] $ du-hc Documents/N95/tutorials /
380K Documents/N95/tutorials/done/bluetooth gps 380K Documents/N95/tutorials/done/bluetooth gps
480K Documents/N95/tutorials/done/putty fonts 480K Documents/N95/tutorials/done/putty font
1.4M Documents/N95/tutorials/done/gparted 1.4M Documents/N95/tutorials/done/gparted
1.1M Documents/N95/tutorials/done/remote filesystem gnome 1.1M Documents/N95/tutorials/done/remote filesystem gnome
1.4M Documents/N95/tutorials/done/gnome keyboard shortcuts 1.4M Documents/N95/tutorials/done/gnome scorciatoie da tastiera
2.1M Documents/N95/tutorials/done/download helper 2,1 m Documents/N95/tutorials/done/download aiutante
992K Documents/N95/tutorials/done/mconnection 992K Documents/N95/tutorials/done/mconnection
1008K Documents/N95/tutorials/done/snap links 1008K Documents/N95/tutorials/done/snap link
5.0M Documents/N95/tutorials/done/watermark gimp 5.0M Documents/N95/tutorials/done/watermark gimp
1.2M Documents/N95/tutorials/done/gnome disk usage 1.2M Documents/N95/tutorials/done/gnome di spazio su disco
208K Documents/N95/tutorials/done/enhanced calculator 208k Documents/N95/tutorials/done/enhanced calcolatrice
544K Documents/N95/tutorials/done/putty/orig 544k Documents/N95/tutorials/done/putty/orig
964K Documents/N95/tutorials/done/putty 964K Documents/N95/tutorials/done/putty
848K Documents/N95/tutorials/done/wifi ap 848K Documents/N95/tutorials/done/wifi ap
1.4M Documents/N95/tutorials/done/imap gmail 1.4M Documents/N95/tutorials/done/imap gmail
872K Documents/N95/tutorials/done/unsigned apps 872K Documents/N95/tutorials/done/unsigned applicazioni
884K Documents/N95/tutorials/done/taskman 884k Documents/N95/tutorials/done/taskman
1.1M Documents/N95/tutorials/done/downthemall 1.1M Documents/N95/tutorials/done/downthemall
916K Documents/N95/tutorials/done/tethering bt 916K Documents/N95/tutorials/done/tethering bt
432K Documents/N95/tutorials/done/install apps wifi http 432K Documents/N95/tutorials/done/install applicazioni wifi http
924K Documents/N95/tutorials/done/tethering usb Documents/N95/tutorials/done/tethering USB 924K
320K Documents/N95/tutorials/done/install stuff via bluetooth 320K Documents/N95/tutorials/done/install roba tramite Bluetooth
416K Documents/N95/tutorials/done/smb4s60 416K Documents/N95/tutorials/done/smb4s60
1.1M Documents/N95/tutorials/done/download statusbar 1.1M Documents/N95/tutorials/done/download di stato
308K Documents/N95/tutorials/done/install stuff via usb 308K Documents/N95/tutorials/done/install roba via USB
828K Documents/N95/tutorials/done/nokia step counter 828K Documents/N95/tutorials/done/nokia passo contatore
4.3M Documents/N95/tutorials/todo 4.3M Documents/N95/tutorials/todo
52M Documents/N95/tutorials/ 52m Documents/N95/tutorials /
52M total 52m totale
This shows that my N95 tutorials directory is using a total of 52M and the breakdown of each directory’s size. Ciò dimostra che il mio N95 tutorial directory è utilizzando un totale di 52m e la ripartizione di ogni dimensione della directory.
head testa
Display the first few lines of a file. Mostra le prime linee di un file.
[kmurray@radon ~]$ head /var/log/yum.log [kmurray @ radon ~] $ testa / var / log / yum.log
Jun 13 22:30:33 Installed: bash-completion-20060301-10.noarch Giu 13 22:30:33 Realizzazione: bash-completamento-20060301-10.noarch
Jun 13 22:31:31 Installed: yum-downloadonly-1.1.13-2.fc9.noarch Giu 13 22:31:31 Realizzazione: yum-downloadonly-1.1.13-2.fc9.noarch
Jun 14 06:20:11 Installed: swfdec-0.6.6-1.fc9.i386 14 giu 06:20:11 Realizzazione: swfdec-0.6.6-1.fc9.i386
Jun 14 06:20:13 Installed: swfdec-gtk-0.6.6-1.fc9.i386 14 giu 06:20:13 Realizzazione: swfdec-gtk-0.6.6-1.fc9.i386
Jun 14 06:20:14 Installed: swfdec-mozilla-0.6.0-1.fc9.i386 14 giu 06:20:14 Realizzazione: swfdec-mozilla-0.6.0-1.fc9.i386
Jun 14 06:34:41 Updated: libxml2-2.6.32-2.fc9.i386 14 giu 06:34:41 Aggiornamento: libxml2-2.6.32-2.fc9.i386
Jun 14 06:34:41 Updated: dbus-glib-0.74-8.fc9.i386 14 giu 06:34:41 Aggiornamento: dbus-glib-0.74-8.fc9.i386
Jun 14 06:34:42 Updated: libselinux-2.0.64-2.fc9.i386 14 giu 06:34:42 Aggiornamento: libselinux-2.0.64-2.fc9.i386
Jun 14 06:34:43 Updated: e2fsprogs-libs-1.40.8-3.fc9.i386 14 giu 06:34:43 Aggiornamento: e2fsprogs-libs-1.40.8-3.fc9.i386
Jun 14 06:34:43 Updated: audit-libs-1.7.4-1.fc9.i386 14 giu 06:34:43 Aggiornamento: audit-libs-1.7.4-1.fc9.i386
By default, head displays the first 10 lines. head -20 /var/log/yum.log would show the first 20 lines. Per impostazione predefinita, capo visualizza le prime 10 righe. Testa -20 / var / log / yum.log che mostra il primo di 20 righe. You can use any arbitrary number. È possibile utilizzare qualsiasi numero arbitrario.
tail coda
Display the last few lines of a file. Visualizzare l'ultimo poche righe di un file.
[kmurray@radon ~]$ tail /var/log/yum.log [kmurray @ radon ~] $ tail / var / log / yum.log
Oct 30 23:19:56 Updated: 6:kdebase-libs-4.1.2-5.fc9.i386 Ott 30 23:19:56 Aggiornamento: 6: kdebase-libs-4.1.2-5.fc9.i386
Oct 30 23:19:57 Updated: 6:kdemultimedia-libs-4.1.2-2.fc9.i386 Ott 30 23:19:57 Aggiornamento: 6: kdemultimedia-libs-4.1.2-2.fc9.i386
Oct 30 23:19:57 Updated: ksysguardd-4.1.2-6.fc9.i386 Ott 30 23:19:57 Aggiornamento: ksysguardd-4.1.2-6.fc9.i386
Oct 30 23:19:58 Updated: phonon-backend-xine-4.1.2-5.fc9.i386 Ott 30 23:19:58 Aggiornamento: phonon-backend-xine-4.1.2-5.fc9.i386
Oct 30 23:20:08 Updated: kdebase-runtime-4.1.2-5.fc9.i386 Ott 30 23:20:08 Aggiornamento: kdebase-runtime-4.1.2-5.fc9.i386
Oct 30 23:20:11 Updated: kdebase-workspace-libs-4.1.2-6.fc9.i386 Ott 30 23:20:11 Aggiornamento: kdebase-lavoro-libs-4.1.2-6.fc9.i386
Oct 30 23:20:21 Updated: kdebase-workspace-4.1.2-6.fc9.i386 Ott 30 23:20:21 Aggiornamento: kdebase-4.1.2-lavoro-6.fc9.i386
Oct 30 23:20:27 Updated: 6:kdebase-4.1.2-5.fc9.i386 Ott 30 23:20:27 Aggiornamento: 6: kdebase-4.1.2-5.fc9.i386
Oct 30 23:20:39 Installed: kdebase-runtime-libs-4.1.2-5.fc9.i386 Ott 30 23:20:39 Realizzazione: kdebase-runtime-libs-4.1.2-5.fc9.i386
Oct 30 23:20:42 Updated: 6:kdemultimedia-4.1.2-2.fc9.i386 Ott 30 23:20:42 Aggiornamento: 6: kdemultimedia-4.1.2-2.fc9.i386
By default, tail displays the last 10 lines. tail -30 /var/log/yum.log would show the last 30 lines. Per impostazione predefinita, la coda mostra gli ultimi 10 righe. Coda -30 / var / log / yum.log dimostri l'ultimo 30 righe. You can use any arbitrary number. È possibile utilizzare qualsiasi numero arbitrario.
grep
Search for a specific string within a file. Ricerca di una specifica stringa all'interno di un file. (use zgrep to search a gzipped file) (uso zgrep a cercare un file gzippato)
[kmurray@radon ~]$ grep firefox /var/log/yum.log [kmurray @ radon ~] $ grep firefox / var / log / yum.log
Jun 19 16:19:33 Updated: firefox-3.0-1.fc9.i386 Giu 19 16:19:33 Aggiornamento: firefox-3.0-1.fc9.i386
Jul 24 04:48:06 Updated: firefox-3.0.1-1.fc9.i386 24 luglio 04:48:06 Aggiornamento: firefox-3.0.1-1.fc9.i386
Oct 18 03:13:52 Updated: firefox-3.0.2-1.fc9.i386 18 ottobre 03:13:52 Aggiornamento: firefox-3.0.2-1.fc9.i386
This shows that “firefox” is listed three times in this file. Ciò dimostra che "Firefox" è elencato tre volte in questo file.
type tipo + + digitare
Determine which directory a command is in. Determinare quale directory è un comando poll
[kmurray@radon ~]$ type ping [kmurray @ radon ~] $ digitare ping
ping is hashed (/bin/ping) ping è hashed (/ bin / ping)
Ahh, so ping lives in /bin. Ahh, in modo ping vive in / bin.
locate individuare
Locate any arbitrary file on the filesystem. Individuare qualsiasi file arbitrari sul filesystem.
[kmurray@radon ~]$ locate *.rpm [kmurray @ radon ~] $ individuare *. rpm
/home/kmurray/Download/VirtualBox-2.0.2_36488_fedora9-1.i386.rpm / home/kmurray/Download/VirtualBox-2.0.2_36488_fedora9-1.i386.rpm
/home/kmurray/Download/VirtualBox-2.0.4_38406_fedora9-1.i386.rpm / home/kmurray/Download/VirtualBox-2.0.4_38406_fedora9-1.i386.rpm
/home/kmurray/Download/skype-2.0.0.72-fc5.i586.rpm / home/kmurray/Download/skype-2.0.0.72-fc5.i586.rpm
/home/kmurray/Download/synaptics-0.14.6-8.fc9.i386.rpm / home/kmurray/Download/synaptics-0.14.6-8.fc9.i386.rpm
I have four rpm files on this computer, all of them in /home/kmurray/Download. Ho quattro giri / min file su questo computer, tutti in / home / kmurray / Download.
file
Determine what type a file is. Determinare la tipologia di un file.
[kmurray@radon ~]$ file /bin/ping [kmurray @ radon ~] $ file / bin / ping
/bin/ping: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped / bin / ping: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SysV), collegate dinamicamente (utilizza la libs), per GNU / Linux 2.6.9, spogliato
ping is a binary file. ping è un file binario.
[kmurray@radon ~]$ file Mythbusters.S02E04.flv [kmurray @ radon ~] $ file Mythbusters.S02E04.flv
Mythbusters.flv: Macromedia Flash Video Mythbusters.flv: Macromedia Flash Video
Mythbusters.S02E04.flv is a video. Mythbusters.S02E04.flv è un video.
[kmurray@radon ~]$ file /var/log/yum.log [kmurray @ radon ~] $ file / var / log / yum.log
/var/log/yum.log: ASCII text / var / log / yum.log: testo ASCII
/var/log/yum.log is a plain text file. / var / log / yum.log è un semplice file di testo.
history storia
Shows what commands you have been running on the command line. Mostra quali comandi si sono stati pubblicati sulla riga di comando.
[kmurray@radon ~]$ history [kmurray @ radon ~] $ storia
991 du -hc Documents/N95/tutorials/ 991 du-hc Documents/N95/tutorials /
992 ls /var/log/messages 992 ls / var / log / messages
993 tail /var/log/messages 993 coda / var / log / messages
994 ls LS 994
995 ls /var/log/ 995 ls / var / log /
996 ls -lh /var/log/ 996 ls-lh / var / log /
997 tail /var/log/yum.log 997 coda / var / log / yum.log
998 head /var/log/yum.log 998 testa / var / log / yum.log
999 grep firefox /var/log/yum.log 999 grep firefox / var / log / yum.log
1000 sudo su - 1000 sudo su --
1001 cd src/ 1001 cd / src /
1002 ls 1002 LS
1003 tar -xvzf TrueCrypt\ 6.1\ Source.tar.gz 1003 tar-xvzf TrueCrypt \ 6.1 \ Source.tar.gz
1004 cd truecrypt-6.1-source/ 1004 cd truecrypt-6.1-source /
1005 ls 1005 LS
1006 less Readme.txt 1006 meno Readme.txt
1007 make 1007 rendere
1008 less Readme.txt 1008 meno Readme.txt
1009 make 1009 rendere
1010 make 1010 rendere
1011 cd 1011 cd
1012 cd .VirtualBox/VDI/ 1012 cd .VirtualBox / VDI /
1013 ls 1013 LS
1014 cat RawUSBsdb.vdi 1014 gatto RawUSBsdb.vdi
1015 mv RawUSBsdb.vdi RawUSBsdb1G.vdi 1015 mv RawUSBsdb.vdi RawUSBsdb1G.vdi
1016 cp RawUSBsdb1G.vdi RawUSBsdb2G.vdi 1016 cp RawUSBsdb1G.vdi RawUSBsdb2G.vdi
1017 vim RawUSBsdb2G.vdi 1017 vim RawUSBsdb2G.vdi
1018 rm RawUSBsdb2G.vdi 1018 RM RawUSBsdb2G.vdi
1019 pwd 1019 pwd
1020 VBoxManage internalcommands createrawvmdk -filename /home/kmurray/.VirtualBox 1020 VBoxManage internalcommands createrawvmdk-file / home / kmurray / .VirtualBox
1021 cat RawUSBsdb2G.vdi 1021 gatto RawUSBsdb2G.vdi
1022 cd 1022 cd
In order to discover which commands I use most so I could write this list, I used a combination of five different commands all piped together: Al fine di scoprire quali comandi utilizzare la maggior parte così ho potuto scrivere questo elenco, io ho usato una combinazione di cinque diversi comandi di tutte le condotte insieme:
history | awk {’print $2′} | sort | uniq | less storia | (awk 'print $ 2') | sort | uniq | less
awk {’print $2′} causes only the second column of the output to be displayed, sort puts everything in alphabetical order, uniq cuts out all the duplicates, and less causes the output to be displayed one screen at a time. awk ( 'print $ 2') cause soltanto la seconda colonna della produzione per essere visualizzati, sorta mette tutto in ordine alfabetico, uniq tagli tutti i duplicati, e meno le cause di uscita da visualizzare una schermata alla volta.
If you have any favourite bash commands that you would like to share, please tell us about them in the comments below. Se avete preferito bash comandi che si desidera condividere, ci informi su di loro nei commenti qui sotto.






















{ 0 comments… (0 commenti ... add one now aggiungere uno ora } )
Leave a Comment Lascia un tuo commento