网络命令不起作用;我该怎么办?

网络命令不起作用;我该怎么办?

我在 Ubuntu Server 12.04 上尝试过的命令:

#sudo /etc/init.d/networking start

Rather than invoking init scripts through `/etc/init.d`, use the service(8)
utility, e.g. service networking start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start networking
networking stop/waiting


#service networking status
networking stop/waiting

#service networking start
networking stop/waiting

答案1

当您直接连接到服务器时,您可以尝试使用静态 IP 设置网络ifconfig 。例如:

sudo ifconfig eth0 up 192.168.0.100 netmask 255.255.255.0

之后,检查:

service networking status

相关内容