-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9e8999
commit 3987b90
Showing
77 changed files
with
2,033 additions
and
2,726 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: "Linux Aliases" | ||
date: 2024-08-27 | ||
draft: false | ||
description: "How To Create Your Own Terminal Aliases" | ||
tags: ["Terminal", "Alias", "Linux"] | ||
--- | ||
### Intro | ||
|
||
Are you sick and tired of having to type the lengthy update commands in terminal like I am ? Don't you wish there were shorter and easier ones ? Well, you are in luck. This post will cover how you can create your own easy to remember *Aliases*. | ||
|
||
### What are aliases? | ||
|
||
Basically, they are custom user created commands, by you, that execute various actions. However, I would highly recommend you check if you have any tools installed that have similar ones, and avoid replicating or replacing them. | ||
|
||
### How to create Aliases | ||
|
||
First, before you start, you will have to know what shell you are using, as different ones use different config files. In case of **Bash** you will have to edit the `.bashrc` file found in your home directory's root. And in the case of **ZSH**, it will be the `.zshrc` file found at that same location and so on. | ||
|
||
With that out of the way, the method is the same for both. Just open relevant file in your IDE of choice and let's begin. | ||
|
||
![Terminal](https://i.imgur.com/Ks6e0Mn.png) | ||
|
||
Here's how aliases are structured : | ||
|
||
```Bash | ||
alias shortcmd="actualcmd" | ||
``` | ||
|
||
Update Example (Arch) : | ||
|
||
```Bash | ||
alias update="sudo pacman -Syu" | ||
``` | ||
|
||
Update Example (Debian) : | ||
|
||
```Bash | ||
alias update="sudo apt update && sudo apt upgrade" | ||
``` | ||
|
||
Now save your file, restart your terminal and test them out. The sky's the limit as how many you can create. I use a ton of them in **XeroLinux**. To check them out visit this link >> [**XeroLinux Aliases**](https://github.com/xerolinux/xero-fixes/blob/main/conf/.bashrc). | ||
|
||
### Wrapping up | ||
|
||
Using aliases makes one's Linux journey a much more pleasant one. So do not hesitate to use them. I, like everyone else get frustrated with having to memorize the ones provided by the distro am using. Especially why I test so many. That's the first thing I do when installing a distro. Never again will I go through this ordeal. Anyway I hope this post has proven useful. | ||
|
||
That’s it folks .. | ||
|
||
Cheers ! |
Oops, something went wrong.