Command not found for alias

Solution 1:

You need to remove the space before the = in the alias assignment

alias apacheres='/etc/init.d/apache2 restart'