要在Ubuntu上卸载Apache2,请按照以下步骤操作:
打开终端(快捷键:Ctrl + Alt + T)。
首先,停止Apache2服务,输入以下命令:
sudo systemctl stop apache2
sudo apt-get remove --purge apache2
这将删除Apache2及其相关配置文件。
sudo apt-get autoremove
sudo apt-get update
现在,Apache2已从您的Ubuntu系统中卸载。如果您以后需要重新安装Apache2,只需运行sudo apt-get install apache2
即可。