Linux --- ifconfig and --- centos7ifconfig in centos7
Ifconfig in centos7
Try to install centos7 at least today. After installation is complete, check the Network Configuration:
Ifconfig command is displayed
-Bash: ifconfig: command not found
Solution: Check whether ifconfig is installed.
First, check whether/sbin/ifconfig exists.
1. If so, view the environment variable settings:
Echo $ PATH
If the environment variable does not contain the path of the ifconfig command:
1) temporarily modify environment variables:
Export PATH = $ PATH:/sbin
If shell is disabled, the environment variable settings disappear.
2) Change environment variables permanently:
Open the/etc/profile file, enter export PATH = $ PATH:/sbin, save and restart.
Or create a new ifconfig. sh script file under the/etc/profile. d/directory. The file content is:Export PATH = $ PATH:/sbin save and restart.
2. If it does not exist:
Yum upgradeyum install net-tools