1、添加

sudo ifconfig enp0s31f6:0 192.168.10.10 up

2、卸载

sudo ifconfig enp0s31f6:0 down

注意:enp0s31f6每台电脑都不一样,可以使用ifconfig进行查看得知。

3、高级写法

sudo vim /etc/network/interfaces

在这个文件中增加如下内容并保存:

auto eth0:0
iface eth0:0 inet static
  address 192.168.1.63
  netmask 255.255.255.0
  network 192.168.1.1
  broadcast 192.168.1.255

注意:eth0每台电脑都不一样,使用ifconfig进行查看。

保存后重启:

sudo /etc/init.d/networking restart

 

参考:

http://blog.csdn.net/hzhsan/article/details/44677867

http://www.cnblogs.com/wolfsky/articles/2851887.html

http://os.51cto.com/art/201311/419204.htm

 

相关文章:

  • 2022-12-23
  • 2021-11-19
  • 2021-11-19
  • 2021-11-19
  • 2022-01-05
  • 2021-07-04
  • 2022-12-23
猜你喜欢
  • 2022-01-19
  • 2021-12-04
  • 2021-06-04
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案