Presumably it's somehow related to memory? What would

sudo cat /dev/urandom > /dev/mem

do? Trash all RAM? All non-kernel virtual memory? None of the above?

link|improve this question
feedback

2 Answers

up vote 6 down vote accepted

It provides access to the system's physical memory.

Here's some more info on what /dev/mem is.

Yes -- it could cause all sorts of problems. A reboot should fix you, but bad things can happen very easily. Be careful! :-)

link|improve this answer
1  
I'd suggest reviewing the mem man page. Rags is correct. "mem is a character device file that is an image of the main memory of the computer. It may be used, for example, to examine (and even patch) the system. Byte addresses in mem are interpreted as physical memory addresses." And... "The file kmem is the same as mem, except that the kernel virtual memory rather than physical memory is accessed." – Mr. Shickadance Feb 24 '11 at 12:26
feedback

/dev/mem provides access to system physical memory, not virtual. The kernels virtual address space can be accessed using /dev/kmem.

It's primarily used to access IO memory addresses related to peripheral hardware, like video adaptors.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown