Security, PKI, sys and network admins

How to change the MTU of a network interface with ifconfig in Linux

Your network interface might not act properly by not having an speed unknown value for example and this is sometimes caused by an abnormal MTU value for your network interface. You can change that using the ifconfig command.


How to bring a network interface up or down with ifconfig in Linux

On some machines running Ubuntu frequently, you can easily restart (down/up state) a network interface by ultimately using the ifconfig command.


How to uninstall Apache2 on Linux

Ubuntu server 18.04 LTS

  1. Check the Apache2 process status
sudo /etc/init.d/apache2 status 

If you’re seeing an Active (running) message then it means that your Apache2 process is still running and we need to stop it.

How to uninstall Apache2 on Linux
How to uninstall Apache2 on Linux – checking the Apache2 status on Ubuntu 18.04.3 LTS
  1. Stop the Apache2 process
sudo /etc/init.d/apache2 stop
How to uninstall Apache2 on Linux – stopping the Apache2 service on Ubuntu 18.04.3 LTS
How to uninstall Apache2 on Linux – stopping the Apache2 service on Ubuntu 18.04.3 LTS
  1. Check the Apache2 process status, again.
sudo /etc/init.d/apache2 status
How to uninstall Apache2 on Linux
How to uninstall Apache2 on Linux – checking status after stopping the Apache2 process on Ubuntu 18.04.3 LTS

Notice that now, the “Active” section says inactive.

  1. Uninstall Apache2 by purging.
sudo apt-get purge apache2* -y
How to uninstall Apache2 on Linux - purging Apache2
How to uninstall Apache2 on Linux – purging Apache2 on Ubuntu 18.04.3 LTS
  1. Verify if anything related to the Apache2 service has been removed
 sudo apt-get autoremove -y
How to uninstall Apache2 on Linux - autoremove any leftovers after purging
How to uninstall Apache2 on Linux – autoremove any leftovers after purging on Ubuntu 18.04.3 LTS
  1. Verify if any file or folders have been left on the server.
whereis apache2
How to uninstall Apache2 on Linux -whereis Apache2
How to uninstall Apache2 on Linux – whereis Apache2 on Ubuntu 18.04.3 LTS

If the result/output of the command above is empty, then Apache2 has been successfully uninstalled from your Ubuntu 18.04 LTS.


How to install LAMP (Linux, Apache, MySQL, PHP) web server

Install LAMP (Linux Apache, MySQL, PHP) web server

We sometimes find ourserlves in the position where we need to install a LAMP (Linux, Apache, MySQL, PHP) web server.


How to view/display Linux version

How to view/display Linux version

I came across a lot of situations where I needed to know the exact version of the OS I was using. Mainly, because of the dependencies involved (Python, PHP, MySQL, etc).

So, open up a terminal and use the following commands in order to view the exact version of your Linux operating system.