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
Fintech - DevRel
8 年I think I've found ways to spice up my Linux terminal. Keep it up!