A few rarely used but important Linux commands.

A few rarely used but important Linux commands.


If you love the Linux terminal alot then you should be familiar with a few of the commands such as ls, mkdir, rmdir, cat, pwd, man, apt-get, touch, cd, cp, free, tail, date, and so on. am sorry to say that my post today is not for newbies in Linux but for people who are a-bit comfortable but haven't tried out a few commands. Lets quit talking and start typing!!!

1. sudo !! : Forgot to run a command with sudo? You need not re-write the whole command, just type “sudo !!” and the last command will run with sudo. please the remember to include the space between sudo and !!.

2. nl : Outputs the content of text file with lines Numbered. stop looking try it out, okay here is an example: nl testfile.txt

3. python -m SimpleHTTPServer : Creates a simple web page for the current working directory over port 8000.

4. shuf : Randomly selects line/file/folder from a file/folder. I recommend this for people who has problems with indecision. Lol

5. last: Want to know history of last logged in users? This command comes to rescue here. It can help settle disputes between multiple users

6. Ctrl + l: clear shell prompt, instantaneously. Its pretty common, but very useful is your shell is too clouded or you dont want people to know what you have been working on.

7. look: Check for an English word, from the dictionary, in case of confusion, right from the shell. now this is a true substitute for my English teacher back in high school. for example; look phoen.

8. factor: Gives all the possible factors of a decimal number. you didn't know this before i know that hahaha got you!!!

9. rev: prints the content of a file in reverse order for example just type rev in your terminal window then press enter and type any word and see the magic.

10. Ctrl-x-e : This command is very much useful for administrator and developers. To Automate day-to-day task an administrator needs to open editor by typing vi, vim, nano, etc. How about firing instant editor (from terminal).

11. tree: Get the current directory structure in tree like format. you have to install it tho using sudo apt-get install tree.(for debian users)

12. pstree: This commands shows all the processes running currently along with associated child process, in a tree like format similar to ‘tree‘ command output.

13. locate: The locate - a.k.a. find - command is meant to find a file within the Linux OS. If you don't know the name of a certain file or you aren't sure where the file is saved and stored, the locate command comes in handy.

14. sort command examples:

Sort a file in ascending order. for example: sort names.txt

Sort a file in descending order for example: sort -r names.txt

15. sl (Steam Locomotive):

You might be aware of command ‘ls‘ the list command and use it frequently to view the contents of a folder but because of miss-typing sometimes you would result in ‘sl‘, how about getting a little fun in terminal and not “command not found“. apt-get install sl.

16. fortune: what about getting your random fortune, sometimes funny in terminal. apt-get install fortune.

17. Cowsay: An ASCII cow in terminal that will say what ever you want. apt-get install cowsay. then an example ; cowsay I love Linux!

18. toilet: what? Are u kidding, huhh no! Definitely not, but for sure this command name itself is too funny, and I don’t know from where this command gets it’s name.

19. cmatrix: You might have seen Hollywood movie ‘matrix‘ and would be fascinated with power, Neo was provided with, to see anything and everything in matrix or you might think of an animation that looks alike Hacker‘s desktop. apt-get install cmatrix.

20. espeak: Just Turn the Knob of your multimedia speaker to full before pasting this command in your terminal and let us know how you felt listening the god’s voice.

21. bb: First install “apt-get install bb” and then, type “bb” in terminal and see what happens.

22. cal: ever tried this command "cal"? it displays the months calender right, how about someone born in march 1993 like my self? use cal 3 1993 . where 3 represents month of Birth thats March and 1993 represents the year obviously.


I know its a really long read and I do appreciate your passion, I really love the linux terminal and I discover new things always. please join me

Andrew Nduati

Fintech - DevRel

8 年

I think I've found ways to spice up my Linux terminal. Keep it up!

要查看或添加评论,请登录

David O.的更多文章

  • Field and Office Massage Business Idea

    Field and Office Massage Business Idea

    Pressing, massaging, and manipulating your skin, muscles, tendons, and ligaments are referred to as massage. Massage…

  • Car theft & Carjacking in our world today.

    Car theft & Carjacking in our world today.

    Carjacking according to Wikipedia, is a robbery in which the item taken over is a motor vehicle. In contrast to car…

  • Manchester United — A target for Ransomware.

    Manchester United — A target for Ransomware.

    Hackers who targeted Premier League club Manchester United last Friday are reportedly demanding millions of pounds in…

  • Helping financial institutions stay safe by Hacking them.

    Helping financial institutions stay safe by Hacking them.

    This article should give you chills. It is not an illusion that cyber fraud is increasing rapidly.

  • Schemes used by Hackers in Phishing that you should know.

    Schemes used by Hackers in Phishing that you should know.

    I would love to explain two concepts malicious hackers use to steal user credentials Emotet and CSS Invert(). Emotet —…

    2 条评论
  • Anonymous Hacking NPF - True Implications for Nigeria

    Anonymous Hacking NPF - True Implications for Nigeria

    The website of the Nigerian police force was hacked and personal details of police officers were leaked online. I see a…

    3 条评论
  • Getting hacked is easier than you think. Part 2

    Getting hacked is easier than you think. Part 2

    Before you read part 2, please read part one here. To the Attackers surprise, the CEO has very little online presence.

  • Getting hacked is easier than you think.

    Getting hacked is easier than you think.

    Anyone can be a victim no matter your level of security. - David Obi Part 1 The term cybersecurity has been used so…

  • 5 Why's to figure it out fast.

    5 Why's to figure it out fast.

    Most of us love the fast approach to things, when we experience a challenge, we usually try to solve it immediately…

  • Overview of Cloud Computing

    Overview of Cloud Computing

    A major part of the world is moving towards using the internet for virtually 90% of tasks, The internet forms a…

社区洞察

其他会员也浏览了