Server Fault is a question and answer site for system and network administrators. 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

What value can not be changed in /proc/sys?

echo "Windows" > /proc/sys/kernel/ostype
bash: /proc/sys/kernel/ostype: Permission denied


share|improve this question
up vote 2 down vote accepted

Because ostype don't have write permission:

ls -al /proc/sys/kernel/ostype
-r--r--r-- 1 root root 0 2011-02-25 05:20 /proc/sys/kernel/ostype

If file in /proc/sys/ have write permission, you can change values in it.

share|improve this answer

The real answer to this question is really to understand what the proc filesystem means. /proc isn't a real filesystem - it's a filesystem interface to system internals. When you're reading or writing things in /proc you aren't reading or writing to or from the disk - you're reading and writing directly into things lie kernel memory or device drivers.

Thus yes the basic answer to 'why can't I write to /proc/sys/kernel/ostype?' is that the file isn't writable. However, the more complete answer is that this particular file is presented to you as read-only because it wouldn't make any sense to change it. 'ostype' is an immutable property of a running system.

share|improve this answer
Phil: a lovely example of a "bigger picture" answer, informative, accurate and well-referenced. I commend it to the OP (and to others!). – MadHatter Feb 25 '11 at 7:20
Aw thanks MadHatter. – Phil Hollenback Feb 25 '11 at 8:19

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.