Share Your BASH Aliases

Status
Not open for further replies.

craigevil

Active Member
Credits
1,710
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:


f33dm3bits

Gold Member
Gold Supporter
Credits
25,340
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"
 

JasKinasis

Well-Known Member
Credits
7,670
I’ve posted a couple in this thread:
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Credits
18,240
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
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Credits
18,240
Status
Not open for further replies.
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top