11 Lesser Known Useful Linux Commands

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

33 Responses

  1. Andrea says:

    Nice, thanks :)

    Actually, `nl ‘ just numbers text lines while `cat -n ‘ numbers all the lines in the file

    • Avishek Kumar says:

      @ Andrea, Thanks for your concern, we are aware of the fact and will be placing your suggested command in our future post:)

  2. Rajiv says:

    Very gracious sir. It is extremely most pleasant to read such tidbits of knowledge and to savor the taste of victory.

    Please provide your private email address so that I can communicate to ask you particular questions of your undoubted authority.

  3. deepanjan says:

    sry sry the reply was not moderated n i thought that my reply was deleted


    i need a help in context of some setting in squid proxy server kindly if u can provide your mail address

  4. Rizwan says:

    1) curl ifconfig.me is nice !!

    2) mtr command consumes more cpu usage

  5. txtechdog says:

    You stated in your article that Ctrl-x-e would bring up an editor. What it actually does is open the command line editor, which is not the same thing at all.

    Also, this behaviour is dependent on several things.
    – First, you have to be using bash as your shell.
    – Second, you must be in emacs line editing mode.
    – Third, the editor that is invoked is determined by the value of the EDITOR environment variable. If that variable isn’t set, then it looks for emacs in your path and tries to invoke it.

    If you just want to open a file for editing, then Ctrl-x-e isn’t what you want.

    Try this experiment to see why this isn’t a good idea:

    Run the following two commands as root at the shell prompt.

    # export EDITOR=/usr/bin/vi
    # set -o emacs

    now, Ctrl-x-e and type the following in the editor session spawned:

    cd /
    echo rm -rf *
    echo “OMG….You just typed rm -rf * in the root filesystem as root”

    then exit the editing session with :wq

    You will see something like this:

    [[email protected] ~]# set -o emacs
    [[email protected] ~]# echo $EDITOR

    [[email protected] ~]# export EDITOR=/usr/bin/vi
    [[email protected] ~]#
    cd /
    echo rm -rf *
    rm -rf bin boot dev etc home lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var
    echo “OMG….you just ran rm -rf as root in the / directory.”
    OMG….you just ran rm -rf as root in the / directory.

    Once you are done running this little experiment, be thankful that I put an echo in front of the rm -rf * and you didn’t trash your whole system.

    Linux user since kernel version 0.12 (that isn’t a typo)
    Sr. Linux Administrator / Architect

    • Avishek Kumar says:

      @ txtechdog,

      Your finding is appreciated. we need to verify it on our side, before editing the article. Thanks

      • txtechdog says:

        Excerpt from section 8.4 of the Bash Reference Manual:

        edit-and-execute-command (C-x C-e)

        Invoke an editor on the current command line, and execute the result as shell commands. Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in that order.

        Your article is wrong. Please correct it. Tips are great, but incorrect tips are not only not helpful, but can be harmful.


  6. MAC says:

    Excellent write up, the sudo !! is pretty slick!

    • Avishek Kumar says:

      Thanks @ MAC, for your feedback.

      keep visiting tecmint.com
      we are coming up with another article of this very series, Yeah! “11 Lesser Known Useful Linux Commands”

  7. Most of these commands will not work unless you install the appropriate software. I wouldn’t call them less known useful linux commands, I would call them “less known useful linux commands that you most likely don’t have installed”

    – CTRL+x+e requires emacs to be installed
    – Tree must be installed

    The rest are good but are not very useful for day to day activities.

    You can use a wget on an external website that prints the IP to know what your server’s external IP is. Just one method on top of my head.

  8. Stuart Page says:

    Thanks! These are actually quite useful!

  9. Ernst says:

    Thanks you Avishek Kumar, this article is very very helpful to me. It improves my vision and skill for GNU Linux. Thank you very much

  10. deepanjan says:

    Qualitative info

    will you provide your mail address so that if i get stuck in around Linux or kind of troubleshooting you could help me out

    i am exploring this OS now a days

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.