While these aliases offer a sensible safety net for the uninitiated, they are essentially training wheels that prioritize system hygiene over raw command-line discipline. It’s a practical primer for beginners, though true mastery requires knowing your tools well enough to not need the hand-holding.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
7 Aliases That Make The Terminal Great AgainAdded:
I think the reason a lot of users struggle using the terminal is because out of the box some of our commonly used terminal commands, they kind of suck.
They need to be spruced up a little bit.
They need to be configured a little bit.
And the best way to do this is with aliases. So, in your bash config or zsh config or fish config, whatever shell you're using, you can set aliases that fix some of these commands and makes them a lot better, a lot more fun to use. So, today what I want to talk about is seven aliases that are going to make your terminal great again. By far, the most commonly used uh shell command is the ls command, the list command, right?
It lists what is in your directory that you're currently in or you could specify a directory as well. You could ls and then give it a path to a specific directory to take a look at. But out of the box, the ls command with no flags or options, it kind of sucks, right?
There's nothing here. There are no uh dot files, so no hidden uh directories, no hidden files. And of course, there's a lot of hidden directories and hidden files on the system. And most of the time you probably want to look at those.
Also, it is in this weird format where, you know, it's kind of in this uh uh columned format. Uh and of course, it'll vary depending on the size of the words in the output as well. It's just not a very clean way to look at this information. But the real problem here is that often you want a uh you you want to see all the hidden files, so you want to do dash a to do all files including the dot files. A lot of times you want to do dash a l for hidden files and l for long format listing, so you get the long format. This is much easier to read, right? But there's several other flags you probably want to add. One of them is uh the human-readable byte sizes cuz I don't like reading that this file is 21,541 bytes. Why can't you just tell me that's 21 kilobytes? Well, let's tack on the H flag, so A L H for human-readable numbers, and now we get the hidden files, the long format, and now we get human-readable numbers for the byte sizes. And if we up arrow again, let's tack on {dash} {dash} color equals always to add some color. And now we get some nice color. You can see we get directories that have a blue color here, and in my case the green is for executable binary, so shell scripts that have execute permissions. Although for me, I don't like that it mixes up files and directories. So for me, I would also tack on {dash} {dash} group {dash} directories {dash} first.
And there you go. Now we have the directories at the top of the list, right? And then we have A for hidden files, L for long format, H for human-readable numbers, color equals always, group directories first. That is the LS command I always want to run. And if I up arrow and look at this command, there's no way I could type that every single time I want to run an LS command.
That would get very tedious. So what you need to do is in your bashrc or whatever shell config, you need to set this as a alias here. I'm just going to do it interactively at the command line, so this will not be permanent. I'm going to alias LS equals, and then inside single quotes, you know, the new LS command will actually equal LS with all of these flags and options. So if I set that correctly, now every time I simply type LS, now I get LS with all the flags and options available. And this is so much better, all right? Because LS again is something you're going to run hundreds of times a day if you're in a terminal all the time, and you don't want to keep adding all of those flags and options that you're commonly going to prefer to use. Another alias I think you should consider, is adding the {dash} i flag to the remove command. So, rm is the remove command. And this is typically used to remove files on your system. And if you tack on {dash} i, it will interactively, meaning it will ask you, "Do you want to actually delete this file?" So, it's a safety check. And this is very important because a lot of times with the rm command, you can accidentally delete a lot of files.
Right, you can do a recursive rm where you delete entire directories of files, and you didn't mean to do it. So, the {dash} i flag is really cool because it will ask that yes or no question. So, what I would do is I would just alias rm. Matter of fact, let's alias rm to equal, and then inside single quotes, rm {dash} i.
I'm going to run that. Now, let me create a test file. I'm going to touch test, and there is now a test file in this directory. I'm going to rm test.
And it's Yeah, the interactive flag works. It's asking me, "Do I really want to delete that?" I'm going to say no in this case. Now, you're going to say, "Well, that could be really annoying because if you have this set permanently as a alias, well, if you're trying to remove, say, 100 files, you're going to have to answer that yes or no question 100 times." No, no, no, you can override it. All you need to do So, if I up arrow and do a rm, remember the {dash} i flag is part of the alias, but if I tack on a {dash} f flag for force, meaning a force the removal, meaning don't ask me. So, then whichever flag comes first, the {dash} i flag or the {dash} f flag, that one takes precedence. And in this case, the {dash} f flag should take precedence. So, it should force the removal of the test file. And it did.
So, if I ls and look for test, yeah, there is no file named test here. So, that is how you get around the interactive safety check if you need to.
And you're going to need to, especially if you're deleting oh hundreds or even thousands of files. You can't answer yes to every question. One other workaround you could do is you could do a RM and instead of using the force flag, you could just pipe yes into RM and that will automatically answer Y to every question that comes up. One other addition I would suggest, especially new users make, is instead of aliasing RM to just RM-I, you could do RM-capital I, which will not prompt you for a yes or no answer unless you're deleting more than three files. So, three or less and you're good. And also tack on this one here, dash dash preserve dash root. So, this is a safety a flag here where it will not allow you to ever delete the root directory, so the root file system. And of course, that would totally brick your machine. So, obviously that's important to have there as well. Now, another command that can be dangerous sometimes is the copy command because the copy command, you can copy a file into an existing file, you may meaning override an existing file. So, sometimes you want to have the dash I, the interactive flag with copy, meaning hey, ask me a yes or no question before you override a file. So, I would alias CP with CP-I. I would also go ahead and do MV-I. So, alias MV, so alias MV equals and then inside single quotes MV-I. That way anytime you're moving a file into a location that already exists, another file name, it will again prompt you that yes or no question. And just like we did with RM-I, once you set this alias, if you ever need to override it, just do a mv-f for force and then, you know, name a file and wherever you're moving the thing to. Another really crazy command that has bad defaults, make dir, the make directory command. Let's imagine I want to make a really long directory, you know, /home/dt/1/2/3/4.
I got a whole bunch of directories I want to create. And if I hit enter here, it's not going to create that directory uh because it cannot create directory six because directory five didn't exist and four didn't exist and three, you know, none of these directories exist.
Uh and you have to create the parent directories before you can create the child. But, if you tack on the dash P flag for create all the parent directories as well as the actual directory that you're trying to uh do here. If I do that, that actually succeeded and you will see, if I scroll up, I now have a directory one. Inside that will be two, inside that will be three. I created all of those directories. So, this is something I would typically just alias. I would alias make dir to equal, inside single quotes, make dir-p.
I think that is just a standard kind of setting. I would just always have that in my bash config. Now, for those of you that do bash scripting, I would never do a make dir-p inside of a script because there could be some unintended consequences because especially if the paths that the script is creating are sometimes dynamically generated, it could create some crazy long path and the script would then obviously succeed in creating, you know, all of these bajillion directories. So, I wouldn't use this in a script, but interactively, certainly as a bash alias, I think having that dash P flag as a default makes total sense. Another shell command that I find annoying sometimes. This is not one you use all the time, but for me, and because I spend a lot of time in the terminal, anytime I'm having networking issues, a lot of times I will use the ping command. I will ping, for example, I don't know, google.com.
And just check and see if the network is up, right? And then control C to kill that process. But, you know, it is annoying to start the ping and then having to kill the ping later. You know, why not just tack on this, ping -c for a count five, google.com. 1 2 3 4 5. Ping is over, right? Why not make that an alias, right? Alias ping equals ping -c five, right? That's kind of what you want to do because you know, rarely am I going to let the ping just go on forever. You know, if I need to, I can always override this anyway, because even after I do the alias, if I wanted to override it, maybe do a different number, or maybe a count of 10 for google.com, you know, 1 2 3 4 5 6 7. You know, it'll go on for You know, so I can always override that five count if I need it. And then another really common alias that I think is especially useful for people that are new to Linux.
If you're one of these people, I think most of us probably do update our systems at the command line. And you know, some of these commands can get kind of long or convoluted, or if you're new to Linux, maybe you just can't remember what all the flags are. For example, here I use Casio S. This is an Arch-based system. So, I would do a sudo pacman -capital S lowercase y u to update the system. And you know, if this is a command I don't want to have to type all the time like this, I could just create an alias. I would alias update equals and then inside single quotes in my case, sudo Pacman -Syu. If you're on a Debian or an Ubuntu base system, you would sudo apt update and and sudo apt upgrade. All right, that's the alias. If you're on a system that uses DNF, sudo dnf upgrade. But create a alias for update. And now, if I update, it's going to ask me for my sudo password.
And it's going to run the update, which is not something I want to do here on camera. It might my calls make some some issues, so I'll decline the update. So there you have it. Seven shell aliases that I think will make your terminal a little better. Now before I go, I need to thank a few special people. I need to thank the producers of this episode.
Matt, Steve, George, Darloff, Lee, Mark, Methos, Arjan, Peace Arch Invador, Reality's For Less, Roland, Virgin To An Ubuntu, and Willie. These guys, they're my highest tiered patrons over on Patreon. Without these guys, this episode about shell aliases wouldn't have been possible. The show is also brought to you by each and every one of these fine ladies and gentlemen. All these names you're seeing on the screen right now, these are all my supporters over on Patreon because I don't have any corporate sponsors. I'm sponsored by you guys, the community. If you like my work and want to see more videos about Linux and free and open source software, subscribe to DistroTube over on Patreon.
Peace, guys.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 views•2026-05-29
So What's Odin Lang Even Good For
TechOverTea
131 views•2026-06-01











