New Ubuntu distribution and how to use the strings command to search binary files for text strings.

Posted: April 9, 2013. At: 5:38 PM. This was 4 years ago. Post ID: 5569

The new Ubuntu distribution is quite an awesome desktop operating system; we have come a long way from the roots of Linux as a desktop alternative that was perceived as being hard to use and unapproachable. Linux these days is very easy to use and the installation and removal of software such as Google Earth and Firefox is even easier than Windows. I have a serious problem with my Windows 8 installation; the Windows Explorer component is not working. So back to Mint for me. I have gone back to the default Mint-X MATE theme; that is very attractive and light. Even though the new Gnome Shell 3.8 desktop is very fast and reliable, I prefer to use MATE. It is the default desktop environment of Linux Mint for a reason. That is the strength of Linux; you have many desktop environments to choose from. You may use either a simple WM like SpectreWM or a larger fully featured desktop environment like KDE or MATE. Very old Linux distributions like Red Hat would have used Gnome 1.0 and they would be just as usable; but they would require editing the /etc/X11/XFree86.conf to configure the Xfree86 windowing server. You had to configure the monitor resolution manually to avoid accidentally over-driving the monitor and causing a fire.

That is why we are so blessed with the modern Xorg windowing server that supports KMS and can automatically detect the resolution of your LCD screen and set up the graphical interface on boot. That makes things so much easier than the old days. Sure you could use the redhat-config-xfree86 tool to auto-probe your hardware and attempt to create a best-fit configuration to enable your hardware to work properly with the Linux windowing manager. Another good command was X -configure. That was running the X command directly with the command-line parameter to attempt to configure the hardware. Then you would run this command: cp /etc/X11/XF86Config. That would copy the generated XF86Config to the /etc/X11 directory to set up your graphical environment. Nowadays, we only need to do this when we are setting up dual monitors. The ATI Catalyst Control Center allows you to create a xorg.conf file to define the layout of your monitors. But that is all the configuration that you need these days. That is why the modern Linux distributions are so good; the hardware auto-detection is very powerful. The only thing that you need to do is install proper drivers for your NVidia or ATI hardware. Using the command-line is an important part of the Linux and UNIX experience. Updating your system and installing software is easily done this way.

I am trying to get the Powershell alternative Pash to compile with the Monodevelop IDE; but I am missing the Goldparser assembly. I guess I need to install this somehow. But once I get this working it will be an interesting alternative to the current zsh shell I am using on Linux Mint 12 Debian Edition. But otherwise I am happy. Powershell is just as capable as the bash shell when it comes to doing interesting things with the shell and manipulating objects. Everything in Powershell is an object and this means that you may manipulate and access files on the system as well as devices. Linux shells assume that everything is text and the utilities like grep are capable of searching through text and finding certain strings. Below is an example using the strings command to search for text within the Linux kernel image.

.-(~)--------------------------------------------------------------------------------------------------------------------------([email protected])-
`--> strings /boot/vmlinuz-3.2.0-2-486 | grep "kernel"
This kernel requires an %s CPU, 
This kernel requires the following features not present on the CPU:
Unable to boot - please use a kernel appropriate for your CPU.
Booting the kernel.
early console in decompress_kernel

Here is another example getting the kernel version. An interesting alternative to uname -a….

.-(~)--------------------------------------------------------------------------------------------------------------------------([email protected])-
`--> strings /boot/vmlinuz-3.2.0-2-486 | grep "Debian"  
3.2.0-2-486 ([email protected]) #1 Mon Mar 5 00:55:40 UTC 2012]

The strings command is therefore very useful indeed for scanning files on your computer for certain strings. You can use this command to search your Windows pagefile.sys for certain strings. This is useful when you find a junk PC with the HDD still in it and you can search the pagefile.sys for recent computing activity; even E-mail addresses and URLs.

No comments have been made. Use this form to start the conversation :)

Leave a Reply