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 –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
"8. Make an audible alarm when an IP address goes online:"
Thanks!
mount /path/to/file.iso /mnt/cdrom –o loop
pgrep procname
tail -f filename [filename]
An example would be:
apropos who
Really useful when you know what command you need but forgot its name.
using ranges {..} in wildcards
e.g 1. rm {A-Z}*
e.g 2. mkdir {A-Z}/{1..9}
e.g 3. mkdir 2009-05-{1..31}
e.g 4. pkill fox
e.g 5. whoami
e.g 6. uname -a
e.g.7. cd -
e.g 1: deletes all letters starting with capital letter
e.g 2: will create directories of A/1, A/2 ...Z/9
e.g 3: mkdir will create directories 2009-05-1 ... 2009-05-31
e.g 4. pkill [substring] will kill all process that contain [substring]
e.g 5. self explanetory
e.g 6 gives OS info
You should have put Noob or beginner IN THE TITLE.
e.g 7. switches to last working directory
Use pkill
Please...your hubris is only outdone by the likelihood you haven't bathed in a week.
To the author--thanks. A couple of these will be useful.
cd by itself takes the current user back to their home folder,
while cd - returns to the previous folder, when the last cd command was issued, while 2 dashes goes back twice, 3 dashes goes back three times, etc...
For what I can remember I found references to killall only once for the past few years so I suppose it is sort of unknown.
Hi Jun!
Sudo please change my link in your blogroll to http://www.dannybuntu.com
I am no longer a bum!
At long last I came out of my rock and started to learn how to make money online as a freelance writer
Sa wakas.
P.S. I put you in my G-old friends hehehe.
Like this:
ffmpeg -f oss -i /dev/dsp1 -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
if dsp1 don't capture audio use dsp0.