Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
or
Code:
sudo /sbin/ifconfig
Looking forward to your participation in the forums. Have fun with Linux.
Which version of CentOS ?
But all users can run ifconfig without any errors..
Hi,
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
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
After that I could succesfully execute ifconfig.
Since this thread pups up when searching for this issue, I think it's best to add all proper solutions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.