Commonly used commands on Ubuntu Server
Enable firewall
sudo ufw enableCheck firewall status
sudo ufw status verboseOpen ports
sudo ufw allow ssh
# OR (more explicitly)
sudo ufw allow 22/tcp
# Open ports in a range
sudo ufw allow <start_port>:<end_port>/<protocol>Delete port from firewall
sudo ufw delete allow 22/tcp # Removes the rule allowing SSH on port 22Config Apache Maven with command line
# Add maven home
echo 'export M2_HOME=/your/maven/home/directory' >> ~/.bashrc# Add maven path
echo 'export PATH=${M2_HOME}/bin:${PATH}' >> ~/.bashrcRestart terminal, should use mvn -v to verify configuration

