Linux
On this site

Home Page

Linux

Links

Some useful Linux Commands

This page sets out a few of the more useful commands I have found. When starting, I found that the most difficult bit was knowing that a command existed. Once you know it's there, you can soon use man or HOWTOs to find out how to use it. Just remember - Linux is case sensitive.

There are lots of pages with lists of commands like these. Check them out too;

uname -a Show Linux version details
free -m RAM memory useage
Note that Linux uses any free RAM for buffering, so it might look like there is almost no free memory left.
df -m Show disc space useage
du -s /home/*/ See who is using all the disc space
(best run as root)
dmesg To read boot up messages
eg dmesg | grep -i irq to check for IRQ notes during startup
/var/log/Xorg.0.log Check messages from the X server
(good for troubleshooting problems with X)
dpkg -l | grep -i xxxx Search for installed packages with xxxx in their name.
grep -H "xxxx" * Search files in current directory containing string "xxxx".
lspci -v details of hardware
less /proc/interrupts lists IRQ settings
/sbin/route kernel IP routing table
/sbin/ifconfig IP details
/usr/sbin/lshw lists hardware details
best to run lshw as root
less /proc/cpuinfo CPU details
mii-tool -v details of network cards
hdparm -tT /dev/hda Measure hard drive access speed
(root permission needed)

Updated: 5 August 2007
Please email any comments / suggestions here