mirror of
https://github.com/edu4rdshl/linuxscripts.git
synced 2026-07-18 07:34:45 +00:00
133 lines
3.7 KiB
Bash
133 lines
3.7 KiB
Bash
### OWN ALIAS ###
|
|
|
|
# Alias for sudo
|
|
alias sudo='sudo --preserve-env '
|
|
|
|
#Pastes
|
|
# alias rs="curl --data-binary @- https://paste.rs" # Replaced by rs() function in .bash_aliases
|
|
|
|
#Temperature
|
|
alias clima='curl wttr.in/bogota?lang=es'
|
|
|
|
# Youtube to MP3 and webistes videos to MP4
|
|
alias ytmp3="youtube-dl --output '~/Music/Downloaded/%(title)s.%(ext)s' --extract-audio --audio-format mp3"
|
|
alias vidtomp4="youtube-dl --output '~/Videos/Downloaded/%(title)s.%(ext)s' -f 'mp4'"
|
|
|
|
# Check permisions
|
|
alias pcheck='stat -c "%A %a %n"'
|
|
|
|
#Journalctl logs
|
|
alias jlogs='journalctl -b -p 4..1'
|
|
|
|
# Version for Git packages
|
|
alias gitver='echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)'
|
|
|
|
# Version for Git packages with tags
|
|
alias gitag="git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'"
|
|
|
|
# Add package to lists/to-release in BA development
|
|
alias grelease="git commit -m 'to-release: add packages.'"
|
|
|
|
# Alias to get sha512sums
|
|
alias ssums='sha512sum'
|
|
|
|
# Print SRCINFO in AUR packages
|
|
alias srcinfo='makepkg --printsrcinfo > .SRCINFO'
|
|
|
|
# See the amount of memory and CPU used by applications
|
|
alias cmcheck='ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem|head'
|
|
|
|
# Alias for git pull --rebase to prevent merging branchs
|
|
alias gpr='git pull --rebase'
|
|
|
|
# Alias for git clone
|
|
alias gclone='git clone'
|
|
|
|
# Alias for git push
|
|
alias gpush='git push'
|
|
|
|
# Alias for git pull
|
|
alias gpull='git pull'
|
|
|
|
# Alias for git commit -m
|
|
alias gcommit='git commit -S -m'
|
|
|
|
# Alias to kill Signal Private Messenger when crashed
|
|
alias ksignal='killall -9 signal-desktop'
|
|
|
|
# Alias to get information about CPU - please use i7z
|
|
alias cpufreq='watch -n 0.01 grep \"cpu MHz\" /proc/cpuinfo'
|
|
alias cputemp='watch -n 0.01 sensors'
|
|
|
|
# Alias to check what is my actual system IP using curl
|
|
alias wtfip='dig +short myip.opendns.com @resolver1.opendns.com'
|
|
|
|
# systemd-nspawn containers
|
|
nspawn_root_dir="/var/lib/machines"
|
|
|
|
# ArchLinux
|
|
alias alct="sudo systemd-nspawn -D $nspawn_root_dir/ArchLinux"
|
|
alias alshell='machinectl shell edu4rdshl@ArchLinux'
|
|
|
|
# ArchLinux ARM
|
|
alias arct="sudo systemd-nspawn -D $nspawn_root_dir/ArchARM"
|
|
alias arshell='machinectl shell edu4rdshl@ArchARM'
|
|
|
|
# BlackArch
|
|
alias bact="sudo systemd-nspawn -D $nspawn_root_dir/BlackArch"
|
|
alias bashell='machinectl shell BlackArch'
|
|
|
|
# Debian
|
|
alias debct="sudo systemd-nspawn -D $nspawn_root_dir/Debian"
|
|
alias debshell='machinectl shell Debian'
|
|
|
|
# Kali
|
|
alias kact="sudo systemd-nspawn -D $nspawn_root_dir/KaliLinux"
|
|
alias kashell='machinectl shell KaliLinux'
|
|
|
|
# ParrotSec
|
|
alias pact="sudo systemd-nspawn -D $nspawn_root_dir/ParrotSec"
|
|
alias pashell='machinectl shell ParrotSec'
|
|
|
|
# Alias to start VirtualBox Machines in Headless mode
|
|
# alias vbstart='VBoxHeadless -s'
|
|
|
|
# Alias for ip
|
|
alias ip='ip --color'
|
|
|
|
# Find the largest top 20 files and dirs in actual linux dir
|
|
alias longdirs='du -hca ./ | sort -n -r | head -n 20'
|
|
alias longfiles="find ./ -printf '%s %p\n'| sort -nr | head -20"
|
|
|
|
# Alias for pacman
|
|
alias u='paru -Syu --noconfirm'
|
|
alias cu='checkupdates'
|
|
alias pss='pacman -Ss'
|
|
alias sa='paru -Ss'
|
|
|
|
# Alias for paru
|
|
alias yay='paru --removemake'
|
|
alias paru='paru --removemake'
|
|
|
|
# Alias for pkgfile
|
|
alias pkgfile='pkgfile -v'
|
|
|
|
# Alias for power management
|
|
alias hibernate='systemctl hibernate'
|
|
alias shutdown='systemctl poweroff'
|
|
alias reboot='systemctl reboot'
|
|
|
|
# Alias to show ip addresses in short and color
|
|
alias ipa='ip -c -br a'
|
|
|
|
# Avoid pip installing packages as root/sudo, execute the following line in your terminal or just delete the # at the begin
|
|
#install -Dm644 /dev/stdin ~/.config/pip/pip.conf <<< $'[install]\nuser = yes\n'
|
|
|
|
# Alias for temporal dir/files
|
|
alias dtemp='cd $(mktemp -d)'
|
|
alias ftemp='$EDITOR $(mktemp).txt'
|
|
|
|
# Alias for wget in favor of curl
|
|
alias wget='curl -L -O'
|
|
|
|
### END OWN ALIAS ###
|