Create LUKS Encrypted Thumb Drive

Find the thumb drive with lsblk, dmesg, or sudo fdisk -l. In the following examples we are using /dev/sdc1, replace as needed.

sudo cryptsetup --verbose --verify-passphrase luksFormat /dev/sdc1
sudo cryptsetup luksOpen /dev/sdc1 encrypted_usb
sudo mkfs.ext4 /dev/mapper/encrypted_usb

Now we can mount the drive. We are mounting it to /mnt change if needed.

sudo mount /dev/mapper/encrypted_usb /mnt

Or go ahead and close the channel and remove the drive

sudo cryptsetup luksClose /dev/mapper/encrypted_usb

Command Explanation

sudo cryptsetup --verbose --verify-passphrase luksFormat /dev/sdc1

Wipe /dev/sdc1 and set the password when prompted for it.

sudo cryptsetup luksOpen /dev/sdc1 encrypted_usb

Open up a secure channel to the drive, and decrypt it so we can access it

sudo mkfs.ext4 /dev/mapper/encrypted_usb

Using the channel we created in the previous command, we can now format the drive.

sudo cryptsetup luksClose /dev/mapper/encrypted_usb

We can now close the channel for the drive and remove it.

Bash array example

array=(one two three)
echo "Printing first object in array."  #Replace 0 with the place number of the array item
echo ${array[0]}

echo ""

echo "Whole array"
echo ${array[*]} 

echo "" 

echo "Array indexes" 
echo ${!array[*]}


Printing first object in array. 

Whole array
one two three

Array indexes
0 1 2

Failed to acquire the VirtualBox COM object.

It appears that the issue could be a corrupt VirtualBox.xml file. The one I had did not have anything in it. Removing or moving the file let it create a new one and let VirtualBox actually start.

mv ~/.config/VirtualBox/VirtualBox.xml{,old}

Only problem is that none of the VM’s showed up. Was able to go to the ~/VirtualBox folder in a file browser and launch the vbox file to start the VM

Where is the Trash in KDE?

Where are the trash files stored?

The file location for the trash is in the following directory


Inside there are two folders. info and files.
info – Keeps track of what was deleted and where it was
files – Contains the actual files

Delete the files in the Trash

  • First delete the file in the “info” directory
  • Then go delete the files in the “files” directory

To delete the files, select the files then press “Shift + Del”
or right click, hold Shift down and select Delete.

Bash random sleep timer

Change the 10 to however many seconds you need or want.

echo $(( ( RANDOM % 10 ) +1 ))

Example output

bob@localhost:~$ echo $(( ( RANDOM % 10 ) +1 ))
bob@localhost:~$ echo $(( ( RANDOM % 10 ) +1 ))
bob@localhost:~$ echo $(( ( RANDOM % 10 ) +1 ))

Sleep timer

sleep $(( ( RANDOM % 10 ) +1 ))

kubuntu-desktop : Depends: software-properties-kde but it is not going to be installed

Try installing software-properties-kde and get

The following packages have unmet dependencies:
  software-properties-kde : Depends: python3-software-properties (= but 1.8.8 is to be installed
 E: Unable to correct problems, you have held broken packages.

Try to install python3 from the bionic from bionic-updates

sudo apt install -t bionic-updates python3-software-properties

Install software-properties-kde

sudo apt install software-properties-kde

If it fails try force installing it

sudo dpkg -i --force-overwrite /var/cache/apt/archives/software-properties-kde_0.

Install Kubuntu desktop

sudo apt install kubuntu-desktop

More info here

Install KDE on Linux Mint 19.2

First add the following repo

sudo add-apt-repository ppa:kubuntu-ppa/backports

Make sure you are updated and upgraded

sudo apt-get update && sudo apt-get dist-upgrade

And if needed do a reboot

sudo reboot

Install the KDE desktop

sudo apt install kubuntu-desktop

Log out, select Plasma and log back in.

Setup DHCP server on Linux

Install dhcp server software

sudo apt install isc-dhcp-server

Edit the following config file and set the networking interface it should use. In this case enp60s0

sudo vi /etc/default/isc-dhcp-server

Example line to change


Now edit the dhcpd.con file

sudo vi /etc/dhcp/dhcpd.conf 

Add the following in. Change the addresses and settings as needed.

subnet netmask {
   option domain-name-servers;
   option domain-name "";
   option subnet-mask;
   option routers;
   option broadcast-address;
   default-lease-time 600;
   max-lease-time 7200;

Set a static ip on the computer that’ll be acting as the dhcp server. You can set it as the gateway if it is the gateway.

Allow dhcp through the firewall

sudo ufw allow  67/udp
sudo ufw reload
Restart the service and connect a client.

sudo systemctl restart isc-dhcp-server

More info.

You can look at dhcp leases with the following command

tail -f /var/lib/dhcp/dhcpd.leases