码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu临时修改ip,mac的方法示例

时间:2018-03-03 21:20:43      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:pre   生效   ifconfig   ifconf   一个   ubunt   conf   logs   5.0   

ifconfig eth0 down
ifconfig eth0 154.84.28.148 netmask 255.255.255.0
route add default gw 154.84.28.254
ifconfig eth0 hw ether AA:AA:AA:AA:AA:AA
ifconfig eth0 up

然后将这个脚本保存成一个文件,我这里假设取名为test.sh。
则在命令行执行sudo bash test.sh来生效。

ubuntu临时修改ip,mac的方法示例

标签:pre   生效   ifconfig   ifconf   一个   ubunt   conf   logs   5.0   

原文地址:https://www.cnblogs.com/zifeiy/p/8502881.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!