Centos7 solution ifconfig command is not installed
Prior to this, centos7 minimize installation default is not networked, you must first switch to the root user, and then to solve network problems
First, to root
Second, solve network problems
Third, install ifconfig
First, to root
Under Linux root user to switch prompts Authentication failure wrong solution
The first case may be a root cause of wrong password, then double-check again whether the input error
The second is just installed, the root user password is not set due,
Solution: sudo passwd then let you enter the current user password, enter the root password is entered and then finished it, it unanimously recommended and power-on password
Second, solve network problems
Name or service not knowm prompt solution when you use the ping command
1, edit virtual machine - Virtual Network Editor
(1) Click on the upper left corner VMware virtual machines, "Edit", select "Virtual Network Compiler."
(2) Select VMnet8 (NAT mode), then click on the right side of the "NAT settings" at this time you will see the following interface
2, enter the command line: first switch to the root user before vim / etc / sysconfig / network-scripts / ifcfg-ens33, otherwise the write data is not being given
(1) using the command to root [wpc @ localhost ~] $ su root
(2) Enter the command line can be seen (which I have done before a): vi / etc / sysconfig / network-scripts / ifcfg-ens33
(3) The ONBOOT = no change yes, the BOOTPROTO = dhcp instead BOOTPROTO = static, and increasing the few lines (remember in the back! Remember! Remember! NETMASK (subnet mask) and GATEWAY (gateway) it must be based on virtual web content editor to write, IPADDR (ip address) can only write the last paragraph numbers in 3-254, the 0 and 1 can not be assigned to only 254 hosts and distribution, this is the network-related knowledge unclear students can asking for Baidu, may be different for each person is different virtual machine is allocated to address segment, the analogy I can configure it)
IPADDR=192.168.88.254
NETMASK=255.255.255.0
GATEWAY=192.168.88.2
DNS1=114.114.114.114
Placed before
After configuration
3, quit After the configuration, save and exit, and then enter the command: systemctl restart network.service to restart the network services.
Test to check the IP address: ip addr
ping command to test network connectivity, this network problem is solved: ping baidu.com
Third, the installation ifconfig
ifconfig appears bash: ifconfig: command not found, the solution ifconfig command that is not installed
When the initial installation centos 7, running config report command not found error, ifconfig command is set or display program network interface, you can show the card information of our machines, but sometimes when minimizing installation CentOS and other Linux distributions by default do not installation ifconfig commands, this time you enter the terminal, run the ifconfig command will go wrong
First, this is our first thought is not the path environment variable is not ifconfig command, as ifconfig is under / sbin path to root user login can run, but we are on top of the root user login, ah, look at the see the root user environment variables
[root@localhost wpc]# echo $PATH
Second, the environment variable there / sbin this path, Lay also said that if the ifconfig command exists and is located in the / sbin directory under, then we can be sure it is running, then we will see if there ifconfig command / sbin directory it
[root@localhost wpc]# ls /sbin/grep ifconfig
The results show that under our / sbin directory and do not ifconfig command, so our conclusion is: to minimize our CentOS installation is not installed inside the ifconfig
Third, our solution is: yum install package ifconfig command
[root@localhost wpc]# yum search ifconfig
By this command yum search we found ifconfig This command is net-tools.x86_64 this package, then we install the package on the line, has been selected y
Fourth, use the install command [root @ localhost wpc] # yum -y install net-tools.x86_64
So far this has been installed ifconfig command, and test
Successful operation, and this time you are not there and I had the same doubts, windows in the ipconfig command to why some linux is not necessary to install the original ifconfig command from net-tools, this bag with ifconfig, netstat, whois, etc. command, so you are running before these commands can not