Everyone knows that viewing ip information on linux is ifconfig, but I installed centos7 on the virtual machine today. When I used ifconfig, it was prompted that ifconfig was invalid, so I searched the Internet and found a solution. The steps are as follows:
1) cd /etc into the folder
2) vi profile
3) Add export PATH=$PATH:/sbin at the end of the file