 Here recently I've been telling you guys that we need to start sharing our dot files our config files We need to start collaborating a little bit You know sharing what we're all doing and our bash RC and our vm RC and our tiling window manager configs a few days ago I shared with you guys a website called dot share dot it that's really interesting a lot of you guys went over there and Started posting your configs. I posted some of my configs over at dot share dot IT So today I thought I would take this opportunity to share with you some of my favorite Shell aliases, so I'm gonna open up my bash RC and show you what some of my favorite bash aliases are because I don't think I Use enough bash aliases and I don't think some of you guys use enough shell aliases because when I take a look at your bash RC and your Zshrc or your fish RC or whatever shell you're using I don't see very many aliases and some of you guys configs some configs I don't see any aliases in so today I wanted to share with you my favorite bash aliases and you guys let me know in the comments below your favorite bash aliases So let me switch over to the desktop here And I'm gonna go ahead and open up my bash RC and I'm gonna open it up inside a doom emacs here And let me zoom in a little bit so you guys can see what's going on And if I go down through my bash RC to where the aliases start actually before we get to the aliases I will mention this function here now this function I think I originally got it from the Ubuntu bash RC the default Ubuntu bash RC I think comes with this there's several Linux distributions out there that come with this Extraction function it does the command EX anytime you do EX followed by a Archived file and you have this case statement that's written in bash And it basically says if the file ends in tar dot bz2 run this command You know tar with these flags if it is a tar dot gz run tar with these flags if it's a Zip you know run the unzip command if it's a seven zip file run this command if it's a dip file run this command Etc. So that is a really nifty function if you don't have this Extraction function in your bash RC. I strongly recommend you guys add this it really saves a lot of time But that really isn't a bash alias. So let's get down to the aliases So here are my aliases the very first one I have is alias do as equals do as space dash dash So do as is an alternative to the sudo command It's a less bloated form of sudo But do as does have this annoying thing with it do as has two or three flags that you can pass on to it but the problem is if you do a do as and then the name of another command and Those particular flags that you give to that command are similar flags to do as there's a conflict So the way you get rid of that conflict is you do do as space dash dash That basically says hey every flag that comes after the dash dash is not for do as it's for the program that we're running Do as on I hope that makes sense. So it's kind of a safety thing So I always add do as equals do as space dash dash then I have the navigation aliases for CD So do you spend any time in the shell at all? You spend a lot of time seeding around the directory structure and one of the most common CD commands is CD space dot dot Which gets you into the parent directory. So let me CD back into my home directory I don't want to type CD space dot dot every time I want to go to the parent directory I just want to type dot dot And so dot dot alias dot dot equals CD space dot dot And then if I want to go up to the grandparent directory, right the parent directory of the parent directory I can do three dots so I could do let me CD back into Slash home slash dt, but if I do three dots, I'm gonna be in the root directory, right? So I do a PWD for print working directory You see I went up two levels all the way to the root file system If I want to go up three levels, you see period three does Three levels up in the directory structure and then period four period five the next set of aliases are pretty Self-explanatory for VIM and emacs so for VIM I use neo VIM So I don't want to type in VIM though. I'm so used to typing VIM for the VIM command So I just alias VIM to open neo VIM. So this is really neo VIM even though I typed VIM I hope that makes sense the same thing with emacs because with emacs. I don't actually run emacs I run the emacs client So I have the emacs daemon running in the background the emacs server and all my emacs windows are actually this command here The emacs client space dash c space dash a and then in single quotes emacs for the name of the Buffer I guess that I'm creating or it's actually like the the session I'm creating there So that is very lengthy to type right and I open emacs all the time I just want to type the word emacs and it actually Handles all that so anytime I do emacs, you know like in a command line or run launcher It actually runs the emacs client dash c dash a and then within single quotes emacs Now if I want to do the terminal version of emacs I almost never opened the terminal version of emacs But if I wanted to I'm in a terminal right now I could just do em and that actually runs slash user slash bin slash emacs base dash nw so This is the terminal version of doom emacs. It looks like there's some errors here I never actually use emacs in the terminal though So I'll have to address that at some point now the next set of aliases are Probably some of the most common commands that I run at the command line and probably the most common commands you guys run at the command line is Installing software updating the system, you know anything you do with your package manager So I want to alias a lot of Pac-Man commands you guys running devian or a boom-to-base systems You probably want to alias things like apt update apt upgrade apt install apt remove things like that So what I did is I did an alias pack syu is the same as Pseudo Pac-Man dash capital s y y u. You know, it's just the standard kind of update command I did yay s u a it's actually yay space dash capital s u a dash dash no confirm I don't want to have to confirm That I want to update, you know every single package that it finds Same thing with unlock here unlock sometimes happens when the Pac-Man Database is locked So, you know, you're trying to run a Pac-Man command and it's giving you an error running this command unlock deletes the lock file cleanup is Running this very Convoluted Pac-Man command that removes all the orphaned packages on the system I don't run this command very often this command when you run it. It can be dangerous You know, you don't want to just blindly run this command and accept, you know Everything that it suggests to remove because I have ran this command before and it's wanted to remove like very important system Packages that you don't want to remove because you know, it might break the system in the next set of aliases or commands I never run I never bother, you know Getting new mirrors or look looking for the fastest mirrors But if I wanted to I do have these aliases available and the reason these are aliased is because you see how long these commands are If I had to type them out, I actually got these from the arco linux bash RC I believe this is from the default arco linux bash RC these mirror commands I didn't create them myself again I don't really use them how often do you run, you know the mirrorless command on an arch based system? Not very often now the next set of bash aliases I get asked all the time about my LS command my LS command is not actually LS You see alias LS LS is actually the command exa. There's a program called exa It's a very colorful Alternative to LS and I run it with these flags a for all files ill for long format Color equals always because I want it to be colorful and group directories first because I want to see the directories Listed before the falls. So again, let me open up a terminal if I run a LS, you know, this very colorful LS Yeah, this is really the exa command. Let me zoom in a little bit and clear the screen now I have LA as a different exa command I have ll for once again another exa command one of the most interesting ones though is L dot Now this is hey run this exa command, but I want you to grip out the files that begin with a period So basically it's a I'm running a LS, but I want the dot files in this directory So L dot is a LS But again, it's just gonna return the dot files the hidden files within the directory The next set of aliases is for the various grip commands adding the flag dash dash color equals auto This is a standard and most bash RCs even default bash RCs, you know on Distributions like a boon to and Debbie and and things like that You'll you'll usually have these as aliased anyway because very few people want grip without the colors Because adding that colorful output and again in the comments here That's good for log files if you have to read a log file then adding flags here this section here meaning I don't want the copy command the CP command to ever be run without CP dash I The dash I flag is an interactive flag It means I'm copying a file if that file already exists where I'm trying to copy it to I want you to ask me about it Right. I want you to confirm that I really want you to override the existing file before you override it It's again a safety measure of the DF command I want DF to be DF space dash H because that's a human readable format So DF for me is really DF dash H meaning, you know You get things like 32 gigs instead of you know that massively long number where it's in single bytes I that's unreadable and I have aliases for the links terminal browser Basically telling it I want you to run links with these commands these flags here go find this config file And I also have a flag in this let me close this terminal so you can see the full command here Sam running it with this flag at the end dash vi keys That means the links terminal browser uses the VM key bindings for navigating and I have an alias for my terminal file manager Vi fm because it's really not vi fm. It's running this custom script here that comes with Ubersug image previews and some other stuff, so it's not really vi fm It's a script that I wrote that does launch vi fm But it launches some other stuff too the next set of aliases are really interesting and that is the ps command So this is for looking at processes that are running on your computer Now typically if I want to check out some processes running on the computer if I'm concerned about what's eating my ram Or what's eating all of my CPU? I just open up each top, but you can use the ps command at the command line and for example if I do ps mem Well, let's let me zoom back out. That's hard to read because I Yes But now you can't read it, but that's basically the ps command ps mem. It's a list of a What is using all of my memory basically and ps cpu is the same kind of command But of course it sorts them by cpu usage. Let me clear the screen here Unfortunately, those ps commands don't look all that well because they spit out so much output When I'm zoomed in it's unreadable. All right Now the next set of commands are my get commands So I use get all the time and really when you're thinking about what shell aliases You want to use think about the commands you run all the time. I'm always pushing to my get lab I'm always doing stuff with get so it makes sense to not have to do get add name a file get commit Dash yum and then the message get push your origin master get pull Well, you know all of that stuff get check out get status this and that why not just drop all the get And that's what I did so instead of get add space dash you for add all the updated files How about just add up for add updated files add all for get add everything Get check out is now just check out get commit is now just commit get fetch is now just fetch get pull is now Just pull get push is now just push etc some of the other stuff I have aliased is SSN pseudo shut down now SR pseudo reboot for those of you that run X term or you are X VT You're probably playing in the X resources file all the time and for those changes to take effect You have to run the command XR DB dash merge and then the location of your X resources file For your changes to take effect and for your you know color changes and font changes and all that to take effect And those terminals well wouldn't it be nice to not to have to type that long command all the time So and I just alias merge to be XR DB dash merge X resources I'm just quickly taking a look at some of the other stuff here I mean I've got some aliases for some GPG stuff got a YouTube DL and these YouTube DL aliases I believe were in the default arco Linux config and It's really nice because YouTube DL the commands are very lengthy because The name of the command is YouTube dash DL That's already a long word to have to type and then you usually have to add several flags to all the commands So if you use YouTube DL all the time it really makes sense just to alias all the commands You use on a regular basis then I had one more get alias and this is for my get bear repository for my dot files Repository I have alias config equals actually the get command dash dash get dash dear Equals the location to that bear repository for my dot files and the working tree is actually the home directory The next alias is TB and TB stands for term bin So it runs the command NC, which is the netcat command term bin dot com at port 9999 I did a video about term bin a while back and I just kept this alias I don't use term bin that often, but it is an interesting program and the last alias and what I want to discuss is RR RR runs this very lengthy command curl and then this URL It's going and getting this roll dot shill file From github and it's gonna run it inside my bash shill and I alias this to RR Because it stands for Rick roll. So if I run RR in the terminal You get some Rick Astley I don't have the music up because I don't want to get demonetized, but you guys know the song never gonna give you up Never gonna let you down Anyway, that was just some of my favorite bash aliases if you guys want to share your favorite bash aliases or any shill aliases I would love to hear about them because Everybody's gonna have different favorite aliases because again most people are gonna alias the programs They use on a regular basis and you guys are gonna use different stuff than me I just think it would be neat if we all shared a little bit share the software as RMS would say Now before I go I need to thank Michael Gabe Nate Corbinian Mitchell entropy UK John Devon Fran arch 55 30 Christian DJ Donnie Dylan George Lewis. I'm repoll Robert Sean Tobias and Willie these guys They are my highest tier patrons over on patreon without these guys This episode wouldn't have been possible the show is also brought to you by each and every one of these ladies and gentlemen These are all my supporters over on patreon because this channel is supported by you guys the community You'd like to support my work check out DT over on patreon. Peace