Skip to content

Instantly share code, notes, and snippets.

@abdulwahidgul24085
Last active August 5, 2026 12:35
Show Gist options
  • Select an option

  • Save abdulwahidgul24085/5ece34aad8f53cf40c3685fad39313c8 to your computer and use it in GitHub Desktop.

Select an option

Save abdulwahidgul24085/5ece34aad8f53cf40c3685fad39313c8 to your computer and use it in GitHub Desktop.
BASH Lunix Shortcuts
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
}
@abdulwahidgul24085

abdulwahidgul24085 commented Jun 19, 2026

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment