Linux下ping通其它主機(jī)名稱需要做的配置
以下的文章主要向大家講述的是在Linux下ping通其它主機(jī)名稱需要做的配置的描述。
編輯特別推薦:
LinuxICMP后門代碼
Linux多網(wǎng)卡同IP段解決
Linux命令:ifconfig和route
通常在windows下面,我們可以通過其它主機(jī)名稱互相訪問,例如
使用
\\helloAndroid
來訪問地主機(jī)名為helloAndroid的PC機(jī)..
如果希望在Linux下ping通其它主機(jī)名稱,那么需要做下配置
1.
sudo apt-get install winbind
2.
sudo vi /etc/nsswitch.conf
在host:行加入wins
例如:hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 wins
3.測試下
star@star-desktop:~$ ping Linux221
PING Linux221 (192.168.2.221) 56(84) bytes of data.
64 bytes from Linux221.local (192.168.2.221): icmp_seq=1 ttl=64 time=3.26 ms
64 bytes from Linux221.local (192.168.2.221): icmp_seq=2 ttl=64 time=2.65 ms
64 bytes from Linux221.local (192.168.2.221): icmp_seq=3 ttl=64 time=2.14 ms
64 bytes from Linux221.local (192.168.2.221): icmp_seq=4 ttl=64 time=0.752 ms
64 bytes from Linux221.local (192.168.2.221): icmp_seq=5 ttl=64 time=0.951 ms
64 bytes from Linux221.local (192.168.2.221): icmp_seq=6 ttl=64 time=0.476 ms
【編輯推薦】
- 簡述Suse Linux DHCP配置
- 你所不知道的Linux svn管理工具命令
- 在Linux和UNIX平臺上安裝DB2的方法
- 玩轉(zhuǎn) LinuxICMP后門代碼
- 在VMware和Linux下進(jìn)行DHCP服務(wù)器的設(shè)置