Share Your BASH Aliases

Status
Not open for further replies.

craigevil

Well-Known Member
Joined
Feb 24, 2021
Messages
448
Reaction score
455
Credits
3,078
Found some really helpful ones, so I edited my bash_aliases and this post:
Code:
# Start gomuks Matrix Client
alias gomuks=/home/pi/Downloads/gomuks-linux-arm64

# Show open ports
alias ports='netstat -tulanp'

# Refresh .bashrc
alias bashrc="nano ~/.bashrc && source ~/.bashrc"

# if user is not root, pass all commands via sudo #
if [ $UID -ne 0 ]; then
    alias update='sudo apt update'
    alias upgrade='sudo apt upgrade'
    alias aremove='sudo apt autoremove'
    alias reboot='sudo reboot'
    alias shutdown="sudo shutdown -P now"
fi

# Create Python virtual environment
alias ve='python3 -m venv ./venv'
alias va='source ./venv/bin/activate'

# Ping Commands
alias ping='ping -c 5'
alias pg="ping google.com -c 5"

alias ls='ls --color=auto --human-readable -al' # colored and human readable sizes
alias cpy="xclip -selection clipboard"

# Calculator
alias bc="bc -l"

# Resume wget by default
alias wget="wget -c"

# Get top process eating cpu
alias pscpu="ps auxf | sort -nr -k 3"
alias pscpu10="ps auxf | sort -nr -k 3 | head -10"

# Get top process eating memory
alias psmem="ps auxf | sort -nr -k 4"
alias psmem10="ps auxf | sort -nr -k 4 | head -10"

# Free and Used Ram
alias meminfo="free -m -l -t"
 
Last edited:


I don't use bash so I don't have bash aliases but I do have zsh aliases :p
Code:
alias pmirrors="sudo reflector --country 'Country' --latest 25 --age 24 --sort rate --protocol https --save /etc/pacman.d/mirrorlist"
alias porphans="pacman -Qtdq | sudo pacman -Rns -"
alias pupdate="sudo pacman -Syu && aur sync -c -u"
alias rmaur="$HOME/bin/rmaur"
alias pacnew="sudo updatedb && locate *.pacnew"
alias jerrors="journalctl -p 3 -xb"
alias sdfailed=" systemctl --failed"
alias reboot="sudo shutdown -r now"
alias shutdown="sudo shutdown -P now"
 
I’ve posted a couple in this thread:
 
Actually @craigevil , I am inclined to close this Thread and port the Posts of yourself and @f33dm3bits to Jas's Thread, since it already exists.

Don't get me wrong for a minute, we welcome the input of Tips-style Threads from Members, but duplication is unnecessary and can be confusing.

Feel free to converse with me if you have a problem with this.

Cheers

Chris Turner
wizardfromoz
 
Status
Not open for further replies.

Members online


Top