How to Read Messages Stored In RAM on Linux

Random Access Memory (RAM) generally refers to the technology that provides devices with a volatile area to temporarily store data. This technology is used across all form factors of digital electronics, and its mere existence is a memory to no one who has worked with computers or cellular phones for very long. On the other hand, the actual contents of said memory is very often a mystery. Most operating systems provide no way for a user to easily examine the contents of RAM.

A simple Linux CLI trick can at least help a coder to examine the lower areas of RAM for useful messages. This is helpful for several reasons. Programmers and operating system developers may want to see how many BIOS or UEFI remain inside of a live OS boot. Other coders may also want to see what locations in RAM a program writes too. Some users could do so for troubleshooting reasons, or even purely out of curiosity. Fortunately there is a safe way to do so.

Find Plain Text Strings in RAM

First you will need to open a terminal by holding down CTRL, ALT and T. You may also start Konsole, rxvt or any other terminal program from your applications menu. If you want to work with a larger screen, then you may hold down CTRL and ALT while pushing F1-F6 to log into a virtual terminal. Theoretically the following commands should also work on other Unix distributions like FreeBSD.

At the command prompt type:

strings /dev/mem | more

If it warns you that you lack permissions, then type:

sudo strings /dev/mem | more

You’ll need to enter your administration password. If you received a message that told you that the programs ‘strings’ could be found in a package, then try:

busybox strings /dev/mem | more

or

sudo busybox strings /dev/mem | more

picture-a

Once it’s been correctly parsed you’ll see a wall of text separated by lines. Pushing the space bar will drop down another screenful, so you may wish to use less instead of more in the pipe. You’ll more than likely see a good deal of garbage, but at least some of the messages will be useful. Since you might have many gigabytes of RAM attached to your machine, you’ll eventually want to hold CTRL and push C to exit.

If you’re on a legacy-free machine and still see messages about a floppy controller or a CD-ROM drive, then you have nothing to worry about. These are just messages from your BIOS or UEFI program.

Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

How to Read Messages Stored In RAM on Linux

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested