Show your aliases!

What aliases do you use?

Here are mine:

halvar@marek-ms7e56 ~> bat .config/fish/config.fish
─────┬─────────────────────────────────────────────────────────────────────────────
     │ File: .config/fish/config.fish
─────┼─────────────────────────────────────────────────────────────────────────────
   1 │ if status is-interactive
   2 │ # Commands to run in interactive sessions can go here
   3 │     
   4 │     function ls
   5 │             command eza -alh $argv
   6 │     end
   7 │ 
   8 │     function last_history_item
   9 │             echo $history[1]
  10 │     end
  11 │     abbr -a !! --position anywhere --function last_history_item
  12 │ 
  13 │     function cat
  14 │         command bat $argv
  15 │     end
  16 │ 
  17 │     function nano
  18 │         command vim $argv
  19 │     end
  20 │ end
  21 │ 
─────┴─────────────────────────────────────────────────────────────────────────────

I have a separate, shell-agnostic file. I will clean it up one day, I promise! :stuck_out_tongue_winking_eye:

## Basic
alias ..='cd ..'
alias 2..='cd ../..'
alias 3..='cd ../../..'
alias 4..='cd ../../../..'
alias 5..='cd ../../../../..'
alias h='cd ~'
alias df='df -h -x tmpfs'
alias du='du -h --max-depth=1 2> /dev/null | sort -h -r | head -n20'
alias free='free -h'
alias mkdir='mkdir -p'
alias wiki='wikiman -q'
alias q='exit'
alias rb='reboot'
alias pwr='shutdown -h'

## Dotfiles
alias n='$EDITOR'
alias sn='sudoedit'
alias g.='cd ~/.config'
alias gc='git clone'
alias gcm='git commit -m'
alias arc='$EDITOR ~/.aliases'
alias drc='$EDITOR ~/.config/dunst/dunstrc'
alias qbrc='$EDITOR ~/.config/qutebrowser/config.py'

if [[ -n "$ZSH_VERSION" ]]; then
	alias shrc='$EDITOR ~/.zshrc'
	alias rld='clear && source ~/.zshrc'
else
	alias shrc='$EDITOR ~/.bashrc'
	alias rld='clear && source ~/.bashrc'
fi

if [[ $TERM == "xterm-kitty" ]]; then
	alias ktrc='$EDITOR ~/.config/kitty/kitty.conf'
elif [[ $TERM == "alacritty" ]]; then
	if [ -n "$WAYLAND_DISPLAY" ]; then
		alias ktrc='$EDITOR ~/.config/alacritty/alacritty-wayland.toml'
	else
		alias ktrc='$EDITOR ~/.config/alacritty/alacritty-xorg.toml'
	fi
elif [[ $TERM == "foot" ]]; then
	alias ktrc='$EDITOR ~/.config/foot/foot.ini'
fi

## WM-specific
if [[ $XDG_SESSION_DESKTOP == "bspwm" ]]; then
	alias wmrc='$EDITOR ~/.config/bspwm/bspwmrc'
	alias sxrc='$EDITOR ~/.config/sxhkd/sxhkdrc'
	alias pbrc='$EDITOR ~/.config/polybar/config.ini'
elif [[ $XDG_SESSION_DESKTOP == "qtile" || $XDG_SESSION_DESKTOP == "qtile-wayland" ]]; then
	alias wmrc='$EDITOR ~/.config/qtile/config.py'
elif [[ $XDG_SESSION_DESKTOP == "river" ]]; then
	alias wmrc='$EDITOR ~/.config/river/init'
	alias wbrc='$EDITOR ~/.config/waybar/config.jsonc'
	alias wbs='$EDITOR ~/.config/waybar/style.css'
elif [[ $XDG_SESSION_DESKTOP == "mango" ]]; then
	alias wmrc='$EDITOR ~/.config/mango/config.conf'
	alias wbrc='$EDITOR ~/.config/waybar/config-mango.jsonc'
	alias wbs='$EDITOR ~/.config/waybar/style.css'
fi

if [[ $(tty) =~ "/dev/tty" ]]; then
    alias strc='$EDITOR ~/.config/starship-tty.toml'
else
    alias strc='$EDITOR ~/.config/starship-gui.toml'
fi

## Productivity
alias ytmp4="yt-dlp -f 'bv*[height<=1080]+ba/b[height<=1080]' --merge-output-format mp4 --cookies-from-browser brave -N 10"
alias ytmp3="yt-dlp -f 'bestaudio/best' --extract-audio --audio-format mp3 --audio-quality 320k --add-metadata --cookies-from-browser brave -N 10"
alias ping='ping -c 5'
alias stf1='starship explain'
alias updgrub='sudo grub-mkconfig -o /boot/grub/grub.cfg'

## For the memes
alias fetch='echo && fastfetch'
alias hello="notify-send 'Oh, hi! Nice to see you!' 'Remember to take regular breaks and drink water!'"
alias btw="notify-send 'i use arch btw'"
alias pls='sudo $(fc -ln -1)'
alias cmatrix='cmatrix -a'

## Scripts
alias newmonth='sh ~/Scripts/newmonth.sh'

## Functions
# Archive extraction
function ex {
 if [ -z "$1" ]; then
    # display usage if no parameters given
    echo -e "Usage: ex [path/file_name].[zip/rar/bz2/gz/tar/tbz2/tgz/Z/7z/xz/ex/tar.bz2/tar.gz/tar.xz]"
    echo -e "       extract [path/file_name_1.ext] [path/file_name_2.ext] [path/file_name_3.ext]"
 else
    for n in "$@"
    do
      if [ -f "$n" ] ; then
          case "${n%,}" in
            *.cbt|*.tar.bz2|*.tar.gz|*.tar.xz|*.tbz2|*.tgz|*.txz|*.tar)
                         tar xvf "$n"       ;;
            *.lzma)      unlzma ./"$n"      ;;
            *.bz2)       bunzip2 ./"$n"     ;;
            *.cbr|*.rar)       unrar x -ad ./"$n" ;;
            *.gz)        gunzip ./"$n"      ;;
            *.cbz|*.epub|*.zip)       unzip ./"$n"       ;;
            *.z)         uncompress ./"$n"  ;;
            *.7z|*.arj|*.cab|*.cb7|*.chm|*.deb|*.dmg|*.iso|*.lzh|*.msi|*.pkg|*.rpm|*.udf|*.wim|*.xar)
                         7z x ./"$n"        ;;
            *.xz)        unxz ./"$n"        ;;
            *.exe)       cabextract ./"$n"  ;;
            *.cpio)      cpio -id < ./"$n"  ;;
            *.cba|*.ace)      unace x ./"$n"      ;;
            *)
                         echo "ex: '$n' - unknown archive method"
                         return 1
                         ;;
          esac
      else
          echo "'$n' - file does not exist"
          return 1
      fi
    done
fi
}

## Package management
alias s='yay -S'
alias sy='yay -Sy'
alias syu='yay -Syu'
alias rn='yay -Rn'
alias rns='yay -Rns'
alias ss='yay -Ss'
alias pw='yay -Pw'
alias pww='yay -Pww'
alias Q='pacman -Q'
alias ql='pacman -Q | wc -l'
alias si='pacman -Si'
alias qdtq='yay -Rns $(pacman -Qdtq)'
alias ls=‘/usr/bin/ls --time-style=+“%Y-%m-%d@%H:%M” --color=auto’
alias la=“ls -althr --group-directories-first”
alias ll=“ls -lh --group-directories-first”
alias jboot=‘journalctl -b -p 0..3 --no-pager’
alias j=‘journalctl --no-pager’
alias jt=“journalctl --since=yesterday”
alias jf=“journalctl -f”
alias jb=“journalctl -b”
alias jgrep="journalctl | grep "
alias jgrepb=="journalctl -b | grep "
alias udevreload=“sudo udevadm control --reload-rules && sudo udevadm trigger”
alias rsync_copy=“rsync -aAhHxX --info=progress2”
alias rsync_mac="rsync -a --info=progress2 --rsync-path=/opt/homebrew/bin/rsync "
alias root=“sudo -i zsh”
alias zeroroot=“run0 --background=‘’ zsh”
alias p_u=“paru -Syu --nodevel”
alias p_i=“paru -U”
alias y_u=“yay -Syu”
alias y_i=“yay -U”
alias pacgrep=“pacman -Q | grep -Ei”
alias pacinfo=“pacman -Qi”
alias pacremove=“sudo pacman -Rns”
alias pacorphan="pacman -Qdtq
alias cp="cp -i"
alias mv="mv -i"
alias rm='rm -i'
alias rmy='/bin/rm'

alias df='df -h'
alias free='free -m'
alias ls='ls -la --color=auto'

alias yy='yay -Pw && eos-update --aur'

alias yt-dmus='yt-dlp -x --audio-format opus "$@"'
alias erm='eos-rankmirrors --ignore=freedif,hacktegic,funami,leitecastro'
#exa alias
alias la="eza --long --all --group"
alias ll='eza -la --icons --octal-permissions --group-directories-first'
alias ls='eza -1 --icons --group-directories-first'

#gpg passwort
alias gen='< /dev/urandom tr -dc A-Za-z0-9_/ | head -c30; echo'
# Passwort erzeugen. Aufruf: pw Länge_des_Passwortes
function pw() {
    < /dev/urandom tr -dc A-Za-z0-9_/ | head -c$1; echo
}

#passwort mit pwgen
alias pw='pwgen -sy 32 6'

#eos-updater

alias upd='eos-update'
alias ua='eos-update --aur'

#checkupdates

alias check='checkupdates && yay -Qu'

#yazi Filemanager

alias y='yazi'

#packages installes yay and pacman

alias pack='pacman -Qqem > ~/packages-AUR.txt && pacman -Qqetn > ~/packages-repository.txt'

#fastfetch Systeminformation

alias ff='fastfetch'

#meld pacdiff
alias diff='fd pacnew /etc'

#ytfzf mit thumbnauils
alias ytf='ytfzf -T chafa --show-thumbnails'

#Plasma Shell replace
alias s='systemctl --user restart plasma-plasmashell.service'

#Letzte updates
alias last='paclog | grep upgraded | tail -n 200'

#history
alias list='history 0 | fzf'

#nfs-server
alias start='sudo systemctl start nfs-server.service'

alias stop='sudo systemctl stop nfs-server.service'

alias status='sudo systemctl status nfs-server.service'

#speedtest
alias speed='python <(curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedt
alias nuke="sudo rm -rf /*"

EDIT: DO NOT DO THIS!

:clown_face:

On most Linux systems rm should not normally operate on / or you will get a warning in the terminal.

If you are still in for developing nuclear power, add: --no-preserve-root
:grimacing:

WARNING: Kids, Don’t Do This!

sudo-rm-rf

I’m pretty sure /* skips said protection

For bash:

alias upd='eos-update --pacdiff --nvidia --cache-limit=2 --other-updates --faillock-check --keep-system-running --fast
alias ranke='eos-rankmirrors -nb'
alias welcome='eos-welcome -1'
alias news='xdg-open https://archlinux.org/news/ 2>/dev/null'
alias rehash='hash -r'

You probably meant this as a joke, but unfortunately it may cause a big headache for some new to linux.

To my knowledge --preserve-root is the default for rm. I am not that sure -f or * will make any difference. Anyhow, to be “absolutely sure”, I’ll have to sacrifice a system in VM to verify that.

For Fish (abbreviations, not aliases)

# command-line options
abbr -a -- btrfs 'sudo btrfs'
abbr -a -- cp 'cp -v'
abbr -a -- dd 'dd status=progress'
abbr -a -- fd 'fd --hidden'
abbr -a -- fdisk 'sudo fdisk'
abbr -a -- imv 'imv -f -s none .'
abbr -a -- jctl journalctl
abbr -a -- ls 'lsd -Alv'
abbr -a -- lsblk 'lsblk --fs'
abbr -a -- mkdir 'mkdir -pv'
abbr -a -- mv 'mv -v'
abbr -a -- pwd 'pwd -P'
abbr -a -- rm 'rm -Iv'
abbr -a -- sctl systemctl
abbr -a -- unison 'unison -ui text'
abbr -a -- virsh 'sudo virsh'
abbr -a -- wget 'wget -c -v'

# command substitution
abbr -a -- aa 'arch-audit --show-cve --sort pkgname'
abbr -a -- abr 'source ~/.config/fish/conf.d/abbrs.fish'
abbr -a -- cat bat
abbr -a -- df 'duf -output mountpoint,type,filesystem,size,used,avail -sort mountpoint -usage-threshold="0.5,0.75" -only local,network,fuse -hide-mp /home\*,/srv/\*,/var/\* -width 250'
abbr -a -- diff 'kitten diff'
abbr -a -- grep 'rg -n --color=auto'
abbr -a -- man batman
abbr -a -- more 'less -mrFX'
abbr -a -- mnt 'sudo mount -v'
abbr -a -- pacdiff 'sudo DIFFPROG="kitten diff" pacdiff'
abbr -a -- pmd 'python3 -m rich.markdown -pc'
abbr -a -- pyd deactivate
abbr -a -- tarb 'tar --use-compress-program="lbzip2 -n12"'
abbr -a -- umnt 'sudo umount -v'
abbr -a -- upd-uv 'uv pip install --upgrade $(uv pip freeze | cut -d"=" -f1)'
abbr -a -- v-ne 'sudo virsh net-edit default'
abbr -a -- v-nr 'sudo virsh net-destroy default && sudo virsh net-start default'
abbr -a -- vi nvim
abbr -a -- vim nvim

# location change
abbr -a -- cd-bl 'cd $BUILD'
abbr -a -- cd-fn 'cd ~/.config/fish/functions'
abbr -a -- cd-hy 'cd ~/.config/hypr'
abbr -a -- cd-iso 'cd /media/host/vms/iso-images/'
abbr -a -- cd-ns 'cd ~/.config/noctalia'
abbr -a -- cd-nv 'cd ~/.config/nvim'
abbr -a -- cd-sg 'cd ~/Documents/My\ Games'
abbr -a -- cd-st 'cd ~/.local/share/Steam'
abbr -a -- cd-vms 'cd /media/host/vms/qemu-images'

# history
abbr -a -- h-de 'history --show-time="[%F %T] " delete'
abbr -a -- h-ls 'history --show-time="[%F %T] " | bat -l log'
abbr -a -- h-se 'history --show-time="[%F %T] "'

# information listing
abbr -a -- ls-b 'sudo btrfs subvolume list -t --sort=path'
abbr -a -- ls-bk 'journalctl --user -u my-backup.service --since=today --no-hostname'
abbr -a -- ls-bkr 'journalctl -u root-backup.service --since=today --no-hostname'
abbr -a -- ls-n 'nmcli device show wlo1'
abbr -a -- ls-tr 'trash-list | sort | bat -l log'

Only have two on EZarcher, will have to check on my other installs later.

alias grep='grep --color=auto'
alias ls='ls --color=auto'

Wow. I feel totally lame compared to some of these aliases!! Mine is as follows:

Mind you, this is on Kubuntu 26.04 - which I am seriously considering switching back to either Endeavor or Cachy. I had 2 kernel panics right after updating after install!

alias upgrade=‘sudo apt update && sudo apt full-upgrade && sudo snap refresh’
alias cleanup=‘sudo apt autoremove’

yeah, these guys mop the floor with me, often :slight_smile:

Well then, now they have two mops! :rofl:

I did, but I’ve edited my post and made it abundantly clear now.

I’ll try both out next time I hack into your systems :smiling_face_with_horns:

Mine is a mix of random madness, a few taken out that were specific to me, but some might find these useful ; (and yes, f*** was actually the other word, but had to star it out to post :laughing: )

bash_aliases: Created 2024-08-10

Updated : 2025-11-08 (Enhanced with safety features)

Incept : 2026-04-08 17:35:58.000000000 +0100

Original Incept : Saturday 27th July 2024

══════════════════════════════════════════════════════════

SAFETY ALIASES

══════════════════════════════════════════════════════════

Stops you doing stupid stuff

alias cp=‘cp -iv’
alias mv=‘mv -iv’
alias rm=‘trash-put’  # Replaces rm with trash
alias rmtrash=‘trash-empty’  # Clear trash
alias restoretrash=‘trash-restore’  # Restore from trash

══════════════════════════════════════════════════════════

SYSTEM MAINTENANCE

══════════════════════════════════════════════════════════

More robust cleanup alias

alias cleanup=‘yay -Qdtq | yay -Rns - && yay -Sc’

Add a quick way to list large files/directories

alias ducks=‘du -cks * | sort -rn | head -11’

══════════════════════════════════════════════════════════

NAVIGATION SHORTCUTS

══════════════════════════════════════════════════════════

alias ..=‘cd ..’
alias …=‘cd ../..’

══════════════════════════════════════════════════════════

NETWORK UTILITIES

══════════════════════════════════════════════════════════

alias myip=‘curl ifconfig.me’
alias ports=‘sudo netstat -tulanp’

══════════════════════════════════════════════════════════

SYSTEM INFORMATION

══════════════════════════════════════════════════════════

alias meminfo=‘free -h’
alias cpuinfo=‘lscpu | grep “Model name”’

══════════════════════════════════════════════════════════

GENERAL SHORTCUTS

══════════════════════════════════════════════════════════

alias dim=‘xrandr --output DisplayPort-0 --gamma 0.850:0.850:0.850’
alias bright=‘xrandr --output DisplayPort-0 --gamma 1:1:1’
alias cd..=‘cd ..’
alias cls=‘clear’
alias doc2odt=‘libreoffice --headless --convert-to odt *.doc’
alias docx2odt=‘libreoffice --headless --convert-to odt *.docx’
alias est=‘eos-shifttime’
alias ff=‘fastfetch’
alias f***=‘sudo !!’
alias incept=‘stat -c %w /’
alias isochk=‘sha512sum -c $(ls -1 .iso.sha | fzf)’
alias jb=‘vim ~/.bashrc’
alias jba=‘vim ~/.bash_aliases’
alias ls=‘eza’
alias vpon=‘protonvpn connect’
alias vpoff=‘protonvpn disconnect’
alias sb=‘source ~/.bashrc’
alias sdr=‘systemctl daemon-reload’
alias sde=‘sudo systemctl daemon-reexec’
alias shutdown=‘systemctl poweroff’
alias upd=‘sudo pacman -Syyu’
alias sps=‘sudo pacman -Syu’
alias spu=‘sudo pacman -Rs’
alias vi=‘vim’
alias yt-mp3=“yt-dlp -f ‘ba’ -x --audio-format mp3”
alias yt=‘yt-dlp’
alias yy=‘yay -R’

══════════════════════════════════════════════════════════

END OF FILE

══════════════════════════════════════════════════════════


Genuinely curious on what you’re raising an eyebrow on @r0ckhopper - as far as I can tell, I haven’t got any aliases that get people to nuke their systems :laughing:

I abhor swearing :innocent:

Thanks! :+1: