0

This question already has an answer here:

I wish to use a single command line instead of opening the text editor to change the parameter of the file /etc/sysctl.d/10-magic-sysrq.conf to kernel-sysrq = 1 from any current parameter, even if other lines are in that file.

Is there not something similar to a where?

marked as duplicate by don_crissti, RalfFriedl, G-Man, Archemar, Isaac Nov 2 '18 at 7:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Check out /proc/sys/kernel/sysrq. – dsstorefile1 Apr 30 '18 at 0:21
  • @dsstorefilE1 That is just a temporary setting. – neverMind9 Apr 30 '18 at 1:21
1
# sed -i 's+kernel-sysrq =.*+kernel-sysrq = 1+'  /etc/sysctl.d/10-magic-sysrq.conf
  • 1
    i do not get it – Pierre.Vriens Nov 1 '18 at 7:51
  • 1
    In the config file, there should line like kernel-sysrq =XXX. This sed command would replace them into kernel-sysrq = 1 using sed replacing function in form of s+OLD+NEW+ – Aaron Shang Nov 6 '18 at 2:34

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