Skip to content

Linux alias Guide

Mattscreative edited this page Nov 20, 2025 · 2 revisions

🔖 Linux alias Guide

Complete beginner-friendly guide to alias on Linux, covering Arch Linux, CachyOS, and other distributions including creating aliases, command shortcuts, and shell customization.


📋 Table of Contents

  1. Understanding alias
  2. alias Basics
  3. Creating Aliases
  4. Persistent Aliases
  5. Troubleshooting

🎯 Understanding alias

What is alias?

alias creates command shortcuts.

Uses:

  • Shortcuts: Create command shortcuts
  • Customize commands: Modify command behavior
  • Save typing: Reduce typing
  • Shell customization: Customize shell

Why it matters:

  • Productivity: Save time typing
  • Customization: Personalize commands
  • Convenience: Make commands easier

🔖 alias Basics

Create Alias

Basic usage:

# Create alias
alias ll='ls -alF'

# Use alias
ll

List Aliases

Show aliases:

# List all aliases
alias

# Or specific
alias ll

✏️ Creating Aliases

Common Aliases

Useful aliases:

# Long listing
alias ll='ls -alF'

# Color output
alias ls='ls --color=auto'

# Safety
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

Complex Aliases

Advanced aliases:

# With arguments
alias grep='grep --color=auto'

# Multiple commands
alias update='sudo pacman -Syu'

💾 Persistent Aliases

Shell Configuration

Add to config:

# Edit shell config
vim ~/.bashrc

# Or
vim ~/.zshrc

Add Aliases

In config file:

# Add to ~/.bashrc
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

Reload Config

Apply changes:

# Reload config
source ~/.bashrc

# Or
. ~/.bashrc

🔧 Troubleshooting

Alias Not Working

Check config:

# Verify alias exists
alias ll

# Check if in config
grep alias ~/.bashrc

# Reload config
source ~/.bashrc

📝 Summary

This guide covered alias usage, command shortcuts, and shell customization for Arch Linux, CachyOS, and other distributions.


🔗 Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally