I'm trying to create an "alias" to run a server in a separate terminal, then after a few seconds open its client, this is the command I'm trying:
alias kingp='xterm -e sudo /opt/king-phisher/KingPhisherServer -L INFO -f /opt/king-$/king-phisher/server_config.yml; /opt/king-phisher/KingPhisher'
The problem with this is that it does not run the second command until I close the server (CTRL+C), and them it runs the client normally, I've tried with & and && at the end of the server command to no avail, it seems like the server, even being run with -e is still not liberating the terminal for the other command to run, I've been successful with -e before and have no idea why in a alias it does not work, anyone can help me? thank you very much guys.
I am not sure where you want an & but your problem is likely due to calling xterm. If you write a script, however, your alias is simply
alias kingp='sudo /path/to/script` – Panther Apr 05 '16 at 12:47