Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It's driving me crazy... I've been googling for an hour now and nothing!

I'm trying to invoke this script:

#!/bin/bash
ethtool -s eth0 wol g
exit

I run it as root: /etc/init.d/wakeonlanconfig

And it gives: /etc/init.d/wakeonlanconfig: line 2: ethtool: command not found

Any ideas what is going on?

share|improve this question
up vote 3 down vote accepted

The shell environment's path variable doesn't have the directory where ethtool is located. So either add it to your path, or better, just prefix "ethtool" with its full path: /foo/bar/ethtool

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .