Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

Trying to modify /proc/sys/vm/overcommit_memory, but getting permission denied even with sudo

Writer Matthew Barrera

I am trying to edit the file /proc/sys/vm/overcommit_memory, but I'm getting permission denied even if I use sudo or switch to root user via sudo -i and try to edit using that account. How can I get this to work?

0

2 Answers

Instead of using sudo -i and then using echo, just pipe echo to sudo tee instead like this:

echo 1 | sudo tee /proc/sys/vm/overcommit_memory
2

I found my answer here. I was trying to use vim to edit the file while in root user mode, but it turns out you can't do that since the file is virtual. Instead, I used echo 1 >/proc/sys/vm/overcommit_memory

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy