Last active
August 5, 2026 12:35
-
-
Save abdulwahidgul24085/5ece34aad8f53cf40c3685fad39313c8 to your computer and use it in GitHub Desktop.
BASH Lunix Shortcuts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias updates="sudo apt update && sudo apt list --upgradable && sudo apt -y upgrade && sudo apt autoclean && sudo apt autoremove" | |
| alias t='tmux' | |
| alias tn='tmux new -s' # tn mysession | |
| alias ta='tmux attach -t' # ta mysession | |
| alias tls='tmux ls' # list sessions | |
| alias tk='tmux kill-session -t' # tk mysession | |
| alias tw='tmux new-window' # tw | |
| alias tp='tmux split-window' # tp -h or tp -v | |
| alias size='ls -lht' # Show the size of a file(s) | |
| alias dk='docker' # This is shorthand for docker | |
| alias dkc='docker compose' # This is shorthand for docker compose | |
| alias cls='clear' | |
| # SSH function to extract HostName and IPs for simple connection. This works if we have ~/.ssh/config file | |
| # e.g.`ssh Hetzner-Techlabs` where the Hetzner is the host name | |
| sshlist() { | |
| awk ' | |
| tolower($1) == "host" && $2 != "*" {host=$2; next} | |
| tolower($1) == "hostname" {print host " -> " $2} | |
| ' ~/.ssh/config | column -t | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -sL https://gist.githubusercontent.com/abdulwahidgul24085/5ece34aad8f53cf40c3685fad39313c8/raw/7088800e79c501d0d5a52fa4b33fdc1e03a710b8/.bashrc -o ~/.bashrc
source ~/.bashrc