Monday, June 1, 2009

10 Unknown but Useful Linux Terminal Commands

The original post was here.

---

Before, I have posted here a few basic Linux terminal commands that I think are essential for newbies to know. I've also shared some deadly ones that should be avoided at all costs. This time, I'm going to show you several terminal commands that are perhaps unfamiliar to many new-to-Linux users but could be really handy when used properly.

Here’s a list of 10 rather unknown yet useful Linux terminal commands:

1. Kill a running application by its name:
      killall [app_name]

2. Display disk space usage:
      df –h

3. Locate the installation directories of a program:
      whereis [app]

4. Mount an .iso file:
      mount /path/to/file.iso /mnt/cdrom –o loop

5. Record or capture a video of your desktop:
      ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg



6. Find out the Universally Unique Identifier (UUID) of your partitions:
      ls /dev/disk/by-uuid/ -alh

7. Show the top ten running processes (sorted by memory usage):
      ps aux | sort -nrk 4 | head

8. Make an audible alarm when an IP address goes online:
      ping -i 60 -a IP_address

9. Run the last command as root:
      sudo !!

10. Make a whole directory tree with one command:
      mkdir -p tmp/a/b/c

---

Note: There are some problems on doing number 9 above, so you may want to try it out and let me know.