DeveloperBreeze

Ubuntu

Found 7 posts in category 'Ubuntu'.

Essential dpkg Commands Cheat Sheet for Debian and Ubuntu Systems

Cheatsheet October 24, 2024

  sudo dpkg --update-avail

Updates available packages by checking online repositories and downloads the latest versions to your local repository.

6. APT as a User-Friendly Front-End:

  • What it is: APT (Advanced Package Tool) is a higher-level front-end that interacts with dpkg and handles package relationships, dependencies, and versioning.
  • Why use APT: It simplifies the installation and removal of packages, ensuring that dependencies are correctly resolved.

Example for installing a package with APT:

Clearing Unnecessary Logs on Ubuntu

Tutorial October 24, 2024

After cleaning logs, it's good practice to reboot the system to ensure services restart and fresh log files are generated:

sudo reboot

Important Notes

  • Backup Logs: Before deleting, consider backing up important logs for future troubleshooting.
  • Avoid Deleting Critical Logs: Be cautious when removing logs that are essential for security and system diagnostics, such as auth.log, syslog, and kern.log.

By following this tutorial, you can free up disk space on your Ubuntu system while maintaining critical logs needed for system health monitoring.

How to Install and Configure Apache on Ubuntu

Tutorial October 21, 2024
bash

Available applications:
  Apache
  Apache Full
  Apache Secure
  OpenSSH

To allow both HTTP and HTTPS traffic, run:

sudo ufw allow 'Apache Full'

Then, enable the firewall (if not already enabled):

sudo ufw enable

How to Create SSL for a Website on Ubuntu

Tutorial October 21, 2024
bash

Step 2: Install Certbot and the Web Server Plugin

Certbot is the client tool that will manage SSL certificate generation for Let's Encrypt. Depending on your web server (Apache or Nginx), install Certbot and the appropriate plugin.

For Apache:

sudo apt install certbot python3-certbot-apache

For Nginx:

How to Install MongoDB Shell (mongosh) on Ubuntu

Tutorial October 18, 2024
bash

To confirm that mongosh is installed and properly configured, run the following command to check the version:

mongosh --version

If everything is set up correctly, you should see the version of mongosh that you installed.

Step 5: Connect to Your MongoDB Server

Once installed, you can connect to your MongoDB instance. For a local MongoDB instance, run: