Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Need to be able to edit this file: /sys/class/net/eth0/queues/rx-0/rps_cpus

The file permissions:

cd:/sys/class/net/eth0/queues/rx-0$ ls -l
total 0
-rw-r--r-- 1 root root 4096 2012-02-13 17:23 rps_cpus
-rw-r--r-- 1 root root 4096 2012-02-13 12:54 rps_flow_cnt
cd :/sys/class/net/eth0/queues/rx-0$**

Tried this:

$ sudo rm /sys/class/net/eth0/queues/rx-0/rps_cpus; sudo sh -c "echo 1 > /sys/class/net/eth0/queues/rx-0/rps_cpus"
rm: cannot remove `/sys/class/net/eth0/queues/rx-0/rps_cpus': Operation not permitted
share|improve this question
up vote 2 down vote accepted

The files under /sys/ aren't real files, they're representations of the kernel's internal state. You can tweak kernel parameters by writing stuff to them, but as they are not actual files, you cannot delete them.

If what you want is to put a "1" there, try this:

echo 1 | sudo tee /sys/class/net/eth0/queues/rx-0/rps_cpus

See the answer to this question for an explanation of the "sudo tee" trick and why it's useful in this case.

Read more about /sys/ here:

share|improve this answer
Well, there ya go. Just when I thought I had it figured out. Thanks – Ringtail Feb 14 '12 at 2:13

I believe you have to do this as root, via

sudo -i
share|improve this answer
An easier way to "become" root is to do sudo -i. This starts an interactive session (i.e. a shell) as another user (by default, root). To become an arbitrary user use sudo -i -u some-other-user. – roadmr Feb 14 '12 at 2:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.