shell-base/load/alias/00-basic

79 lines
2.0 KiB
Plaintext
Raw Normal View History

# 00 will get loaded first
# does root login with calls profile and loads all the shells
# alias sudo='sudo -i'
alias flist="function_list"
alias flistg="function_list | grep"
alias fprint="declare -f"
alias aliasg="alias | grep "
alias envg="env | grep "
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# brings user path to sudo
alias reboot="sudo systemctl reboot"
alias poweroff="sudo systemctl poweroff"
# search for a running process
alias psl='ps -ef | grep'
# kill any process containing given name
alias ska='sudo killall'
alias ka='killall'
# kill processes greped
alias skg='sudo pkill -f'
alias kg='pkill -f'
alias skg='sudo pkill -f'
alias df='df -h -x supermount'
alias du='du -h'
alias egrep='egrep --color'
alias fgrep='fgrep --color'
alias grep='grep --color'
# Directory/File
alias ls='ls -F --color=auto'
alias l='ls'
alias la='ls -a'
alias lag='ls -a | grep'
alias ll='ls -l'
alias lla='ls -l -a'
alias llag='ls -l -a | grep'
alias lsd='ls -d */'
alias md='mkdir'
alias mv='mv -i'
alias p='cd -'
alias rd='rmdir'
alias rm='rm -i'
alias cd..='cd ..'
alias cp='cp -i'
alias mpath="echo $PATH" # machine path per /etc/environment
alias path='echo $PATH'
alias pathg='echo $PATH | grep'
alias sysinfo='sudo inxi -Fzxd'
alias efstab="cp /etc/fstab ~/fstab.bak && gedit admin:/etc/fstab"
alias ebrc='editor ~/.bashrc'
# follows a link to list the source path
alias follow="readlink -f"
# use this when there are transport errors after unmounting or killing a mount
alias umountf="sudo umount -l"
alias loginust="loginctl show-user $USER"
# alias to add for live user
if [ -v PS1 ]; then
alias dfind="_find -t d -d 0 -n "
alias sdfind="_find -s -t d -d 0 -n "
fi
alias portl="ss -tunl | grep"
2024-04-29 13:03:08 -07:00
alias ipg="ip addr show | grep -A1 "
2024-05-25 13:38:46 -07:00
alias ips="ip addr show"
2024-04-29 13:03:08 -07:00
alias pubip="curl https://ipv4.nsupdate.info/myip; echo"