ifconfig
虚拟机启动后发现ifconfig命令下,没有打印ip
、用ifconfig eth0 up命令开启下网卡。
#ifconfig eth0 up
、更改eth0配置:
#vi/etc/sysconfig/network-scripts/ifcfg-eth0下显示:
DEVICE=eth0
ONBOOT=no //开机启动网卡
BOOTPROTO=static
IPADDR=192.168.1.8 //自己设置有效ip地址
NETMASK=255.255.255.0 //子网掩码
GATEWAY=192.168.1.1 //有效网关地址
HWADDR=:0C::::F8
注意其中的ONBOOT=no将其改为yes,网卡激活。
、重启服务。
#service network restart
重启后配置生效。
ifconfig的更多相关文章
- ifconfig: command not found(CentOS专版,其他的可以参考)
ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) echo $PATH 解决方案1:先看看是不是 ...
- Docker的ubuntu镜像安装的容器无ifconfig和ping命令的解决
Docker的Ubuntu镜像安装的容器无ifconfig命令和ping命令 解决: apt-get update apt install net-tools # ifconfig apt ...
- ip命令和ifconfig命令(转载)
Linux的ip命令和ifconfig类似,但前者功能更强大,并旨在取代后者.使用ip命令,只需一个命令,你就能很轻松地执行一些网络管理任务.ifconfig是net-tools中已被废弃使用的一个命 ...
- centos7中没有安装ifconfig命令的解决方法
初装centos 7时,运行config报 command not found 错误,我在网上找了大量资料,下面的资料中查找原因和解决方式最详细,能很好的解决这个问题. ifconfig命令是设置或显 ...
- Centos 7 minimal install 无网络无ifconfig的解决
Centos7这个比较不厚道, minimal install下居然不带net-tools 先要连上网络 修改/etc/sysconfig/network-scripts/ifcfg-ens12312 ...
- CentOS7 下ifconfig command not found解决办法
今天尝鲜用VMWare安装了CentOS7,选择了最小安装包模式,安装完毕之后想查看一下本机的ip地址,发现报错 # ifcon -bash: ifconfig: command not found ...
- ifconfig: command not found 如何解决?
ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) 1 echo $PATH 解决方案1:先看看是 ...
- CentOS 7 安装后没有ifconfig命令
/bin,/sbin,/usr/bin,/usr/sbin下面都没有ifconfig命令. 执行命令 yum install net-tools 即可.
- 使用 python 获取 Linux 的 IP 信息(通过 ifconfig 命令)
我们可以使用 python 代码通过调用 ifconfig 命令来获取 Linux 主机的 IP 相关信息,包括:网卡名称.MAC地址.IP地址等. 第一种实现方式: #!/usr/bin/pytho ...
- Linux网络管理1---(Linux配置IP地址,ifconfig、配置文件)
1.Linux配置IP 地址 ifconfig命令临时配置IP 地址 ifconfig命令,最常用的功能是查看本机的网络的配置状态(当然也可以配置网络,不过是暂时性的),直接输入ifconfig命令就 ...
随机推荐
- AJAX 后台返回多种数据
前台ajax(jsp文件): (1) $.ajax({ type: "POST", url: "/dragable/demo/finishTopo", asyn ...
- Codeforces Round #192 (Div. 2)
吐槽一下,这次的CF好简单啊. 可是我为什么这么粗心这么大意这么弱.把心沉下来,想想你到底想做什么! A 题意:O(-1) 思路:O(-1) #include <iostream> #in ...
- 2016HUAS暑假集训训练2 L - Points on Cycle
题目链接:http://acm.hust.edu.cn/vjudge/contest/121192#problem/L 这是一道很有意思的题,就是给定一个以原点为圆心的圆,然后给定 一个点 求最大三 ...
- github上怎么预览页面
直接在 http://htmlpreview.github.io/? 后面加上git上的地址就可以预览了 比如 http://htmlpreview.github.io/?https://github ...
- jQuery库中的变量$和其它类库的变量$冲突解决方案
jQuery.noConflict();//把变量$给其它插件 /* 由于把jQuery插件中的变量$给了其它插件使用 那么在调用jQuery插件的时候只能使用jQuery 但是这样很不方便 1.其实 ...
- iOS Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.30.14/UITableView.m:7962
Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Cac ...
- true是表示使用身份验证,否则不使用身份验证
?phpclass smtp{/* Public Variables */var $smtp_port;var $time_out;var $host_name;var $log_file;var $ ...
- 新一波makefile
# CROSS_COMPILE = arm-linux-CC = $(CROSS_COMPILE)gccINC=-I../ -I.LIB=-lpthread -lcryptoCC_FLAG= -std ...
- Python3.5连接Mysql
由于mysqldb目前仅支持到python3.4,所以这里选择pymysql. pymysql下载地址: https://pypi.python.org/packages/source/P/PyMyS ...
- ios-系统警告框 跳转到设置里面
-(void)createUIAlertIphone:(NSString*)title { UIAlertController * alert =[UIAlertController alertCon ...