Garuda Fish CheatSheet
Garuda Fish Aliases
Section titled “Garuda Fish Aliases”Here are some common Garuda aliases that will make your fish shell experience a little smoother. The defaults live in /usr/share/garuda/garuda-fish-config/config.fish. Your own ~/.config/fish/config.fish sources them, so add your changes there.
Listing files
Section titled “Listing files”These replace ls with eza and cat with bat.
| Command | Alias/Shortcut | Purpose |
|---|---|---|
eza -al --group-directories-first | ls | Long listing with hidden files, folders first |
eza -al --total-size --group-directories-first | lsz | Same as ls, with folder sizes |
eza -a --group-directories-first | la | All files and directories |
eza -l --group-directories-first | ll | Long format |
eza -aT --group-directories-first | lt | Tree listing |
eza -ald --group-directories-first .* | l. | Show only dotfiles |
bat --style header,snip,changes | cat | Show files with syntax highlighting and git change markers |
paru | yay | Only set when yay is missing and paru is installed |
New to Arch From Debian
Section titled “New to Arch From Debian”| Command | Alias/Shortcut | Purpose |
|---|---|---|
man pacman | apt | Now you can learn about pacman |
man pacman | apt-get | Now you can learn about pacman |
sudo | please | Please give me root |
nc termbin.com 9999 | tb | A command line pastebin for you |
echo "To print basic information about a command use tldr <command>" | helpme | Tldr will teach you to use a command |
sudo -H DIFFPROG=meld pacdiff | pacdiff | compare .pacnew and .pacsave files with the installed config files (pacman-contrib) |
journalctl -p 3 -xb | jctl | View logs of the current boot, priority error and above |
expac --timefmt="%Y-%m-%d %T" "%l\t%n %v" | sort | tail -200 | nl | rip | Show the 200 most recently installed packages |
Navigation
Section titled “Navigation”Instead of typing the whole cd /path command to move back a directory, you can just substitute with . the number of times you would love to go back.
| Command | Alias/Shortcut |
|---|---|
cd .. | .. |
cd ../.. | ... |
cd ../../.. | .... |
cd ../../../.. | ..... |
cd ../../../../.. | ...... |
Helpful Commands
Section titled “Helpful Commands”This includes system commands, or common commands but modified in a way to make life much easier for a garuda user.
| Command | Alias/Shortcut | Purpose |
|---|---|---|
expac -H M "%m\t%n" | sort -h | nl | big | Sort installed packages according to size |
sudo rm /var/lib/pacman/db.lck | fixpacman | Remove lock from database to enable install |
dir --color=auto | dir | List directories in color |
pacman -Q | grep -i "\-git" | wc -l | gitpkg | Count the installed -git packages |
ugrep --color=auto | grep | Appealing visuals of grep |
ugrep -E --color=auto | egrep | Appealing visuals of egrep |
ugrep -F --color=auto | fgrep | Appealing visuals of ugrep |
sudo update-grub | grubup | Regenerate the GRUB config |
hwinfo --short | hw | Show hardware info |
ip -color | ip | Show your ip but in color |
ps auxf | sort -nr -k 4 | psmem | Show processes sorted by memory usage |
ps auxf | sort -nr -k 4 | head -10 | psmem10 | Top 10 processes by memory usage |
sudo pacman -Rdd | rmpkg | Remove a package without checking dependencies |
tar -acf | tarnow | Create compressed archive file |
tar -zxvf | untar | Unzip tar archive |
garuda-update | upd | Update garuda linux |
vdir --color=auto | vdir | List directories in color, long format |
wget -c | wget | Continue downloading even when forgetting -c |
Easiest Way to Deal with mirrors
Section titled “Easiest Way to Deal with mirrors”| Command | Alias/Shortcut | Purpose |
|---|---|---|
sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist | mirror | Update your mirror list by choosing fastest recent mirror |
sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist | mirrora | Update by selecting 20 most recent mirrors |
sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist | mirrord | Update your mirror based on delay |
sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist | mirrors | 20 best mirrors based on their score |
Functions
Section titled “Functions”| Command | Purpose |
|---|---|
history | Show the fish history with date and time |
backup FILE | Copy FILE to FILE.bak |
copy SRC DEST | Copy a folder recursively when SRC is a folder, otherwise a normal cp |
cleanup | Remove orphaned packages with sudo pacman -R until none are left |
gitg | Typo fix, runs git gui |
Shortcuts
Section titled “Shortcuts”| Keys | Purpose |
|---|---|
!! | Replace it with the previous command |
! then $ | Recall the last argument of an earlier command (from the bang-bang plugin) |
Shell behavior
Section titled “Shell behavior”- fastfetch on every new terminal: the
config.fishin your home folder calls__garuda_fastfetch. It runsmokka.jsonc, thendr460nized.jsonc, thenneofetch.jsonc, depending on what is installed. Comment out that last line to turn it off. - done: the upstream done plugin is shipped. It sends a notification when a long command finishes.
- garuda-update hook: typing
sudo pacman -Syuasks if you wantgaruda-updateinstead.yruns it,Ncontinues with pacman, andistops the question for good.
Orphan packages
Section titled “Orphan packages”cleanup removes orphans in a loop until none are left, so it already handles orphans that only appear after the first removal. Before you run it, check what still refers to each orphan. The functions below read the pacman -Qi fields for every orphan from pacman -Qdtq.
function __orphan_field --argument orphan field pacman -Qi $orphan | awk -v f="$field" ' $0 ~ "^" f " *:" { on = 1; sub(/^[^:]*: */, "") } /^[A-Za-z][A-Za-z ]* *:/ && $0 !~ "^" f " *:" { on = 0 } on { gsub(/^ +/, ""); printf "%s ", $0 }'end
function check-orphan-dependents --description 'Show what requires or optionally uses each orphan' set -l orphans (pacman -Qdtq)
if test -z "$orphans" echo "No orphan packages found." return end
for orphan in $orphans echo "$orphan" echo " Required by: "(__orphan_field $orphan 'Required By') echo " Optional for: "(__orphan_field $orphan 'Optional For') endendSave both in ~/.config/fish/functions/ or paste them into the shell to test them. Run it with:
check-orphan-dependentsSource: Fish function to list all orphans and which installed packages list them as dependencies.