ubuntu


Ubuntu Pi-hole DNS Fix: Pi-hole could not start DNS service after upgrading Ubuntu

Ubuntu is a widespread Linux distribution that has gained popularity over the years. One of the advantages of Ubuntu is its Long-Term Support (LTS) releases, which have been supported for several years and receive regular updates and security patches. Upgrading from one LTS release to another is a common task for Ubuntu users. However, sometimes things don’t go as planned, and some services may fail to start after the upgrade. In this blog post, we will explore one issue that Ubuntu users may encounter when upgrading from 18.04LTS to 20.04LTS or 22.04LTS and how to fix it.

The problem we will discuss is related to Pi-hole, a popular network-level advertisement and Internet tracker blocking application. Pi-hole uses DNS (Domain Name System) to stop unwanted traffic on your network. After upgrading from Ubuntu 18.04LTS to 20.04LTS or 22.04LTS, some users may encounter an issue where the DNS service for Pi-hole fails to start. The reason behind this is a broken symbolic link at /etc/dnsmasq.d/lxd.

LXD is a system container manager that allows users to run multiple isolated Linux systems (containers) on a single host. During the upgrade process, the symbolic link for LXD may become broken, causing the DNS service for Pi-hole to fail to start. Fortunately, the solution to this problem is simple. Users can remove the broken symbolic link by running the following command in the terminal:

sudo rm /etc/dnsmasq.d/lxd;

Once the broken symbolic link is removed, users can restart the DNS service for Pi-hole by running the following command:

pihole restartdns;

This command will restart the Pi-hole FTL (Faster Than Light) daemon, which handles DNS requests and blocks unwanted traffic.

In conclusion, upgrading from one LTS release to another is a common task for Ubuntu users. However, sometimes things may not go as planned, and some services may fail to start after the upgrade. One such issue that users may encounter is related to Pi-hole, where the DNS service fails to start due to a broken symbolic link at /etc/dnsmasq.d/lxd. Fortunately, the solution to this problem is simple, and users can fix it by removing the broken symbolic link and restarting the Pi-hole FTL daemon.


Remove Disabled Snaps.

LANG=C snap list --all | awk '/disabled/{print $1" --revision "$3}' | xargs -rn3 sudo snap remove;

Let us break down the command for you:

  1. LANG=C sets the language to English (C locale), which can be helpful to ensure consistent behavior across different systems with different default languages. We used this to make sure that the word disabled will appear for disabled snaps and not some other translation.
  2. snap list --all lists all installed snaps (i.e., packages) along with their details. The output of this command is piped to the following command.
  3. awk '/disabled/{print $1" --revision "$3}' searches for lines in the output that contain the word “disabled” and prints the first field (i.e., the name of the snap) followed by the string “–revision” and the third field (i.e., the revision number). This output is piped to the next command.
  4. xargs -rn3 sudo snap remove takes groups of three arguments from the input and runs the command snap remove with those arguments. In this case, the first argument is the name of the disabled snap; the second argument is the string “–revision”, and the third argument is the revision number. This will remove all disabled snaps and their associated revisions.

So, in summary, the command searches for all disabled snaps on the system, extracts their name and revision number and then removes them using the snap remove command. This is a very useful command to free up some space without losing data or functionality.


Two Signal accounts on Ubuntu 22.04LTS

Signal is a widely used messaging app that prioritizes user privacy and security. However, there may be times when one needs to use multiple Signal accounts on the same device. In this blog post, we will discuss the problem of needing two Signal accounts on Ubuntu 22.04LTS and how to solve it by installing the beta version.

The Problem:

Let’s say you have two Signal accounts, one for personal use and the other for work. Unfortunately, Signal does not provide a built-in feature for running multiple accounts on the same device. This can be a frustrating problem for Ubuntu 22.04LTS users who want to use multiple Signal accounts. Fortunately, there is a solution, and that is to install the beta version of Signal on your device.

Installation Steps:

  1. Open the Terminal.
    The first step is to open the Terminal by clicking the Terminal icon or pressing the “Ctrl+Alt+T” keys.
  2. Add the Signal repository.
    To install the beta version of Signal on Ubuntu 22.04LTS, you need to add the Signal repository to your system. Run the following command to add the repository:

echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list;

  1. Add Signal’s public key.
    Next, you need to add Signal’s public key to your system. This key is used to verify the authenticity of the packages in the repository. Run the following command to add the public key:

wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg;
cat signal-desktop-keyring.gpg | sudo tee -a /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null;

  1. Update the package list.
    After adding the repository and public key, you must update the package list. Run the following command to update the package list:

sudo apt update;

  1. Install the beta version of Signal.
    Finally, you can install the beta version of Signal by running the following command:

sudo apt install signal-desktop-beta;

This will install the beta version of Signal on your system, which you can use to run multiple Signal accounts.

Conclusion:

In conclusion, running multiple Signal accounts on Ubuntu 22.04LTS can be a problem. However, installing the beta version of Signal can solve this problem. Following the above installation steps, you can easily install the beta version of Signal on your device and use multiple Signal accounts without hassle.


Using minicom to connect to Cisco Console

sudo minicom --device /dev/ttyUSB0 --baudrate 9600 --8bit;

sudo is a command that allows the user to run another command with superuser privileges.

minicom is a terminal emulation program that allows the user to communicate with a serial device.
The --device flag followed by /dev/ttyUSB0 specifies the serial device that minicom should use for communication.
The --baudrate flag followed by 9600 specifies the baud rate (i.e. the speed at which data is transmitted) of the serial connection.
The --8bit flag sets the number of data bits to 8.

So this command is running minicom as a superuser, connecting to the device at “/dev/ttyUSB0” with a baud rate of 9600 and 8-bit data

In addition to the command line arguments above, we had to ensure that flow control (both hardware and software) was off and no parity was given.