0

I'm trying to change kernel log level using:

echo 8 > /proc/sys/kernel/printk

But I'm getting this error:

bash: /proc/sys/kernel/printk: Permission denied

Doing it with sudo does not help (getting the same error message).

If I read the proc file, it works:

$ cat /proc/sys/kernel/printk
7   4   1   7

I am working with following Linux kernel:

Linux 5.11.0-38-generic #42~20.04.1-Ubuntu SMP x86_64 GNU/Linux
Tsyvarev
  • 52,146
  • 16
  • 84
  • 120
meodou
  • 49
  • 3
  • If by "doing it with `sudo`" you mean `sudo echo 8 > /proc/sys/kernel/printk`, then it is wrong way. See that question: https://stackoverflow.com/questions/82256/how-do-i-use-sudo-to-redirect-output-to-a-location-i-dont-have-permission-to-wr – Tsyvarev Dec 13 '21 at 09:51

0 Answers0