Diagnostics
The most important commands to see what’s going on:
- dmesg prints the latest kernel messages
- lsmod gives you the modules currently loaded in the kernel
- lspci -nn gives you a list of your system’s PCI devices, including vendor & device id
- lsusb gives you a list of your system’s PCI devices
- lshal|grep info.product gives you a list of all the devices in the system
- lshw -C disk gives you details on all the disk drives in the system
- dmidecode gives you a human-readable dmi/smbios table
- top gives you the running processes sorted by cpu usage (useful when things get slow)
- ethtool -i eth0 gives you the selected network interface’s driver
- acpi -V gives you info on the battery/ac adapter and temperature sensors
- modinfo <module> gives you info about a kernel module in your system
- xev prints info on X events as they happen
- nm-tool gives you a lot of info on your network interfaces
- blkid matches partitions to uuids
- xdpyinfo provides info about your X configuration
- xdriinfo provides info about your DRI driver
- dpkg -S <filepath> finds the package containing the given file
- dpkg -L <package> lists the contents of a package
- ldd <executable> (e.g. ldd /usr/bin/evince) gives you a list of all the shared libraries the program uses
And some cute, but not so important ones:
- id tells you your uid, gid and what groups you’re a member of
- uname -a gives you details on the system that you’re running:
Linux symeodi-laptop 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux - date gives you the current date and time: Fri Nov 16 13:39:26 CET 2007
- uptime: 13:40:54 up 4:45, 2 users, load average: 0.51, 0.44, 0.38
- free -mot gives you details about your memory usage
- df -hl gives you disk usage by file system
- cat /proc/cpuinfo gives you details about your cpu
- acpi -V gives you information about your battery and power supply
- laptop-detect -v gives you a very funny output: We’re a laptop (ACPI batteries found)
- lsb_release -a will tell you the current release of your linux distro

Leave a Reply