Skip to content
Home » Ubuntu » Page 2

Ubuntu

Ubuntu Linux Technology, Related Information, How-To’s, Tips, Tools, and Guides

[FIXED] PARROT OS NTP TIME INACTIVE

When you run timedatectl it will show you the current date and time on your Parrot box. You will also see that NTP in inactive. To fix it

sudo timedatectl set-ntp true

Then run

timedatectl

and the correct time will now show

[FIXED] VIRTUALMIN HTTP TO HTTPS REDIRECT

By default virtualmin creates sites in both http and https. Here is how to force all your traffic to your HTTPS site only

Log into Virtualmin

Select the Domain

Choose Server Configuration

Select Website Options

Place a dot next to Redirect HTTP to HTTPS by default

Save

And you are done. Your traffic now redirects

{FIXED} VIRTUALMIN PROFTPD ERROR AFTER UPGRADE TO UBUNTU 22.04

If you are receiving the following error after the upgrade:

UBUNTU 22.04 Upgrade Error with proftpd

Then you must do the following
sudo apt remove proftpd*
sudo apt purge proftpd*

Now you can run updates normally
sudo apt-get update
sudo apt-get upgrade

and you will not see the error anymore

And with that, you are welcome


(FIXED) – WORDPRESS ERROR FTP USER

  • Ubuntu

If your wordpress is asking for an FTP user to install plugins or themes, you have a permissions error
The specific error is as follows:
“To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.”

SSH into the server

View the .conf file located in the sites-available folder

find the SUSEXEC id numbers

then cat /etc/passwd

This will show you all the usernames

Find the SUSEXEC id number (This will be your apache user)

Then Type:
sudo chown -R apacheuserhere:apacheuserhere /home/name/public_html/

UPGRADE UBUNTU 20.04 TO 22.04

Quick how-to run and upgrade from the command line

Do not SSH into the server. Use KVM or a local connection to the server

Login

sudo bash

apt-get update

apt-get upgrade

apt-get dist-upgrade

do-release-upgrade

The server will upgrade to the latest version

INSTALL COMPOSER 2 ON UBUNTU 20.04

Quick How-To for getting composer 2 to work since composer 1 has been deprecated

Login to a terminal

sudo bash
apt-get update
apt-get upgrade
apt install php-cli unzip
exit
cd ~
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php

HASH=`curl -sS https://composer.github.io/installer.sig`

echo hash

php -r “if (hash_file(‘SHA384’, ‘/tmp/composer-setup.php’) === ‘$HASH’) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;”

Installer will be verified

sudo php /tmp/composer-setup.php –install-dir=/usr/local/bin –filename=composer

Composer will download and install

Then Type:
composer

You should see a Composer info screen

UPGRADE MAUTIC ON UBUNTU 20.04

Quick how-to on the way I upgraded mautic, since upgrading through the web breaks my installations every time.

Login into your Virtualmin

Backup all of your virtual servers

Download the backups to your pc

Open Putty

SSH to Server

sudo su –

cd to your mautic directory (/home/user/html)

php bin/console mautic:update:find

php bin/console mautic:update:apply

php bin/console mautic:update:apply –finish

Open your mautic installation, refresh the web page, check the bottom right, and you will see the latest version. In my case it is 4.4.8

HOW TO UPDATE PI-HOLE

Quick How-To for updating pihole on Ubuntu

Open a terminal

Type:
sudo apt-get update
Enter in your password

Type
sudo apt-get dist-upgrade
Enter in your password

Type
pihole -up
Enter in your password

Pihole updates

That is it!

LINUX COMMAND LINE SHOW PUBLIC IP

This is a simple command that you can run on your local linux box, which will show you the public ip of the machine. Very helpful when mining on ethermine

First open a Terminal

Type:
dig +short myip.opendns.com @resolver1.opendns.com

That’s it. Your public IP will now show

INSTALL NVIDIA DRIVERS, CUDA, TENSORFLOW AND ANACONDA ON UBUNTU 20.04

Quick note on how to install the packages. It is in no particular order, these are raw notes my from my temporary build

Install Ubuntu

Open a terminal
sudo bash
apt-get update
apt-get dist-upgrade
nvidia-smi


Pick the version you want to use
apt install nvidia-utils-510
reboot


Open a terminal
sudo bash
nvidia-smi
ubuntu-drivers autoinstall
apt-get install curl


Go to the Anaconda site and download the latest build. For me it was the one below
cd Downloads/
bash Anaconda3-2021.11-Linux-x86_64.sh
source ~/.bashrc
conda info
conda update conda
conda update anaconda
sudo apt install nvidia-cuda-toolkit
reboot


Open a terminal
sudo bash
anaconda-navigator


Open a new notebook
pip install –upgrade tensorflow
Press run


Open a new notebook
import tensorflow as tf
print(tf.version)


Tensorflow will show the version