Install NVIDIA 340.108 Driver on Ubuntu

Install NVIDIA proprietary drivers on Debian / Ubuntu / Linux Mint / LMDE and disable the nouveau driver

Make sure that you system is up-to-date and you are running latest kernel, also make sure that you don’t have any Debian / Ubuntu / Linux Mint / LMDE NVIDIA package installed

## Ubuntu / Debian / Linux Mint / LMDE ##
apt update

apt upgrade

## Debian and Linux Mint ##
apt autoremove $(dpkg -l nvidia-driver* |grep ii |awk '{print $2}')

## Ubuntu ##
apt autoremove $(dpkg -l xserver-xorg-video-nvidia* |grep ii |awk '{print $2}')

apt reinstall xserver-xorg-video-nouveau

Install needed dependencies

## Ubuntu / Debian / Linux Mint ##
apt install linux-headers-$(uname -r) gcc make acpid dkms libglvnd-core-dev libglvnd0 libglvnd-dev dracut wget patch libgtk2.0-0

Disable nouveau

Create or edit /etc/modprobe.d/blacklist.conf

Append ‘blacklist nouveau’

echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf

Edit /etc/default/grub

Append ‘rd.driver.blacklist=nouveau’ to end of ‘GRUB_CMDLINE_LINUX=”…”‘.

## Example row on Debian ##
GRUB_CMDLINE_LINUX_DEFAULT="quiet rd.driver.blacklist=nouveau"

## OR with Ubuntu and Linux Mint ##
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rd.driver.blacklist=nouveau"

Update grub2 conf

## BIOS and UEFI ##
update-grub2

Generate initramfs

## Backup old initramfs nouveau image ##
mv /boot/initrd.img-$(uname -r) /boot/initrd.img-$(uname -r)-nouveau
 
## Generate new initramfs image ##
dracut -q /boot/initrd.img-$(uname -r) $(uname -r)

Create new directory for inttf NVIDIA patcher

cd ~
mkdir NVIDIA
cd NVIDIA

Download / Update inttf NVIDIA patcher

wget -O inttf-nvidia-patcher.sh https://nvidia.if-not-true-then-false.com/patcher/inttf-nvidia-patcher.sh

Make inttf NVIDIA patcher executable

chmod +x inttf-nvidia-patcher.sh

Download and patch your drivers

./inttf-nvidia-patcher.sh -v 340.108

Reboot to runlevel 3

systemctl set-default multi-user.target

reboot

Run NVIDIA Binary

./NVIDIA-Linux-x86_64-340.108-patched-kernel-5.15.run
systemctl set-default graphical.target

reboot

References
https://www.if-not-true-then-false.com/2021/debian-ubuntu-linux-mint-nvidia-guide/
https://www.if-not-true-then-false.com/2020/inttf-nvidia-patcher/

Install RabbitMQ on Ubuntu 20.04

Install Erlang

wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo apt-key add -
echo "deb https://packages.erlang-solutions.com/ubuntu focal contrib" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
sudo apt update
sudo apt install erlang

Install RabbitMQ

sudo apt update && sudo apt install wget -y
sudo apt install apt-transport-https -y
wget -O- https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc | sudo apt-key add -
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
echo "deb https://dl.bintray.com/rabbitmq-erlang/debian focal erlang-22.x" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
sudo apt update
sudo apt install rabbitmq-server
sudo systemctl enable rabbitmq-server

RabbitMQ Management Dashboard

sudo rabbitmq-plugins enable rabbitmq_management

To be able to login on the network, create an admin user like below:

rabbitmqctl add_user admin StrongPassword
rabbitmqctl set_user_tags admin administrator

References
https://computingforgeeks.com/how-to-install-latest-erlang-on-ubuntu-linux/
https://computingforgeeks.com/how-to-install-latest-rabbitmq-server-on-ubuntu-linux/

Disable swap on Ubuntu

disable swap only for a current session

sudo swapoff -a

Or 

sudo -s
crontab -e

And add

@reboot sudo swapoff -a  

Or ( best solution )

Open fstab file, type sudo nano /etc/fstab in terminal.

File’s contents would look like this:

proc            /proc           proc    nodev,noexec,nosuid 0       0
/host/ubuntu/disks/root.disk /               ext4    loop,errors=remount-ro 0       1
/host/ubuntu/disks/swap.disk none            swap    loop,sw         0       0
#/dev/sda10 /media/ASD  vfat    defaults    0   0
#/dev/sda1  /media/98   vfat    defaults    0   0

Just add hash (#) to the beginning of the swap partition line, so the line looks as:

#/host/ubuntu/disks/swap.disk none            swap    loop,sw         0       0

Reboot your PC

References
https://askubuntu.com/questions/214805/how-do-i-disable-swap

Set Up WireGuard VPN on Ubuntu 18.04

Server Installation

wget https://raw.githubusercontent.com/complexorganizations/wireguard-install/master/wireguard-server.sh -P /etc/wireguard/
bash /etc/wireguard/wireguard-server.sh

Client Installation

wget https://raw.githubusercontent.com/complexorganizations/wireguard-install/master/wireguard-client.sh -P /etc/wireguard/
bash /etc/wireguard/wireguard-client.sh

Or

apt-get update
apt-get install software-properties-common -y
add-apt-repository ppa:wireguard/wireguard -y
apt-get update
apt-get install linux-headers-"$(uname -r)" -y
apt-get install wireguard qrencode haveged resolvconf -y

Run Client

# Install the config file to the WireGuard configuration directory on your
# Linux client:
sudo install -o root -g root -m 600 <username>.conf /etc/wireguard/wg0.conf

# Start the WireGuard VPN:
sudo systemctl start wg-quick@wg0

# Check that it started properly:
sudo systemctl status wg-quick@wg0

# Verify the connection to the AlgoVPN:
sudo wg

# See that your client is using the IP address of your AlgoVPN:
curl ipv4.icanhazip.com

# Optionally configure the connection to come up at boot time:
sudo systemctl enable wg-quick@wg0

References
https://github.com/complexorganizations/wireguard-install
https://trailofbits.github.io/algo/client-linux-wireguard.html