IPConfig实用程序和它的等价图形用户界面——Windows 95/98中的WinIPCfg可用于显示当前的TCP/IP配置的设置值。这些信息一般用来检验人工配置的TCP/IP设置是否正确。但是,如果你的计算机和所在的局域网使用了动态主机配置协议(Dynamic Host Configuration Protocol,DHCP——Windows NT下的一种把较少的IP地址分配给较多主机使用的协议,类似于拨号上网的动态IP分配),这个程序所显示的信息也许更加实用。
To check to see if you have such an IP address, run this command: ipconfig eth0.
要检查是否拥有ip地址,请运行以下命令:ipconfig eth0。
Listing 4 shows a simple usage of ProcessBuilder to get your Internet configuration with the ipconfig command.
清单4说明了ProcessBuilder的一种简单用法,它使用ipconfig命令获得Internet配置信息。
On Windows you may use 'ipconfig', on Linux 'ifconfig' (you must have administrator rights to start this command.)
在Windows系统上你可以使用' ipconfig ',在Linux系统下你需要拥有管理员权限并输入' ifconfig '。
应用推荐