I just finished installing CentOS 5.4 on my computer and wanted to check my network settings so I ran ifconfig and it came back with command not found I tried running ethtool same results. I was confused for a while why this is happening. Because every time I installed Linux before these commands always worked.
Well after doing some digging I realized that the path to /sbin wasn’t in my user profile not even as root. Simple way to find this out is by using the following command:
Weird, but any ways I used the following method to add /sbin to my user profile so that I can run these commands easily. Now for security reasons of course you don’t want to give all users access to these commands.
After typing this command as root and as myself I was able to use the ifconfig and ethtool commands without typing the full path to them (/sbin/ifconfig or /sbin/ethtool).