Linux commands with names so short, they're easy to remember forever

Most Linux users learn basic commands likecd,mv, andlspretty early on. You're going to use them often, but there are other short and useful commands that I like to teach my trainees and students right away. Here are 4 short commands that are not only useful, but they have names so short, you'll remember them forever.
Cat lets you do some amazing stuff with text in a terminal
Look into a file's contents without opening it

Out of all the short, easy to remember commands, I likecatbest (and not just because I love cats). When you use it, it displays the contents of a file right there in the terminal.
You could just use it to display a file. Or you can do other things, like make a list with-bor show all the characters with-A. In my example, I used:
cat notes.txtfor the standard content display. For the list, I usedcat -b notes.txtand for all the characters being displayed, I usedcat -A notes.txt.
It's a short and fun command that saves a ton of time. It can also be used to display the contents of multiple files by typingcat file1 file2(and adding as many other files as you like).
But the best part of this command is the ability to make new files right in the terminal, which is something I do a lot, especially for taking notes or keeping track of things. Don't forget to hit CTRL + D to save your file afterward.
And just for fun, you can always display the content of the file backwards if you want, usingtac, which is a pretty fun thing to do sometimes.
Grep is a powerful search command
Finding content inside files from the shell

David J. Buck / How-To Geek
The grep command is one of those multipurpose commands that makes using Linux easier. It's used to search for patterns in a file. When it finds what you're searching for, it'll print it in the terminal.
If I want to find a phrase, sentence, pattern among my files, I usegrepfollowed by-iso it ignores uppercase/lowercase sensitivity.
Using-rwill do a recursive search , which is pretty handy. Using-lis another useful option, as it'll show you filenames without the actual text. A typical command would look something like this:grep -i 'search-term' *.txtif you want to search all text files that might contain those words. You can sub in a specific file name or type as well.
David J. Buck / How-To Geek
Grep is fast and can do a lot more than just search for patterns, so it's worth learning inside and out. I recommend taking a look at its man pages and taking it for a test spin in your own terminal.
df is basically a Linux power tool
Monitoring disk space and usage quickly

David J. Buck / How-To Geek
If you want to know anything about the used or free space on your disk partition,dfis the command you'll use. It stands for "disk free" and it gives you quick access to some very important information.
Just typing "df" into your terminal will bring up a bunch of information. To make more sense of the information on the screen, add-hor-H, which displays information in "powers of 1024" or "powers of 1000" respectively (you can read more about this at the Ubuntu Wiki ), according to the Linux Pocket Guide (page 92 if you're curious).
Runningdf --totalgives you basic information about the total space used and remaining. This command works on all three distros I use (Debian, Mint, Ubuntu), but it might not be available in all distros. I check my disk space often and always use this command first. I recommend usingdf -hmost, because its output is, well, readable by humans.
pwd is a short but helpful command
Find your file paths in seconds

David J. Buck / How-To Geek
This one is one of my favorites and makes copying or moving files super easy. It has a very basic, but in my opinion, very useful function: to print the current directory .
I use it most often if I'm syncing files between Termux on my phone to one of my Linux desktops. If I don't remember the directory, I just execute this command, copy the path, and then move the files.
Let's say I want to move an entire directory of Phish albums from my phone to my PC, but I don't quite remember the path to their folder. I know they're buried deep within the mpdfolder on my phone. So I'll search for the folder and usepwdto find its file path. From there, it's a matter of either moving it somewhere else on my phone or syncing it to my Mint PC.
Learning short terminal commands can make learning and navigating Linux easier , especially if you're new to the OS. My recommendation, though, is to learn about your distro and keep a Linux reference book around. I like The Linux Bible and O'Reilly's Linux Pocket Guide . I also like to create handwritten reference notes that I tack on the wall in my office. Half the fun of Linux is learning as you go, but you can't do that without understanding what the commands you use actually do.
