mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
20140321-1 选题 两篇短小的简单技术文章
This commit is contained in:
parent
ee2c55afce
commit
d3c7e43cf2
38
sources/tech/How To Find IP Conflicts In Linux.md
Normal file
38
sources/tech/How To Find IP Conflicts In Linux.md
Normal file
@ -0,0 +1,38 @@
|
||||
How To Find IP Conflicts In Linux
|
||||
================================================================================
|
||||
You all know what IP addresses are, right? How they are assigned to devices on a network to represent them. They are assigned by DHCP servers and the change frequently. Now there are two kinds of IP’s. The dynamic ones who change frequently (a few times a day) and the static ones who, as the name suggests, are static, as in they don’t change. Sometimes that creates conflicts. When a dynamic IP is assigned and there is already another device on the network with the same static IP. Or it can happen when there are more than one DHCP servers giving IP’s on the same network from the same subnet. If you’re having connectivity issues and suspect it is due to IP conflict you can use a tool called arp-scan to detect them.
|
||||
|
||||
This tool sends ARP (Address Resolution Protocol) packets on local network to collect the addresses. If there is multiple MAC addresses claiming the same IP address, then there is conflict.
|
||||
|
||||
To install arp-scan on Ubuntu or Debian type:
|
||||
|
||||
$ sudo apt-get install arp-scan
|
||||
|
||||
For Fedora, CentOS or Redhat:
|
||||
|
||||
$ sudo yum install arp-scan
|
||||
|
||||
To detect IP conflicts, run the following:
|
||||
|
||||
$ sudo arp-scan –I eth0 -l
|
||||
|
||||
An output example:
|
||||
|
||||
192.168.1.10 00:1b:a9:63:a2:4c BROTHER INDUSTRIES, LTD.
|
||||
192.168.1.30 00:1e:8f:58:ec:49 CANON INC.
|
||||
192.168.1.33 00:25:4b:1b:10:20 Apple, Inc
|
||||
192.168.1.37 10:9a:dd:55:d7:95 Apple Inc
|
||||
192.168.1.38 20:c9:d0:27:8d:56 (Unknown)
|
||||
192.168.1.39 d4:85:64:4d:35:be Hewlett Packard
|
||||
192.168.1.39 00:0b:46:e4:8e:6d Cisco (DUP: 2)
|
||||
192.168.1.40 90:2b:34:18:59:c0 (Unknown)
|
||||
|
||||
In this instance, the **19.168.1.39** IP is in conflict since it appears twice.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.unixmen.com/find-ip-conflicts-linux/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,57 @@
|
||||
How To Look Up Dictionary Definitions Via Terminal
|
||||
================================================================================
|
||||
Most people when they find a word they’re not familiar with, they Google it. Either that or they have a favorite online dictionary that provides an answer. What happens when you have no network connectivity? Or maybe you have an older distribution of Linux and you don’t have a GUI? You need to look it up offline. A good way to do that is here.
|
||||
|
||||
First you need to set up dictd locally. **Dictd** is a dictionary database server. It allows you to access online dictionaries. But wait, that’s what we wanted to avoid, right? A connection over the Internet. That’s why you set it up on localhost. It comes with a command-line client.
|
||||
|
||||
To install dictd on Ubuntu or Debian you type:
|
||||
|
||||
$ sudo apt-get install dictd
|
||||
|
||||
That was easy. Now you need to install dictionaries for it to use. After each dictionary addition dictd will automatically restart to reload its databases. Let’s say we want to install the English dictionary and an English thesaurus (look up synonyms).
|
||||
|
||||
Type:
|
||||
|
||||
$ sudo apt-get install dict-gcide
|
||||
$ sudo apt-get install dict-moby-thesaurus
|
||||
|
||||
If you want another language you can check the other packages by typing:
|
||||
|
||||
$ sudo apt-cache search “dict package”
|
||||
|
||||
That will give you a list like:
|
||||
|
||||
dict-freedict-eng-ara - Dict package for English-Arabic Freedict dictionary
|
||||
dict-freedict-eng-cro - Dict package for English-Croatian Freedict dictionary
|
||||
dict-freedict-eng-cze - Dict package for English-Czech Freedict dictionary
|
||||
dict-freedict-eng-deu - Dict package for English-German Freedict dictionary
|
||||
dict-freedict-eng-fra - Dict package for English-French Freedict dictionary
|
||||
|
||||
Now after that you have successfully installed dictd and can look up definitions.
|
||||
|
||||
First, let’s check if dictd server is running and what databases are installed:
|
||||
|
||||
$ dict -I
|
||||
|
||||
Example of output:
|
||||
|
||||
dictd 1.12.0/rf on Linux 3.2.0-29-generic-pae
|
||||
On my_host: up 95.000, 2 forks (75.8/hour)
|
||||
|
||||
Database Headwords Index Data Uncompressed
|
||||
gcide 203645 3859 kB 12 MB 38 MB
|
||||
moby-thesaurus 30263 528 kB 10 MB 28 MB
|
||||
|
||||
To look up a word definition you need to use a particular dictionary of those you have installed. Let’s check the English one (gcide):
|
||||
|
||||
$ dict -d gcide [word you want to look up]
|
||||
|
||||
If you don’t use the **-d** parameter dictd will search all available databases and return matched definitions.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.unixmen.com/look-dictionary-definitions-via-terminal/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user