Productive Linux


 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Don't have an account?
Sign up to
Forgot your password?

The 11 Most Useful Linux Commands in the World Ever
28 June 2010 @ 16:09 BST
by Paul

Almost every Linux website seems to have a list of the "best command line commands". Sometimes they get them wrong.

Here is a list of useful commands that I came up with by looking at my 'history' file. I would not be happy to use a computer platform that didn't support them:

ls -tr
What is the last file that I saved/downloaded/modified? This command is essential if, like me, you can never remember file names.
This command allows you to login to any computer and do stuff with it. It is essential for a happy and fulfilling life.
What process is eating all my memory or all my processor time? Essential - especially if you use it with the 'M' and 'P' commands. Firefox is often the culprit.
kill -9
Die, die, die the process that is eating all my memory. The '-9' is the shutdown immediately and take no prisoners option. It's not unusual that it has to be used with Firefox.
A pager; essential for finding out what is in your files without having to open them in a text editor.
To copy files from one computer to another you could muck around with ntfs, samba, fish and so forth, or you could just use scp
ifdown, ifup, iwconfig, dhclient, iwlist
Now I could mess around with Network manager to mange network interfaces, or I could use these light-weight tools instead.
Useful for starting and stopping services, say alsa, apache2 or anything else for which you need root privileges.
How you get to the directory where you want to do whatever it is you want to do.
df -h
The command that gives the answer to the question 'how much disk space have I got left?'
Lists all messages from the kernel and its sub-systems. It is essential if you want to know what the device name of a USB disk that you just plugged in is.

So, there you are the most useful command line tools in the world ever!

du /var/ -h --max-depth=1 lists the size of all subfolders in a specified folder.

Posted by Mikael on 2010-06-30 15:43:33.

First, I can't believe "grep" didn't make this list, and second, I do believe that 'ifdown,ifup,iwconfig,dhclient,iwlist' are all different commands not to be used interchangeably - meaning this list is more like 15 than 11.

Posted by Meanasspenguin on 2010-06-30 19:38:38.

If you're on Debian, the first command I suggest is `info coreutils` which will show a quick index of the basic GNU commands, along with `apropos`, and the package manager commands to get what you don't have (apt-*). To speak of a list like this is pretty silly, imho.

Networking commands are often deferred to a gui-config applet - I highly disagree with putting those on the list. And, it certainly isn't one of the "most useful" when you only have to use it a few times.. How often do you have to check dmesg? Also certainly not one of the most useful.

Posted by Evan Carroll on 2010-07-01 06:35:06.

I often use manual page like: man ls, or man -k blabla (behave like apropos command). I think you should add man command in your list.

Posted by Joielechong on 2010-07-01 09:21:39.

Sry but i beg to differ. rsync > scp htop > top cd - sudo !!(bang bang)

Posted by Emil on 2010-07-01 10:05:45.

For serious users, xargs and strace are at the top. lots of other commands more powerful and strace is excellent for troubleshooting.

Posted by aj on 2010-07-02 21:05:20.

To go with df -h you have to have du -hs . or du -hs * so you can see the size of the current directory and the files and directories in the current directory respectively. An awesome list I use almost everyone of them daily.

Posted by wags007 on 2010-07-05 03:48:15.

Apache does not need to be run as root, hence the standard www or www-data user :P It's a bit of a security risk to run as root.

Posted by Stephen on 2010-07-05 23:59:57.
Comments disabled