This commit is contained in:
2024-08-06 20:38:43 +08:00
commit a1c9d4d870
18 changed files with 387 additions and 0 deletions

37
shell/aliases Normal file
View File

@@ -0,0 +1,37 @@
# colorful for bash
alias ls="ls -F --color=auto"
alias grep="grep --color=auto"
# list file
alias la="ls -a"
alias ll="ls -lh"
alias lla="ls -alh"
# Directory and File
alias mkdir="mkdir -pv"
alias rm="rm -rv"
alias mv="mv -v"
alias cp="cp -rv"
# Human Readable
alias free="free -h"
alias df="df -h"
alias du="du -h"
# Systemctl
alias sctl="systemctl"
alias ssctl="sudo systemctl"
# Containers
#alias docker=podman
#alias nginx="docker exec nginx nginx"
alias debian="docker exec -it debian bash"
alias archlinux="docker exec -it arch bash"
# Package Manager
## Change the package manager to your own, like apt/dnf/pacman, etc.
## If you not a root user, please use "sudo xxx".
export pkg="yay"
#. $Profile_PATH/shell/pkg
. $Profile_PATH/shell/pacman

10
shell/pacman Normal file
View File

@@ -0,0 +1,10 @@
# Shortcuts for pacman/yay/...
alias search="$pkg -Ss"
alias show="$pkg -Si"
alias info="$pkg -Qi"
alias update="$pkg -Sy"
alias upgrade="$pkg -Syu"
alias install="$pkg -S"
alias remove="$pkg -Rncs"
alias autoremove="$pkg -Qtdq | $pkg -Rns -"

13
shell/pkg Executable file
View File

@@ -0,0 +1,13 @@
# Shortcuts for APT/DNF/...
## The "show" is APT only, DNF has "info" instead.
## APT has alias "info" for "show", although it's not mentioned.
alias search="$pkg search"
alias list="$pkg list"
alias show="$pkg show"
alias info="$pkg info"
alias update="$pkg update"
alias upgrade="$pkg update && $pkg upgrade"
alias install="$pkg install"
alias remove="$pkg remove"
alias autoremove="$pkg autoremove"