I can't run ifconfig
I have installed centOS, an tryn to run ifconfig and it keeps telling me command not found, wats the right directory to run the command from?
|
Hello and welcome to LinuxQuestions,
Are you running that as a regular user or as root? I suppose as a regular user which would mean that /sbin is not in your default PATH. Did you try running it with sudo like this: Code:
sudo ifconfig Code:
sudo /sbin/ifconfig Kind regards, Eric |
If this is not working then please find the ifconfig file through / directory.
by, find / -name ifconfig and place in proper place /sbin directory so you can use ifconfig command. Thanks |
Which version of CentOS ?
But all users can run ifconfig without any errors.. |
Quote:
Code:
#which ifconfig then try running the command this way Code:
#/sbin/ifconfig |
Quote:
That is not always true. Depends on how the system is set up. If you have a regular user with limited access, controlled by sudo for example and you didn't allow ifconfig (NETWORKING) then it will not work. Another issue is that for regular users /sbin might not be in the PATH statement so just running Code:
ifconfig even with sudo correctly setup and allowing the command, would error out whereas running Code:
/sbin/ifconfig Kind regards, Eric |
Hi All,
I know it is an old thread, but I ran into the same issue on my CentOS 7 server. The solution for me was to install the net-tools because I couldn't find ifconfig on my machine at all. Code:
yum install net-tools Since this thread pups up when searching for this issue, I think it's best to add all proper solutions. Best regards, John |
All times are GMT -5. The time now is 01:48 PM. |