0

I use following commands very often, and they're too long.

sudo /etc/init.d/kerio-kvc start
sudo /etc/init.d/kerio-kvc stop

how can I create a shortcut command for them? something like sudo kerio start or sudo kerio stop

Ali Seyfi
  • 103

1 Answers1

2

Edit your ~/.bashrc file, then add an alias:

alias kstart='sudo /etc/init.d/kerio-kvc start'
alias kstop='sudo /etc/init.d/kerio-kvc stop'

Then :

source ~/.bashrc

Now kstart and kstop are accessible.

Note :

most of linux distros now use systemd, so it would be :

sudo systemctl start kerio-kvc