-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bash_aliases
More file actions
77 lines (66 loc) · 3.19 KB
/
Copy path.bash_aliases
File metadata and controls
77 lines (66 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# General Safety Aliases
alias rm='rm -i' # Interactive remove
alias cp='cp -i' # Interactive copy
alias ln='ln -i' # Interactive link creation
alias mv='mv -i' # Interactive move
# Disk Usage
alias du='du -h' # Human-readable disk usage
alias duu='du -sh' # Summarize directory size
alias duuu='du --max-depth=1 -h' # Human-readable depth-1 disk usage
# System Updates and Information
alias upgrade='sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y' # Full system upgrade
alias ports='netstat -tulanp' # List active ports and services
alias err='journalctl -xe --since "1 hour ago"' # Show errors from the past hour
alias jj='sudo journalctl'
alias myip='curl ifconfig.me' # Show public IP address
alias sysctl='sudo systemctl' # Shorter systemctl alias
alias servlist='sudo systemctl list-units --state=running' # List running services
# Shell Management
alias cls='clear' # Clear screen
alias reload='source ~/.bash_profile' # Reload bash configuration
alias vibash='vi ~/.bash_aliases'
alias q='exit' # Quit terminal
# File and Directory Management
alias ls='ls -h --color=auto' # Add colors and human-readable sizes
alias lt='ls -ltr' # List sorted by modification date
alias ll='ls -lvA --group-directories-first' # Detailed list, directories first
alias lm='ll | less -r' # Paginate detailed list
alias lr='ll -R' # Recursive detailed list
alias la='ll -A' # Show all files including hidden ones
alias l='ls -CF' # Compact listing
alias mkdir='mkdir -pv' # Create directories with verbose output
# Navigation
alias gh='cd ~' # Go Home
alias cd..='cd ..' # Up one directory
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../../'
# Programs
alias rr='ranger' # Launch Ranger file manager
alias mt='multitail' # Launch MultiTail
alias vi='vim' # Use Vim instead of Vi
alias sudovim='sudo vim' # Vim with sudo
alias gg='glances' # Launch Glances system monitor
# Python
alias py='python3' # Short Python 3 alias
alias pip='pip3' # Short Pip 3 alias
alias python='python3'
# Docker
alias dps='sudo docker ps' # List running containers
alias dpa='sudo docker ps -a' # List all containers
alias dstop='sudo docker stop $(docker ps -q)' # Stop all running containers
# Kubernetes
alias k='kubectl' # Short Kubectl alias
# Suggestions (Optional, Add if Useful)
alias df='df -h' # Human-readable disk space
alias free='free -h' # Human-readable memory usage
alias grep='grep --color=auto' # Grep with color
alias cls='clear; echo "Cleared screen!"' # Clear with message
alias hist='history | tail -n 20' # Show last 20 commands
alias top='top' # Use force if installed
alias gitlog='git log --oneline --graph --decorate --all' # Improved Git log
# Ollama
alias ops='ollama ps' # Shows running ollama processes
alias ols='ollama list' # List all ollama models
alias ostop='ollama stop' # Stop Ollama model using it's name