On Wed, Apr 26, 2017 at 10:07:01AM -0400, Ric Moore wrote:
"ifconfig" has to be run as root.
ric@iam:~$ sudo ifconfig
[sudo] password for ric:
enp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
This is not correct, if you are just using it to view an interface rather
than to change the interface.
ifconfig lives in the /sbin directory, which is not in the default PATH
that user accounts get when they login. It *is* in the PATH that you
get when you run su, or sudo. That's why it works when you slap sudo
in front of it.
You could also simply run /sbin/ifconfig directly. Or, you could change
your PATH variable to include the /sbin directory. Either of these will
let you run ifconfig without root privileges.