Linux 别名 alias

vim /etc/profile

alias cdgame='cd ~/xxjn_game_server'
alias netstatn='netstat -ntlp'
alias startgame='cd ~/xxjn_game_server;./start.sh;tail -f svr.log'
alias stopgame='cd ~/xxjn_game_server;./stop.sh;tail -f svr.log'
alias startzip='cd ~/xxjn_game_server;rm -rf game;unzip game.zip;rm -rf *.zip;./start.sh;tail -f svr.log'

再文件最后添加
alias cdserver='cd ~/fate/server/proj.win32/server'
alias cdmtserver='cd ~/fate/server/mtserver'
alias startserver='cd ~/fate/server/proj.win32/server;./start.sh'
alias stopserver='cd ~/fate/server/proj.win32/server;./stop.sh'
alias makeserver='cd ~/fate/server/mtserver;make'
alias killserver='killall -9 zLogin zGMC zBank'


加载刚设置的变量
source /etc/profile

原文地址:https://www.cnblogs.com/shuangxinye/p/7372258.html