############################################################################################################################# # Downloaded from : REPLACE_DL_FROM # Appended at : APPENDED_AT # Original file Latest modified by : `Cellularhacker `;`https://github.com/Cellularhacker` # Original file Firstly created by : `Cellularhacker `;`https://github.com/Cellularhacker` # Append Length : #################### (# x 20) ############################################################################################################################# ###### Useful Alias ##### export PATH="$PATH:/sbin" ### MARK: For Debian/Ubuntu distros alias apt_auto='sudo systemctl daemon-reload && sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt full-upgrade -y && sudo apt autoremove --purge -y && sudo apt clean all' alias nala_auto='sudo systemctl daemon-reload && sudo nala update && sudo nala upgrade -y && sudo nala autoremove -y && sudo nala clean' alias apt_init='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk cloud-guest-utils dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_jammy='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk cloud-guest-utils dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_jammy_armbian='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk cloud-guest-utils dialog && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_jammy_edge='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk linux-image-generic-hwe-22.04-edge cloud-guest-utils dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_noble='sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk cloud-guest-utils dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_noble_armbian='sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk cloud-guest-utils dialog && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_noble_edge='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk linux-image-generic-hwe-24.04-edge cloud-guest-utils dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_vm='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk cloud-guest-utils dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_vm_jammy='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk cloud-guest-utils dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_vm_jammy_edge='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk cloud-guest-utils linux-image-extra-virtual-hwe-22.04-edge dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_vm_noble_edge='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info openvswitch-switch-dpdk cloud-guest-utils linux-image-extra-virtual-hwe-24.04-edge dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias apt_init_vm_noble_edge_router='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info cloud-guest-utils linux-image-extra-virtual-hwe-24.04-edge dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket && apt remove --purge -y systemd-resolved && apt update && apt upgrade -y && apt dist-upgrade -y && sudo apt full-upgrade -y && sudo apt autoremove --purge -y && sudo apt clean all' alias apt_init_debian='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info dialog && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket neofetch' alias apt_init_debian_vm='sudo systemctl daemon-reload && sudo apt install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info cloud-guest-utils dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias nala_init='sudo systemctl daemon-reload && apt install -y nala && sudo nala install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools sysnews motd-news-config landscape-common cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vnstat speedometer aria2 iperf3 distro-info python3-debconf python3-debian openvswitch-switch-dpdk cloud-guest-utils dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' alias nala_init_debian='sudo systemctl daemon-reload && apt install -y nala && sudo nala install -y vim curl wget git build-essential glances screen htop nmon tree iftop net-tools cockpit etherwake fwupd inetutils-traceroute inetutils-tools inetutils-ping vim vnstat speedometer aria2 iperf3 distro-info python3-debconf python3-debian nala cloud-guest-utils dialog neofetch && sudo systemctl enable --now vnstat && sudo systemctl enable --now cockpit.socket' # Custom Script geolocation() { RESPONSE=$(curl --request GET --url https://api.kwabang.net/geolocation/$1 -w "\n%{http_code}" -s) RESPONSE_CODE=$(tail -n1 <<< "$RESPONSE") RESPONSE_BODY=$(sed '$ d' <<< "$RESPONSE") if [ "$RESPONSE_CODE" = 200 ] then echo "${RESPONSE_BODY}" | jq else echo "${RESPONSE_BODY}" fi } reinstall_ghcli() { ### MARK: Remove keyrings && debian source list file. sudo rm -f /etc/apt/keyrings/githubcli-archive-keyring.gpg &>/dev/null && \ sudo rm -f /etc/apt/trusted.gpg.d/githubcli-archive-keyring.gpg &>/dev/null && \ sudo rm -f /usr/share/keyrings/githubcli-archive-keyring.gpg &>/dev/null && \ sudo rm -f /etc/apt/sources.list.d/github-cli.list &>/dev/null && \ sudo apt remove -y --purge gh &>/dev/null && \ (type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \ && sudo mkdir -p -m 755 /etc/apt/keyrings \ && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ && sudo apt update \ && sudo apt install gh -y } ### MARK: Redhat distros alias dnf_auto='sudo dnf -y distro-sync' alias dnf_init='sudo dnf -y install epel-release && sudo dnf -y install curl wget glances screen htop nmon tree iftop vim vnstat aria2 iperf3 nefetch && sudo dnf -y group install "Development Tools"' alias remove_systemd-resolved='curl -fsSL https://kr.mirrors.naho.moe/naho/tools/remove_systemd-resolved.sh | bash -' alias update_apt_auto='curl -fsSL https://kr.mirrors.naho.moe/naho/tools/install_apt_dnf_auto_rc.sh | bash -' export SYSTEMD_COLORS=true export CGO_CFLAGS_ALLOW='-Xpreprocessor' alias reinstall_tailscale='apt remove -y --purge tailscale && curl -fsSL https://tailscale.com/install.sh | sh && tailscale up' alias lh='ls -alrth' alias lhf='ls -alrth --full-time' alias psef="ps -ef | grep -v grep | grep -v 'rclone sync' | grep rsync ; ps -ef | grep -v grep | grep -v 'rsync --quiet' | grep 'rclone sync'" alias psrc="ps -ef | grep -v grep | grep 'rclone copy'" alias dfhT='echo "" && echo "" && date && echo "" && df -hT | grep -v "/var/lib/docker" | grep -v "fuse.rclone" | sed -En "s/( ){15,25}//p"' alias duhs='du -hs .' alias duhsa='du -hs *' # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) export HISTSIZE=10000000 export HISTFILESIZE=20000000 #############################################################################################################################