网络 命令;命令核实一下;网络配置命令
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 ´。
This approach should work on most platforms. If it doesn´t, change ipconfig to a working command for your platform.
该方法适用于多数平台,否则可以将 ipconfig 改写成所用平台上的工作命令。
As Listing 5 shows, running this program produces output similar to running ipconfig from the command line (your results will most likely vary).
如清单5所示,该程序的运行结果与在命令行中执行ipconfig所得到的结果类似(您得到的结果看起来可能有所不同)。