I found from googling that each letter stands for these:
unRaw (take control of keyboard back from X),
tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
kIll (send SIGKILL to all processes, forcing them to terminate immediately),
Sync (flush data to disk),
Unmount (remount all filesystems read-only),
reBoot.
So if what B does is reboot, what difference does this make against just holding down the power key.
And what's the significance of other letters (I don't understand the terms).
I'll try to explain those in an easily understandable way, but it might not necessarily be 100% complete or 100% correct.
R - switch the keyboard mode
This is said to "Switch the keyboard from raw mode, the mode used by programs such as X11 and svgalib, to XLATE mode" (from Wikipedia), but I don't really know if this would normally have any notable effect.
E - gracefully terminate all running programs
This sends the SIGTERM signal to all processes except
init
and thereby asks them to gracefully terminate, giving them a chance to tidy up and free their resources, save data, etc...I - forcibly kill all running programs
This is similar to the E, but sends the SIGKILL signal to all processes except
init
, which kills them immediately and forcibly.S - sync all disks and flush their caches
All your disks normally have a write cache, a piece of RAM where the system caches data it wants to save on the device, to speed the access up. Syncing tells the system to flush these caches now and perform all remaining writes. That way you do not lose any data that has already been cached but not been written yet, and it protects from leaving the file system in an inconsistent state.
U - unmount all disks and remount them read-only
This is again pretty unspectacular, it simply makes all mounted disks read-only to prevent any further (partial) writes.
B - reboot the system
This reboots the system. However, it does not perform a clean shutdown, but instead a hard reset.
However...
On Ubuntu, these SysRqs are normally masked and partially disabled. Only syncing, remounting read-only and shutting down/rebooting are enabled.
This is controlled by the kernel interface file
/proc/sys/kernel/sysrq
, which holds the decimal representation of a bitmask of the allowed SysRq actions. The Ubuntu default is 176. See this answer for loads of additional explanations and material.So actually you could also just Alt + SysRq + { S | U | B }.