
Main Windows PowerShell Commands.
Main Windows cmd prompt commands.
Docker Best practices.

Docker has revolutionized the world of containerization, enabling scalable and efficient application deployment.
To make the most of this powerful tool, here are 10 essential Docker best practices:
š¦šš®šæš šš¶ššµ š® šš¶š“šµššš²š¶š“šµš šš®šš² ššŗš®š“š²: Use minimalist base images to reduce container size and vulnerabilities.
š¦š¶š»š“š¹š² š£šæš¼š°š²šš š½š²šæ šš¼š»šš®š¶š»š²šæ: Keep it simple – one process per container for better isolation and maintainability.
šØšš² šš¼š°šøš²šæ šš¼šŗš½š¼šš²: Define multi-container applications in a YAML file for easy management.
š©š¼š¹ššŗš² š š¼šš»šš¶š»š“: Store data outside the container to preserve it, even if the container is removed.
šš¼š»šš®š¶š»š²šæ š¢šæš°šµš²šššæš®šš¶š¼š»: Consider Kubernetes or Docker Swarm for managing containers at scale.
š©š²šæšš¶š¼š»š¶š»š“ š®š»š± š§š®š“š“š¶š»š“: Always tag images with version numbers to ensure reproducibility.
šš²š®š¹ššµ ššµš²š°šøš: Implement health checks to monitor container status and reliability.
š„š²šš¼ššæš°š² šš¶šŗš¶šš: Set resource constraints to prevent one container from hogging resources.
šš¼š°šøš²šæš³š¶š¹š² šš²šš š£šæš®š°šš¶š°š²š: Optimize Dockerfiles by minimizing layers and using caching effectively.
š¦š²š°ššæš¶šš: Regularly update images, scan for vulnerabilities, and follow security best practices.
Install Docker on Linux with a single command.
Run this to install Docker:
$ curl -fsSLĀ get.docker.comĀ | sh
To preview the installation steps first:
$ curl -fsSLĀ get.docker.comĀ -oĀ get-docker.sh
$ sudo sh ./get-docker.shĀ –dry-run
How to Send Email using Shell Script (gmail).
In this article, we will learn how to send email using shell scripting. Sending emails programmatically can be very useful for automated notifications, error alerts, or any other form of communication that needs to be sent without manual intervention. Shell scripting offers a powerful way to achieve this through various utilities and tools available in Unix-like operating systems.
Prerequisites
- AWS Account with Ubuntu 24.04 LTS EC2 Instance.
- Basic knowledge of Shell scripting.
Step #1:Generate the App Password
First go to your account:

Search forĀ App PasswordĀ in the search bar.

Enter your google account password to verify itās you:

Now Enter the app name for which you wanted to get the app password like Shell Script.
And click on Create to create it:

the password will be generated. Note it down cause will be using it.

Step #2:Create a file in Ubuntu
Open the terminal and use theĀ nanoĀ command to create a new file:
nano email.sh
Step #3:Write a Script to Send Emails
Below is a basic script to send an email.
-----------------------------------------
#!/bin/bash
# Prompt the user for input
read -p "Enter your email: " sender
read -p "Enter recipient email: " receiver
read -s -p "Enter your Google App password: " gapp
echo
read -p "Enter the subject of mail: " sub
# Read the body of the email
echo "Enter the body of mail (Ctrl+D to end):"
body=$(</dev/stdin)
# Sending email using curl
response=$(curl -s --url 'smtps://smtp.gmail.com:465' --ssl-reqd \
--mail-from "$sender" \
--mail-rcpt "$receiver" \
--user "$sender:$gapp" \
-T <(echo -e "From: $sender\nTo: $receiver\nSubject: $sub\n\n$body"))
if [ $? -eq 0 ]; then
echo "Email sent successfully."
else
echo "Failed to send email."
echo "Response: $response"
fi
------------------------------------------

Save the file and exit the editor.
Explanation of the Script:
This script is designed to send an email using Gmailās SMTP server through the command line. Hereās a step-by-step explanation of each part of the script:
- Shebang: TheĀ
#!/bin/bash
Ā line at the beginning of the script indicates that the script should be run using the Bash shell. - User Input Prompts: These lines prompt the user to enter
- The senderās email address.
- The recipientās email address.
- The senderās Google App password (entered silently usingĀ
-s
Ā to hide the input). - The subject of the email.
- Reading the Email Body: This section prompts the user to enter the body of the email. The user can type the email content and end input by pressingĀ
Ctrl+D
. The body of the email is then captured into the variableĀbody
. - Sending the Email: This part of the script usesĀ
curl
Ā to send the email-s
Ā makesĀcurl
Ā run silently.--url 'smtps://smtp.gmail.com:465'
Ā specifies the Gmail SMTP server with SSL on port 465.--ssl-reqd
Ā ensures SSL is required.--mail-from "$sender"
Ā specifies the senderās email address.--mail-rcpt "$receiver"
Ā specifies the recipientās email address.--user "$sender:$gapp"
Ā provides the senderās email and Google App password for authentication.-T <(echo -e "From: $sender\nTo: $receiver\nSubject: $sub\n\n$body")
Ā sends the email content including headers and body.
- Handling the Response: This final part checks the exit status of theĀ
curl
Ā command ($?
):- If the exit status isĀ
0
, it prints āEmail sent successfully.ā - If the exit status is notĀ
0
, it prints āFailed to send email.ā and outputs the response fromĀcurl
.
- If the exit status isĀ
Step #4:Make file executable
Change the file permissions to make it executable using theĀ chmodĀ command:
chmod +x email.sh
Step #5:Run the script
Run the script by executing the following command:
./email.sh
You will be prompted to enter the senderās email, recipientās email, Google App password, subject, and body of the email:

You will get the message Email sent successfully.
Now check the mail box to see if you receive the mail or not.

Conclusion:
In conclusion, sending emails using shell scripting can greatly enhance your automation tasks, enabling seamless communication and notifications. This approach is especially useful for automated notifications, error alerts, and other routine communications. With the power of shell scripting, you can integrate emails functionality into your workflows, ensuring timely and efficient information exchange.
Shell Script to send email if multiple websites are down (gmail).
In this article, we will learn Shell Script to send email if website down, how to automate the process of checking the status of URLs and sending email notifications if any of them are down. When a website goes down or experiences issues, itās essential to be promptly notified so that necessary actions can be taken to restore its functionality.
One effective way to achieve this is by automating email notifications to alert system administrators or stakeholders about the status of URLs. Weāll utilize shell scripting to create a simple yet effective solution for monitoring website health and ensuring timely notifications in case of any disruptions.
Prerequisites
- AWS Account with Ubuntu 24.04 LTS EC2 Instance.
- Basic knowledge of Shell scripting.
Step #1:Generate the App Password
First go to your account.

Search forĀ App PasswordĀ in the search bar.

Enter your google account password to verify itās you.

Now Enter the app name for which you wanted to get the app password like URL Notification.
And click onĀ CreateĀ to create it

the password will be generated. Note it down cause will be using it

Step #2:Create a file in Ubuntu
Open the terminal and use the nano command to create a new file.
nano url_notify.sh
----------------------------------------------------
Step #3:Write a Script to Send Email Notification
Below is a basic script to send an email notification if any of the urlās are down:
----------------------------------------------------
#!/bin/bash
# Prompt the user for input
read -p "Enter your email: " sender
read -p "Enter recipient email: " receiver
read -s -p "Enter your Google App password: " gapp
echo
# List of URLs to check
urls=("https://www.example.com" "https://www.google.com" "https://www.openai.com")
# Function to check the status of URLs and send email notification if any are down
check_urls_and_send_email() {
local down_urls=""
local subject="Website Down"
for url in "${urls[@]}"; do
response=$(curl -Is "$url" | head -n 1)
if [[ ! $response =~ "200" ]]; then
down_urls+="$url\n"
fi
done
if [[ -n $down_urls ]]; then
body="The following websites are down:\n\n$down_urls"
email_content="From: $sender\nTo: $receiver\nSubject: $subject\n\n$body"
response=$(curl -s --url 'smtps://smtp.gmail.com:465' --ssl-reqd \
--mail-from "$sender" \
--mail-rcpt "$receiver" \
--user "$sender:$gapp" \
-T <(echo -e "$email_content"))
if [ $? -eq 0 ]; then
echo "Email sent successfully."
else
echo "Failed to send email."
echo "Response: $response"
fi
else
echo "All websites are up."
fi
}
# Call the function to check URLs and send email
check_urls_and_send_email
-------------------------------------------------

Save the file and exit the editor.
Explanation of the Script:
- User Input Prompt:
- The script prompts the user to enter their email address (sender), recipientās email address (receiver), and Google App password (gapp).
- List of URLs:
- The script defines an arrayĀ urlsĀ containing the URLs to be checked for their status. These URLs represent the websites whose availability we want to monitor.
- Function to Check URLs and Send Email:
- TheĀ check_urls_and_send_email()Ā function iterates through each URL, usingĀ curlĀ to check their status. If any URLs are found to be down, it constructs and sends an email notification containing details of the down URLs to the specified recipient. The email is sent using SMTPS protocol with SSL, and the script handles the response to determine the success of the email sending operation.
- Function Call:
- The script calls theĀ check_urls_and_send_emailĀ function to initiate the process of checking URL statuses and sending email notifications.
Step #4:Make file executable
Change the file permissions to make it executable using the chmod command.
chmod +x url_notify.sh
Step #5:Run the script
Run the script by executing the following command.
./url_notify.sh
You will be prompted to enter the senderās email, recipientās email and Google App password:

You will receive the message Email sent successfully.
Now check the mail box to verify if you received the mail or not.

Conclusion:
In conclusion, automating email notifications for URL status monitoring using shell scripting is a proactive approach to ensuring the continuous availability and performance of critical web services and applications. By implementing a simple shell script, organizations can establish an efficient mechanism for monitoring URL health and receiving timely alerts in case of any disruptions. By following the steps outlined in this article, organizations can enhance their website monitoring capabilities and minimize downtime, ultimately improving the overall reliability and user experience of their online services.
AWS Services cheatsheet.

Get Started with Ubuntu 24.04: Beginner-Friendly Installation & Tweaks.
Ubuntu 24.04 LTS, codename Noble Numbat, was released on April 25, 2024, and is now available for download from the official Ubuntu website and its mirrors. This release will receive official security and maintenance updates for five years, until April 2029.
Some key points about Ubuntu 24.04 LTS:
- Release date: April 25, 2024
- Codename: Noble Numbat
- Support period: 5 years (until April 2029)
- Download from:Ā https://ubuntu.com/download/desktopĀ or official mirrors
UbuntuĀ has long been recognized as one of the most popular andĀ widely used Linux distributionsĀ among desktop users.
However, it has experienced fluctuations in its popularity, particularly during the period when it introduced significant changes to its desktop experience with the user interface.
A key feature of this newĀ UbuntuĀ release is that it comes out at the same time (or almost the same time) as other popular versions likeĀ Kubuntu,Ā Lubuntu,Ā Xubuntu, andĀ Ubuntu Studio.
This gives users more options forĀ desktop environments, all with official support. The support period can differ (usually 3 years for non-LTS and 5 years for LTS versions), but releasing them together makes it easier for both individuals and companies to choose.
Ubuntu 24.04 Features
Here are some noticeable changes in Ubuntu 24.04 (Noble Numbat):
- Modern DesktopĀ ā Ubuntu 24.04 utilizes GNOME 46, offering a refined interface, improved multitasking, and better performance.
- Revamped InstallerĀ ā The installer boasts a fresh look, improved accessibility, and even supports easier deployment for businesses.
- Upgraded App CenterĀ ā The App Center features a new Flutter-based interface for smoother navigation, clearer categories, and user ratings.
- Enhanced SecurityĀ ā As an LTS release, Ubuntu 24.04 prioritizes stability with the latest Linux kernel 6.8 for improved security and hardware compatibility.
- Window Tiling AssistantĀ ā GNOME 46 introduces advanced window tiling, allowing efficient snapping of windows to various screen sections, including corners.
- Granular Update ControlĀ ā Separate stability and cutting-edge updates offer users more control over what gets installed.
- Year 2038 Fix (ARM)Ā ā The year 2038 issue is addressed on ARM architecture, ensuring accurate timekeeping for future users.
- Minimal Default InstallationĀ ā The default Ubuntu Desktop installation is now minimal, with options to add applications like LibreOffice or Thunderbird.
Ubuntu has one of the most simple and straightforward installers among all Linux distributions which makes the job of installing the system on hardware very easy even for a beginner or an uninitiated Linux or Windows user with just a few clicks.
System Requirements
Following are the minimum system requirements for installing Ubuntu 24.04 Desktop:
- A 2 GHz dual-core processor
- 4 GB of RAM
- 25 GB of free hard drive space.
This tutorial will cover fresh installation of Ubuntu 24.04 and with a basic walk through and a few system tweaks and applications.
Step 1: Installing Ubuntu 24.04 Desktop
1. Download the Ubuntu ISO image from the Ubuntu website, and then use a USB Linux Installer to burn the ISO to a USB stick.
2. After creating a bootable Ubuntu USB drive, restart your computer and go into the BIOS or boot menu by pressing the designated key (usually F2
, F12
, or Del
) during startup. Choose the USB drive as the boot device and press Enter.
3. The USB content is loaded into your RAM memory until it reaches the installation screen where you will be given the option to āTry Ubuntuā or āInstall Ubuntuā.

4. The next step asks you to test Ubuntu before installing it, choose āTry Ubuntuā, which allows you to use Ubuntu from the USB drive without making any changes to your computerās hard drive.

5. If youāre ready to install Ubuntu, select āInstall Ubuntuā and follow the on-screen instructions to select your language, and keyboard layout.

6. Next, choose āNormal installationā to install the full Ubuntu desktop with office software, games, and media players. You will also have the option to download updates and third-party software during the installation process.

7. Ubuntu will prompt you to choose how you want to partition your disk. You can select āErase disk and install Ubuntuā to use the entire disk or choose āSomething elseā for manual partitioning.
If youāre new to partitioning, itās recommended to select the āErase disk and install Ubuntuā option.

8. After your disk has been sliced hit on Install Now button. In the next stage choose your Location from the map ā Location will have an impact on your system time also so be advised to choose your true location.

9. Next, enter your name, desired username, password, and computer name to create a user account for Ubuntu.

10. Review your settings and click āContinueā to begin the installation process.

The installer now starts copying system files to your hard drive while it presents you with some information about your brand new Ubuntu LTS for 5 years support system.
After the installer finishes his job click on Restart Now prompt and press Enter after a few seconds for your system to reboot.

Congratulations!!Ā Ubuntu 24.04Ā is now installed on your machine and is ready for daily usage.
Step 2: System Update and Basic Software
After first logging into your new system is time to review your software sources to ensure you have all necessary repositories enabled, including main, universe, restricted, and multiverse.
Check for Updates
Open āSoftware & Updatesā from the applications menu, go to the āUbuntu Softwareā tab, and ensure that all the checkboxes for the Ubuntu repositories are checked.
You may also check the āSource Codeā option if you want access to source packages.

After making any changes to the software sources, click āCloseā and then āReloadā to update the software repositories.

Next, open a terminal and issue the following commands to keep your system secure and protected against potential vulnerabilities.
sudo apt-get update
sudo apt-get upgrade
Install Basic Software
For basic user usage, type āUbuntu Softwareā in the search bar, press Enter to open it, and browse through the search results to find the software youāre looking for.

Enable āMinimize on Click
If you prefer to minimize windows by clicking on the app icon, you can enable this feature using a simple command in the terminal:
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
Install GNOME Tweaks
GNOME Tweaks is a powerful tool that allows for extensive customization options such as changing themes, fonts, window behavior, and more.
You can install GNOME Tweaks through the Ubuntu Software app and access it from the applications grid by searching for ātweaksā.

Enable Night Light
You might want to turn on the ānight lightā setting in GNOME, which helps to lower the amount of blue light that comes from your screen. This can be good for your sleep. You can find this setting in the āScreen Displayā part of your Settings.

Customize Desktop Environment
Ubuntu offers different desktop environments like GNOME, KDE, and Xfce. You can install and switch between these environments based on your preferences using terminal commands as shown.
Install KDE on Ubuntu:
sudo apt install kubuntu-desktop
Install Xfce on Ubuntu:
sudo apt install xubuntu-desktop
Install Snap Packages
You might want to tryĀ installing Snap packages, a new way of packaging software for Linux. It lets you get lots of different software applications and tools easily.
sudo apt install snapd
Thatās all for basic Ubuntu installation and minimal software required for average users to browse the Internet, instant messaging, listen to music, watch movies, YouTube clips, or write documents.
10 Best Ubuntu-Based Linux Distributions
UbuntuĀ is arguably one of the most popular andĀ widely-used Linux distributionsĀ owing to its classic UI, stability, user-friendliness, and rich repository that contains overĀ 50,000Ā software packages. Furthermore, it comes highly recommended for beginners who are trying to give a shot at Linux.
In addition, Ubuntu is supported by a vast community of dedicated open-source developers who actively maintain and contribute to its development to deliver up-to-date software packages, updates, and bug fixes.
There are numerous flavors based on Ubuntu, and a common misconception is that they are all the same. While they may be based on Ubuntu, each flavor ships with its own unique style and variations to make it stand out from the rest.
In this guide, we are going to explore some of the most popular Ubuntu-based Linux distributions.
Table of Contents
- 1. Linux Mint
- 2. Elementary OS
- 3. Zorin OS
- 4. POP! OS
- 5. LXLE
- 6. Kubuntu
- 7. Lubuntu
- 8. Xubuntu
- 9. Ubuntu Budgie
- 10. KDE Neon
1. Linux Mint
Used by millions around the globe, Linux Mint is a massively popular Linux flavor based on Ubuntu. It provides a sleek UI with out-of-the-box applications for everyday use such as LibreOffice Suite, Firefox, Pidgin, Thunderbird, and multimedia apps such as VLC and Audacious media players.

Owing to its simplicity and ease of use,Ā Linux MintĀ is considered ideal for beginners who are making aĀ transition from Windows to LinuxĀ and those who prefer to steer clear from the defaultĀ GNOMEĀ desktop but still enjoy the stability and the same code base thatĀ UbuntuĀ provides.
The most recent releases ofĀ Linux MintĀ areĀ Linux Mint 20Ā andĀ Linux Mint 21, which are based onĀ Ubuntu 20.04 LTSĀ andĀ Ubuntu 22.04 LTSĀ respectively.
2. Elementary OS
If there was ever a Linux flavor that was built with stunning appeal in mind without compromising crucial aspects such as stability and security, then it has to be anĀ elementary OS, which is based onĀ Ubuntu.
elementary OS is an open-source flavor that ships with an eye-candy Pantheon desktop environment inspired by Appleās macOS. It provides a dock that is reminiscent of macOS, beautifully styled icons, and numerous fonts.

From its official site, elementary OS emphasizes on keeping usersā data as private as possible by not collecting sensitive data. It also takes pride in being a fast and reliable operating system ideal for those transitioning from macOS and Windows environments.
Just like Ubuntu, elementary OS comes with its own Software store known as App Center from where you can download and install your favourite applications (both free and paid) with a simple mouse-click. Of course, it ships with default apps such as Epiphany, Photo Viewer, and video/media playing applications but the variety is quite limited compared to Linux Mint.
3. Zorin OS
Written inĀ C,Ā C++, andĀ Python,Ā ZorinĀ is a fast, and stable Linux distribution that ships with a sleek UI that closely mimics Windows 7. Zorin is hyped as an ideal alternative to Windows and, upon trying it out, I couldnāt agree more. The bottom panel resembles the traditional taskbar found in Windows with the iconic start menu and pinned application shortcuts.

Like elementary OS, it underscores the fact that it respects usersā privacy by not collecting private and sensitive data. One cannot be certain about this claim and you can only take their word for it.
Another key highlight is its ability to run impressively well on old PCs ā with as little as 1 GHz Intel Dual Core processor, 1 GB of RAM & 10G of hard disk space. Additionally, you get to enjoy powerful applications such as LibreOffice, Calendar app & Slack, and games that work out of the box.
4. POP! OS
Developed & maintained by System76, POP! OS is yet another open-source distribution based on Canonicalās Ubuntu. POP breathes some fresh air into the user experience with an emphasis on streamlined workflows thanks to its raft of keyboard shortcuts and automatic window tiling.

POP! also brings on board a Software Center- Pop! Shop ā that is replete with applications from diverse categories such as Science & Engineering, development, communication, and gaming apps to mention a few.
A remarkable improvement that POP! has made is the bundling of NVIDIA drivers into the ISO image. In fact, during the download, you get to select between the standard Intel/AMD ISO image and one that ships with NVIDIA drivers for systems equipped with NVIDIA GPU. The ability to handle hybrid graphics makes POP ideal for gaming.
The latest version of POP! Is POP! 22.04 LTS based on Ubuntu 22.04 LTS.
5. LXLE
If you are wondering what to do with your aging piece of hardware, and the only thought that crosses your mind is tossing it in the dumpster, you might want to hold back a little and try out LXLE.

TheĀ LXLEĀ project was primarily developed to revive old PCs that have low specifications and have seemingly outlived their usefulness. How does it achieve this?Ā LXLEĀ ships with aĀ lightweight LXDE desktop environmentĀ that is friendly to the system resources without compromising on the functionality required to get things done.
We have included it in theĀ best Linux distributions for old computers.
LXLE is packed with cool wallpapers and numerous other additions and customization options that you can apply to suit your style. Itās super fast on boot and general performance and ships with added PPAs to provide extended software availability. LXLE is available in both 32-bit and 64-bit versions.
The latest release of LXLE is LXLE 18.04 LTS.
6. Kubuntu
KubuntuĀ is a lightweightĀ UbuntuĀ variant thatĀ ships with a KDE Plasma desktopĀ instead of the traditionalĀ GNOMEĀ environment. The lightweightĀ KDE PlasmaĀ is extremely lean and doesnāt gobble up the CPU. In so doing, it frees up system resources to be used by other processes. The end result is a faster and more reliable system that enables you to do so much more.

Like Ubuntu, itās quite easy to install and use. The KDE Plasma provides a sleek & elegant look and feels with numerous wallpapers and polished icons.
Aside from the desktop environment, it resembles Ubuntu in almost every other way like shipping with a set of apps for everyday use like office, graphics, email, music, and photography applications.
Kubuntu adopts the same versioning system as Ubuntu and the latest release ā Kubuntu 20.04 LTS ā is based on Ubuntu 20.04 LTS.
7. Lubuntu
We cannot afford to leave out Lubuntu which is a lightweight distro that comes with an LXDE/LXQT desktop environment alongside an assortment of lightweight applications.

With a minimalistic desktop environment, it comes recommended for systems with low hardware specifications, more especially old PCs with 2G RAM. The latest version at the time of writing this guide is Lubuntu 22.04 with the LXQt desktop environment, which will be supported until April 2025.
8. Xubuntu
A portmanteau ofĀ XfceĀ andĀ Ubuntu,Ā XubuntuĀ is a community-drivenĀ UbuntuĀ variant that is lean, stable, and highly customizable. It ships with a modern and stylish look and out-of-the-box applications to get you started. You can easily install it on your laptop, or desktop and even an older PC would suffice.

The latest release is Xubuntu 22.04 which will be supported till 2025 and is also based on Ubuntu 22.04 LTS.
9. Ubuntu Budgie
As you might have guessed,Ā Ubuntu BudgieĀ is a fusion of the traditionalĀ UbuntuĀ distribution with the innovative and sleek Budgie desktop. The latest release,Ā Ubuntu Budgie 22.04 LTSĀ is a flavor ofĀ Ubuntu 22.04 LTS. It aims at combining the simplicity and elegance of Budgie with the stability and reliability of the traditional Ubuntu desktop.

Ubuntu Budgie 22.04 LTS features tons of enhancements such as 4K resolution support, a new window shuffler, budgie-nemo integration, and updated GNOME dependencies.
10. KDE Neon
We earlier featuredĀ KDE NeonĀ in an article about theĀ best Linux distros for KDE Plasma 5. Just likeĀ Kubuntu, it ships withĀ KDE Plasma 5, and the latest version āĀ KDE Neon 22.04 LTSĀ is rebased onĀ Ubuntu 22.04 LTS.

This may not be the entire list of all Ubuntu-based Linux distros. We decided to feature the top 10 commonly used Ubuntu-based distributions.Ā