### **Creating a Permanent Alias in Linux (Ubuntu)**
In Linux, you can create **permanent aliases** by adding them to your shell configuration file. For **Bash**, this is typically `~/.bashrc` or `~/.bash_aliases`.
Here’s how to set it up:
---
### **1. Open Your Terminal**
Start by launching a **terminal** (Ctrl + Alt + T).
---
### **2. Edit Your Shell Configuration File**
You can add the alias to **`~/.bashrc`** or **`~/.bash_aliases`**.
#### **Option 1: Add Alias to `.bashrc`**
`nano ~/.bashrc`
Scroll to the bottom and add:
`alias ctt='curl -fsSL https://github.com/ChrisTitusTech/linutil/releases/download/v0.1/start.sh | sh'`
Save and exit:
- **Press** `CTRL + O` (**Enter** to confirm)
- **Press** `CTRL + X` (**Exit** nano)
#### **Option 2: Use `.bash_aliases` (Recommended)**
If you want to keep aliases separate, use **`~/.bash_aliases`**.
Check if `~/.bash_aliases` exists:
`ls -la ~/.bash_aliases`
- If it **does not exist**, create it:
`touch ~/.bash_aliases`
Edit the file:
`nano ~/.bash_aliases`
Add:
`alias ctt='curl -fsSL https://github.com/ChrisTitusTech/linutil/releases/download/v0.1/start.sh | sh'`
Save and exit (`CTRL + O`, `Enter`, `CTRL + X`).
---
### **3. Ensure `.bash_aliases` is Loaded**
Check if `.bashrc` loads `.bash_aliases`. Open `~/.bashrc`:
`nano ~/.bashrc`
Ensure this block is present:
`if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi`
If not, add it at the end.
---
### **4. Apply Changes Immediately**
Run:
`source ~/.bashrc`
or (if using `.bash_aliases`):
`source ~/.bash_aliases`
Now, you can use:
`ctt`
to execute the Chris Titus Linux utility. [[Chris Titus' LinUtil and the nice bash prompt]]
---
### **📌 Notes**
- These aliases are **user-specific** (only for the current user).
- To make aliases **system-wide**, add them to `/etc/bash.bashrc`.
- If using **Zsh**, add aliases to `~/.zshrc` instead.
🚀 **Now your alias is permanently available in every new terminal session!** ✅
[[Creating a Permanent Alias in Linux Ubuntu]]