Archive

Archive for August, 2013

Tip for the day – Fix your terminal displaying junk characters

August 24, 2013 Leave a comment

Sometimes when reading a binary file your terminal font may be set to junk values and whatever you type will appear as junk. This may happen when reading a binary file through cat command, opening the raw device files like /dev/random /dev/urandom, or readingĀ  /proc/kcore memory file. Below screen shot shows how terminal looks when this happens,

Terminal displaying all characters as garbage after reading a binary fileWhen you are working in GUI environment within a terminal emulator this may not be a problem as you can close and reopen a new terminal. But this is a problem when you’re working in text environment.

There is an easy way to fix this problem by resetting the terminal. Yes typing reset command in the terminal will reset your terminal back to normal state.