linux.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Mon, 22 Feb 2016 12:41:52 +0200
changeset 1903 901e7394849f
parent 1574 7d0d19182e29
child 1905 fba288d59662
permissions -rw-r--r--
Decrease intent to increase space usage on mobile.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1334
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     1
.. -*- coding: utf-8; -*-
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
.. include:: HEADER.rst
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
========
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
 Linux.
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
========
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
.. contents::
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     9
Linux distro.
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    10
=============
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
  http://distrowatch.com/
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
                Comparing Linux distros.
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
SysRq.
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16
======
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
::
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    19
  x86: ALT-SysRq-<command key>
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    20
  SPARC: ALT-STOP-<command key>
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    21
  PPC: ALT - Print Screen (or F13) - <command key>
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    22
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    23
  'b' - reboot
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    24
  'p' - dump the current registers and flags to your console
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    25
  'r' - take control of keyboard back from X
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    26
  'e' - send SIGTERM to all processes, except for init
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    27
  'i' - send SIGKILL to all processes, except for init
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    28
  's' - attempt to sync all mounted filesystems
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    29
  'u' - remount all filesystems read-only
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    31
You can put one of such line::
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    32
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    33
  $ echo 0 > /proc/sys/kernel/sysrq  # disable
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    34
  $ echo 1 > /proc/sys/kernel/sysrq  # enable
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    35
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    36
to your /etc/rc.local or alternativaly place under /etc/sysctl::
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    37
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    38
  kernel.sysrq = 1
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    39
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    40
  http://www.kernel.org/doc/Documentation/sysrq.txt
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    41
                Linux Magic System Request Key Hacks
1574
7d0d19182e29 Linux Kernel Newbies
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    42
7d0d19182e29 Linux Kernel Newbies
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    43
Comunity.
7d0d19182e29 Linux Kernel Newbies
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    44
=========
7d0d19182e29 Linux Kernel Newbies
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    45
7d0d19182e29 Linux Kernel Newbies
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    46
  http://kernelnewbies.org/
7d0d19182e29 Linux Kernel Newbies
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    47
    Linux Kernel Newbies
7d0d19182e29 Linux Kernel Newbies
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    48