Debian Linux, FOSS, Firefox, Raspberry PI. Universal Life Church Minister. Student of ACIM since 1993, student of Urantia since 2013.

  • 0 Posts
  • 10 Comments
Joined 4 years ago
cake
Cake day: January 12th, 2021

help-circle



  • A bit long, but here goes:

    Start gomuks Matrix Client

    alias gomuks=/home/craig/.local/bin/gomuks-linux-arm64

    walk: Terminal File Manager

    https://github.com/antonmedv/walk

    alias walk=“walk --icons”

    Weather:https://github.com/chubin/wttr.in

    alias weather=“/home/craig/.local/bin/weather.sh”

    Onelinershell https://github.com/Onelinerhub/shellhub

    alias oh=“/home/craig/.local/bin/oh.sh”

    Show open ports

    alias ports=‘sudo netstat -tulanp’

    Refresh .bashrc

    alias bashrc=“source ~/.bashrc”

    become root

    alias root=‘sudo -i’ alias su=‘sudo su’

    Fix which

    alias which=‘command -v’

    APT User Commands

    alias search=‘apt search’ alias file=‘apt-file search’ alias policy=‘apt policy’ alias show=“nala show”

    if user is not root, pass all commands via sudo

    if [ $UID -ne 0 ]; then alias update=‘sudo apt update’ alias ainstall=‘sudo apt install’ alias apurge=‘sudo apt purge -y --autoremove’ alias upgrade=‘sudo nala upgrade’ alias aremove=‘sudo apt autoremove -y’ alias clean=‘sudo nala clean’ alias reboot=‘sudo reboot’ alias shutdown=“sudo shutdown -P now” fi

    Handy-dandy aliases for journalctl and systemctl

    alias jc=‘sudo journalctl -b’ alias jca=‘sudo journalctl’ alias jcf=‘sudo journalctl -f’ alias jcr=‘sudo journalctl --list-boots’ alias sc=‘sudo systemctl’

    Making files immortal & executable

    alias im+=“sudo chattr +i” alias im-=“sudo chattr -i” alias exe=“sudo chmod +x”

    #Add safety nets

    do not delete / or prompt if deleting more than 3 files at a time

    alias rm=‘rm -I --preserve-root’

    confirmation

    alias mv=‘mv -i’ alias cp=‘cp -i’ alias ln=‘ln -i’

    Parenting changing perms on /

    alias chown=‘chown --preserve-root’ alias chmod=‘chmod --preserve-root’ alias chgrp=‘chgrp --preserve-root’

    copy the current working directory to the clipboard

    alias cpwd=‘pwd | xclip -selection clipboard’

    Clipboard

    alias cpy=“xclip -selection clipboard”

    quick directory movement

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

    go to the last directory you were in

    alias back=‘cd $OLDPWD’

    quickly find files and directory

    alias ff=‘find . -type f -name’ alias fd=‘find . -type d -name’

    Create Python virtual environment

    alias ve=‘python3 -m venv ./venv’ alias va=‘source ./venv/bin/activate’

    Ping Commands

    Stop after sending count ECHO_REQUEST packets

    alias ping=‘ping -c 5’ alias pg=“ping google.com -c 5”

    alias shortcuts

    alias rpi=“sudo rpi-update” alias rpi-next=“sudo BRANCH=next rpi-update” alias raspi=“sudo raspi-config” alias clr=“clear” alias clrh=“history -c -w ~/.bash_history” alias df=‘df -H’ alias du=‘du -ch’ alias mk=“mkdir -p” alias loading=“sudo dmesg > ~/dmesg.txt”

    ls Commands

    Colorize the ls output and human readable sizes

    alias ls=‘ls --color=auto --human-readable -al’

    Use a long listing format

    alias ll=‘ls -la’

    Show hidden files

    alias l.=‘ls -d .* --color=auto’

    Listing files in folder

    alias listkb=“ls -l --block-size=K” alias listmb=“ls -l --block-size=M”

    Colorize the grep command output for ease of use (good for log files)##

    alias grep=‘grep --color=auto’ alias egrep=‘egrep --color=auto’ alias fgrep=‘fgrep --color=auto’

    Colorize diff output

    alias diff=‘colordiff’

    Start calculator with math support

    alias bc=“bc -l”

    Resume wget by default

    alias wget=“wget -c”

    ps Commands

    alias ps=“ps auxf”

    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 -l’ alias free=‘free -mt’

    Run top in alternate screen

    alias top=‘tput smcup; top; tput rmcup’