Linux 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 –oloop

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: