su - root put's root's path in place.. without the dash, your not getting root's own path.
lsmod usually resides in /sbin which isn't in regular users $PATH by default..
Do a:
su
And then once your logged in check your $PATH.
Then do:
su - root
And then check your $PATH and compare.. and that will be why you can't simply run lsmod. Either login with the dash or place the full path to the command not in your $PATH which would be /sbin/lsmod to run the command..
|