DEV Community

Cover image for Force linux to shutdown or restart
Dicky Saputra
Dicky Saputra

Posted on

3 2

Force linux to shutdown or restart

A solution for your PC when feel lag and freeze

Sometimes restart PC with

ctrl + alt + delete

not working and you should to press the power button but this is not recommended because can damage computer performance

Usually I use this way to resolve that:
Holding down

ALT + PrntSct/SysRq

(which is the Print Screen key) while slowly typing

R+E+I+S+U+B

will get you safely restarted.

R+E+I+S+U+O

will do a shutdown rather than a restart.

Here are the steps each button performs:

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • B: Immediately reboot the system, without unmounting partitions or syncing

source codepolitan blog.kember.net

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay