Aliases for your terminal


You guys use aliases in your terminal? Share them with us.




alias pacman="pacman --color auto"
alias ls="ls --color"
alias weather="curl"
alias clock="tty-clock -c"
alias matrix="cmatrix"
alias starwars="telnet"
alias pipes="pipes"
alias mpdn=“ncmpcpp -S visualizer”
#alias syua=“pacaur -Syu”
#alias syu="sudo pacman -Syu"
alias merge="xrdb -merge ~/.Xresources"
alias neo="neofetch"
alias lol= "screenfetch | lolcat -F 0.2 -a -s 10"0
alias neoa="neofetch --ascii"
alias neob="neofetch --backend off"
alias play="ncmpcpp -S visualizer"
alias font="sudo fc-cache -f -v"
alias tui="s-tui"
alias upmirrors="sudo reflector --score 100 --fastest 25 --sort rate --save /etc/pacman.d/mirrorlist --verbose"
alias backup=“sh ~/Documents/dotii"
alias scr=”./.scr"
alias res="openbox --restart"
alias rec=“openbox --reconfigure”
#alias orp="sudo pacman -Rns $(pacman -Qtdq)"
alias tutor=“vimtutor”


alias update='sudo pacman -Syyu’
alias install='sudo pacman -S’
alias search='pacman -Ss’
alias remove='sudo pacman -Rns’
alias clean='sudo pacman -Scc’
alias orphan='sudo pacman -Rs $(pacman -Qtdq)'
alias stayonmypc='sudo pacman -D --asexp’
alias fuckoff='sudo pacman -D --asdep’
alias pacinf='pacman -Si’
alias searchlocal='pacman -Qs’
alias listfiles='pacman -Ql’
alias whoisorphan='pacman -Qdt’
alias upmirrors='sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup; sudo reflector -l 5 --sort rate --save /etc/pacman.d/mirrorlist’
alias paclog='tail -f /var/log/pacman.log’
alias pacul=‘sudo rm /var/lib/pacman/db.lck’


alias yorphan='yaourt -Qtd’
alias aurin='yaourt -S’
alias aurse='yaourt -Ss’
alias aurup='yaourt -Syua’
alias aurinen='LC_ALL=C yaourt -S’
alias Y='yaourt --noconfirm’
alias aurinf=‘yaourt -Si’


download mp3 from youtube, use title as metadata, then embed the thumbnail as albumart

alias ytmp3=‘youtube-dl --add-metadata --metadata-from-title “%(artist)s - %(title)s” --extract-audio --audio-format mp3 --audio-quality 0 --embed-thumbnail --prefer-ffmpeg --youtube-skip-dash-manifest --ignore-errors --restrict-filenames --verbose $f’


ayy lmao

alias porn=‘mpv “”’


alias hotspot=“sudo create_ap wlo1 eno1 <ssid> <passwd>”

I use fish shell so I use functions:

function clean -d "clear old cache and remove orphans"
paccache -rvk2
pacman -Rsn (pacman -Qdtq)

function ccat -d "syntax highlighting with cat"
pygmentize -O style=paraiso-dark -f console256 -g $argv | cat -n


alias v='vim’
alias sv=‘sudo vim’


i’m using this (zsh):
vi() { for i in $@; do [ -f "$i" ] && [ ! -w "$i" ] && sudo vim $@ && return; done; vim $@ }

don’t recall where I got it from, but it’s hella useful :slight_smile:

some more:

alias fuckin='sudo'
alias zshconfig="vi ~/.zshrc"
alias reloadzsh="source ~/.zshrc"

alias mv='mv -v'
alias cclear='clear && cd'
alias cdc='clear && cd'
alias clearl='clear && l'
# some ls options, with directories first
alias ls="ls -F --color --group-directories-first"
alias ll="ls -AlhF --group-directories-first"
alias la="ls -A --group-directories-first"
alias l="ls -CF --group-directories-first"

alias mnt='mount | column -t'

alias themes='l ~/.oh-my-zsh/themes/'
alias ctheme='grep THEME ~/.zshrc'
theme() { sed -i '/^ZSH_THEME/s/\".*\"/\"'$1'\"/' ~/.zshrc && reloadzsh; }


Here are a few I have in my.zshrc if you’re interested I don’t know who made these but I do find them usefull.

  # pacman or pm
alias pmsyu="sudo pacman -Syu --color=auto"
alias pacman='sudo pacman --color auto'
alias update='sudo pacman -Syu'

# pacaur or pc
alias pcsyu="pacaur -Syu"

alias ps="ps auxf"
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"

# yaourt keeps tmp folder cleaner than packer
alias pks="yaourt -S --noconfirm "
alias pksyu="yaourt -Syu --noconfirm"
alias pksyua="yaourt -Syu  --aur --noconfirm"

#grub update
alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg"

#improve png
alias fixpng="find . -type f -name "*.png" -exec convert {} -strip {} \;"

#add new fonts
alias fc='sudo fc-cache -fv'

#get fastest mirrors in your neighborhood 
alias mirror="sudo reflector --protocol https --latest 50 --number 20 --sort rate --save /etc/pacman.d/mirrorlist"
alias mirrors=mirror

alias reload='clear && source ~/.zshrc'
alias ls='ls -la --color=auto'
alias merge='xrdb -merge ~/.Xresources'
alias pmsyu='sudo pacman -Syu --color=auto'
alias mirrors='sudo reflector --score 100 --fastest 10 --sort rate --save /etc/pacman.d/mirrorlist --verbose'
alias up='sudo pacman -Syu'
alias clone='git clone'
alias getkey='gpg --recv-keys'
alias cls="clear"
alias ..="cd .."
alias cd..="cd .."
alias df="df -ahiT --total"
alias mkdir="mkdir -pv"
alias userlist="cut -d: -f1 /etc/passwd"
alias fhere="find . -name "
alias free="free -mt"
alias du="du -ach | sort -h"
alias ps="ps auxf"
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
alias wget="wget -c"
alias histg="history | grep"
alias myip="curl; echo"
alias logs="sudo find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f"
alias folders='find . -maxdepth


Here are a few of the ones I use of my doing that I use alot:

    alias sg='sudo gedit'
    alias ge='gedit'

    #file manager
    alias sth='sudo thunar'
    alias th='thunar'


Here is one of my aliases.

alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep --color=never -E "state|to\ full|percentage"'

It will also run after neofetch


for systemd

alias senabled=‘systemctl list-unit-files | grep enabled’

I usually end up making several alaises for systemd commands.


Handy, thanks for sharing this one.


I use to have these two:

alias statoff='sudo service --status-all | grep -w -'
alias staton=‘sudo service --status-all | grep +’

but the service command is apparently deprecated; I don’t know what to substitute for those aliases - they were handy to see what was running.


I just made these because I seem to do alot of script installs.

#script install
alias con='sudo ./configure’
alias mk='sudo make’
alias mki=‘sudo make install’


Very helpful. I must add these.


Hey Dobbie03 I just corrected an error from my quote. There was a space missing. That’s why you’ll see the edit symbol is hilghlighted. Later dude.


Cool, haven’t added them as yet.


I actually got AL out of the box. I was able to install on my second hdd with a second efi partition. So far it’s stable, but I have not allowed widows to see AL and vice versa. I’m transferring all of my important settings and files over. So I am going to be pretty busy setting things up and tweaking things.

Sevenday4 has AL installed at last!

My current aliases:

alias su='/bin/su'
alias sudo='/usr/bin/sudo'
alias passwd='/usr/bin/passwd'
alias ls='ls --color'
alias grep='grep --color'
alias cls='clear'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'

That’s from Alpine Linux (hence the paths), the first three are to prevent a rogue binary placed earlier in $PATH, the last ones are because I don’t know how to use pushd & popd :smiley:

Are we doing functions as well?

I use this as a poor person’s arch-chroot:

function mnt {
	for i in proc sys dev dev/pts; do sudo mount --bind /$i "$1"/$i; done &
	sudo chroot "$1" /bin/bash
	sudo umount -R "$1"/{proc,sys,dev}

So if the target filesystem tree is mounted under /mnt (for example) then this will chroot into it with the API filesystems bind mounted so that upgrades and stuff work (and clean up afterwards):

mnt /mnt

I’m using the KornShell function foo syntax rather than bash’s foo() version 'cos it’s better (local variables, traps, recursion support, etc).


No need for grep with that one any more:

systemctl list-unit-files --state=enabled

For running units try:

systemctl list-unit-files --state=active

I can’t check though 'cos I’m booted with OpenRC :slight_smile: