Tuesday, January 22, 2008

How to get list of installed softwares in Debian/Ubuntu System

The command
$ dpkg --get-selections
would list all the installed programs in your debian system.

Monday, January 14, 2008

Unlock the Installation Lock Ubuntu/debian

E: Could not get lock /var/cache/apt/archives/lock - open (11 Resource temporarily unavailable)

It says that a lock file preventing your package manager from getting exclusive access. Package managers create these lock files when they starts and if they crash, you reboot, your power goes out, etc, before they are completed, the lock file remains and the next manager believes another manager is already running

sudo rm /var/lib/dpkg/lock

sudo rm /var/cache/apt/archives/lock

Enable MACRO in GDB

How to Enable MACRO support in GDB..?

compile your source code using the options -gdwarf-2 -g3,
gcc -gdwarf-2 -g3 
then in gdb prompt, you can issue commands

macro expand expression


for more information, you can go here


How to know the Linux Distribution Name of your machine?

To get simply the OS kernel version you can use the command uname -a

nthattil@nthattil-desktop:~$ uname -a

Linux nthattil-desktop 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC 2007 i686 GNU/Linux


But how to know the distribution..?

You can try one of the below given methods for that..
nthattil@nthattil-desktop:~$ cat /proc/version

Linux version 2.6.22-14-generic (buildd@terranova) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Dec 18 08:02:57 UTC 2007


To get more presided output, you can use,
nthattil@nthattil-desktop:~$ cat /etc/issue.net
Ubuntu 7.10


Or you can also use,
nthattil@nthattil-desktop:~$ dmesg | head -1

[ 0.000000] Linux version 2.6.22-14-generic (buildd@terranova) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Dec 18 08:02:57 UTC 2007 (Ubuntu 2.6.22-14.47-generic)