Skip to content

Instantly share code, notes, and snippets.

@blackstuend
Last active October 16, 2018 05:40
Show Gist options
  • Save blackstuend/c85465293c33eaa778de579e07fa7a31 to your computer and use it in GitHub Desktop.
Save blackstuend/c85465293c33eaa778de579e07fa7a31 to your computer and use it in GitHub Desktop.
  • 更改enthernet名稱
#ip link set name down
#ip link set name name newname
#ip link set newname up
  • 在網路介面卡更改ip
  • 在同一張介面卡新增虛擬ip
#ifconfig ipname newip netmask 255.255.255.0
#ifconfig ipname:0 newip netmask 255.255.255.0
  • 用特定網卡ping
#ping -I eth1 10.10.10.1
  • 查看ip使用ip指令
#ip addr show ip
#ip route show
#ip route del default
#ip route add default via ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment