只需当前用户使用:
vim ~/.bashrc
所有用户使用:
vim /etc/bashrc
添加内容:
alias c='clear' 执行系统命令
alias cdgs='cd /home/hoyin/gameServer' cd目录
alias shell='/home/hoyin/test.sh' 执行脚本
在最底层添加即可
修改完毕后需要执行以下代码方可生效:
source ~/.bashrc
or
source /etc/bashrc
alias c='clear'
alias chat='sh /home/doraemon/chat.sh'
alias pvp='sh /home/doraemon/pvp.sh'
alias s='sh /home/doraemon/server.sh'
alias t='sh /home/doraemon/timer.sh'
alias g='cd /server/dongyu-server/'
alias gm='sh /home/doraemon/gmtool.sh'
alias r='sh /home/doraemon/robot.sh'