I think I've solved this, but I wanted to post about it here in case anyone else comes across a similar problem.
I recently installed Waldorf and have gotten everything working great. I realized I wanted to change the swappiness to 10 like I always used to in ubuntu. I added the line
But this will only take effect after the next boot (which hopefully isn't for a few months), so I tried to use the "sysctl" command which will change the value in runtime. But bash doesn't like it:
sysctl: command not found
I thought this was exceedingly weird, since as far as I know sysctl is a standard command on all *nix systems. So I searched for the command,
sudo find / -name sysctl
and sure enough, it's sitting right there in /sbin/sysctl. So why doesn't bash find the command?
I then was tipped off to check $PATH,
echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
No trace of "/sbin"!
Finally, I added "/sbin" to $PATH:
and "sysctl" works as it should.
EDIT: And the learning continues. I could have sworn that I tried "sudo sysctl", but evidently I did not. So today I learned that /sbin commands can only be accessed by the super-user. I removed /sbin from $PATH and now "sudo sysctl" works like it's supposed to. Many thanks to xaos to kindly continuing my education.
Last edited by stevo1977 (2013-06-26 17:18:27)
Adding /sbin to the users PATH is considered unsafe.
sysctl should be run as root - either with sudo or su.
Last edited by CBizgreat! (2013-06-26 16:13:26)
Thanks for pointing that out, xaos. I have corrected the issue on my system, and I have edited my original post to reflect this. I can't believe I made such a noob mistake like not trying the command with 'sudo'! Well, this is how we learn...
EDIT: Oh, and CBizgreat!, I tried that "echo" command, but even with 'sudo' bash told me that that was not allowed.
bash: /proc/sys/vm/swappiness: Permission denied
Last edited by stevo1977 (2013-06-26 17:23:34)
echo 10 | sudo tee /proc/sys/vm/swappiness
should work OK.
Bizarre ... thought you did something wrong and thus were wrong. So tried echo myself Stevo1977.
Oddly even with sudo it does say forbidden/etc. Tried it as root, make your user root w the cmd "sudo -i" and it worked as expected. Odd ... just thought it was worth mention.
Last edited by CBizgreat! (2013-06-27 05:02:04)