Alias for Linux/Mac

Alias

alias for Linux/Mac

Tips: use alias show system alias.

nefetch and onefetch

alias s="neofetch"

alias c="onefetch"

make

alias mk="make"

zsh

alias sz="source ~/.zshrc"

fzf

alias f="fzf"

alias ff='fzf --preview "bat --color=always {}"'

grep

alias grep="grep --color=auto"

claude

alias cl='claude --dangerously-skip-permissions --append-system-prompt "$(cat ~/.claude/system-prompt.txt)"'

du

alias du1="du -hd 1"

clear

alias clr="clear"

alias c="clear"

cd

alias "."="cd ..."

alias "..."="cd .../..."

alias "..."="cd .../.../..."

alias "..."="cd .../.../.../..."

or:

alias "cd1"="cd ..."

alias "cd2"="cd .../..."

alias "cd3"="cd .../.../..."

alias "cd4"="cd .../.../.../..."

kubectl

alias k="kubectl"

alias kg="kubectl get"

alias ke="kubectl edit"

alias kexec="kubectl exec -it"

alias klf="kubectl logs -f"

alias ka="kubectl apply"

alias kcf="kubectl create -f"

alias kd="kubectl describe"

git

~/.gitconfig

复制代码
[alias]
    # git branch ==> git b
    br = branch
    # git commit -s -m "xx" ==> git c "xxx"
    c  = commit -s -m
    co = checkout
    ch = cherry-pick
    dump = cat-file -p
    hist = log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short
    st = status
    type = cat-file -t

alias gg="git clone"

alias gpl="git pull"

alias gps="git push"

alias ga="git add ."

alias gss="git stash save"

alias gsp="git stash pop"

docker

alias dex="sudo docker exec -it"

alias drm="docker rm $(docker ps -a -q)" # remove all containers

alias dclean="docker system prune -af" # clean system

python

alias py="python3"

alias pi="pip3 install"

alias sv="source venv/bin/active"

alias pyserve="python3 -m http.server" # pyserve 58080

grep/egrep

alias grep="grep --color=auto"

macos ip

alias myip=ifconfig en1 | grep inet | grep -v inet6 | cut -d ' ' -f2

相关推荐
开开心心就好1 天前
小巧绿色免费关机工具,支持定时倒计时
linux·运维·服务器·安全·powerpoint·1024程序员节·foxmail
放下华子我只抽RuiKe51 天前
AI大模型开发-实战精讲:从零构建 RFM 会员价值模型(再进阶版:模拟数据 + 动态打分 + 策略落地)
大数据·人工智能·深度学习·elasticsearch·机器学习·搜索引擎·全文检索
孫治AllenSun1 天前
【Linux】配置服务自启动
linux·运维·服务器
小生不才yz1 天前
【Makefile 专家之路 | 基础篇】03. 规矩方圆:书写规则详解(通配符、文件搜索与伪目标)
linux
Lueeee.1 天前
Linux下的ULN2003驱动板与28BYJ-48步进电机驱动移植
linux·驱动开发
洛菡夕1 天前
nginx核心功能
linux·nginx
原来是猿1 天前
Linux - 基础IO【下】
linux·运维·服务器
xyd陈宇阳1 天前
面向网络协议初学者的入门指南
linux·运维·网络协议
_DCG_1 天前
用户态和内核态的区别
linux
肖恭伟1 天前
QtCreator Linux ubuntu24.04问题集合
linux·windows·qt