The Ultimate Linux Terminal Cheat Sheet to Impress Your Friends: Because Life's Too Short to Type Out Entire Commands

cocomo29

Haroon Abbasi

Posted on April 5, 2023

The Ultimate Linux Terminal Cheat Sheet to Impress Your Friends: Because Life's Too Short to Type Out Entire Commands

Let's face it, we all spend way too much time in front of our screens and if you're like me, you probably spend most of that time in the terminal. Recently, a friend of mine got into the linux asked me for tips on how to use it more efficiently, I had plenty of tips and tricks up my sleeve to share. And because I'm a generous person (and because I love showing off my these cool tricks), I thought I'd share them with you all too.

So buckle up, because we're about to go on a wild ride through the world of the terminal. Here are my favourite tips and tricks to help you become a terminal ninja in no time.

Terminator: Not Just a Movie, its your new BFF

First up, let's talk about the default terminal. It's fine and all, but have you heard of Terminator? It's like the cooler, more customizable cousin of the default terminal. With Terminator, you can split your terminal into multiple panes and customize each one to your liking. It's like having multiple terminals in one, making it easier to multitask and get things done.

Ctrl+L: Clearing the Screen Like a Boss

Got a messy screen? Instead of typing out clear, you can simply press Ctrl+L to clear your screen. It's like a magic eraser for your terminal. Plus, it's way faster than trying to wipe off your screen with a tissue.

TLDR; Not Too Long, Didn't Read

Man pages are like the giant textbooks of the terminal world. They're filled with useful information, but they can also be overwhelming and confusing. That's where tldr comes in. This nifty tool provides you with only the essential information you need, without all the extra fluff. It's like having a cheat paper version of the terminal.

Tab Your Way to Glory

Next, let's talk about tab completion. It's a lifesaver. Instead of typing out the whole command or file name, just type a few letters and hit tab. The terminal will do the rest for you. And if you're not sure what the possible options are, just double press tab and it will show you a list. Easy peasy, lemon squeezy.

History: It's Not Just for Textbooks

Your terminal history is like a time machine that can take you back to your previous commands. Instead of typing them all out again, use the up and down arrow keys to access your already executed commands. It's like having a photographic memory, but without all the annoying flashbacks

Quick Fix for Forgotten Sudo (and other stuff)

Have you ever written a big command and then realized you forgot to use sudo? It's the worst. But fear not, my friends. Just type sudo !! and it will add sudo to your last executed command. And if you want to search for a specific word in your last executed command, just do !! | grep [word]. Basicallly !! represents your last executed command! It's like magic, but better.

The Power of Ctrl+Q and Ctrl+E

Sometimes you need to edit a command you've already typed out. Instead of using the arrow keys to navigate to the specific part of the command you want to edit, use Ctrl+Q to jump to the beginning of the line and Ctrl+E to jump to the end. It's like having a laser pointer for your cursor.

Cd -: oh-my-gosh! This is a game changer!

Have you ever typed out a long and complicated directory path, only to realize that you forgot to add a crucial file? Well fear not, my friend, because the cd - command is here to save the day! With just three simple keystrokes, you can jump back to the previous directory you were in. It's like going back in time, but without all the messy time travel paradoxes. So, next time you're lost in the endless labyrinth of directory paths, just remember to type cd - and let the magic happen!

Sherlock Holmes ain't got nothing on me and my Ctrl + R

Last but not least, let's talk about searching through your command history. Instead of scrolling through everything you've ever typed, just press Ctrl + R and start typing. It's like a reverse Google search for your terminal history.

And there you have it, folks. Some of my favorite tips and tricks for being more productive and faster in the terminal. These tips will help you slash through the command line like a titan through a wall (without causing as much destruction, of course). Now go forth and conquer the terminal world like Eren Yeager going after Titans (minus the angsty teen drama and existential crises). Stay sharp, stay curious, and as they say in Attack on Titan, Shinzou wo Sasageyo! (which roughly translates to 'Dedicate your heart!'). Happy terminal-ing!

give this article a read on medium :)

💖 💪 🙅 🚩
cocomo29
Haroon Abbasi

Posted on April 5, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related