Category Archives: Linux

Create an alias for microk8s.kubectl as kubectl on Ubuntu

sudo snap alias microk8s.kubectl kubectl Sources: https://github.com/ubuntu/microk8s/issues/20

Posted in Linux | Tagged , , | Leave a comment

bc: A command-line calculator for Ubuntu

It’s simple, but effective for command line addicts If it’s not already installed, install it by using: sudo apt install bc then run bc and type any calculations you want. I wrote for example $ bc bc 1.07.1 Copyright 1991-1994, … Continue reading

Posted in Linux | Tagged , , | Leave a comment

Using gzip to compress a file without overriding it

gzip < source_file > compressed_file.gz Source: https://unix.stackexchange.com/questions/46786/how-to-tell-gzip-to-keep-original-file

Posted in Linux | Tagged , , , | Leave a comment

Resize root filesystem on Ubuntu 18.04 with LVM

Ubuntu 18.04 default lvm layout comes with only a 4 GB root partition. Here we will extend it to occupy the full free space in the volume group: sudo lvextend -l 100%FREE –resizefs /dev/ubuntu-vg/ubuntu-lv That’s it, Enjoy! Sources: https://access.redhat.com/solutions/44089 https://www.digitalocean.com/community/tutorials/how-to-use-lvm-to-manage-storage-devices-on-ubuntu-18-04

Posted in Linux | Tagged , , , , | Leave a comment

How to scan for devices in your network in Ubuntu

sudo apt install arp-scan sudo arp-scan -l –interface=wlp2s0 Replace wlp2s0 with your NIC’s name, works for both wireless and wired Source: https://askubuntu.com/questions/82480/how-to-see-all-computers-connected-to-a-network

Posted in Linux | Tagged , , | Leave a comment

Validate xml files with xmlstarlet on Ubuntu

sudo apt install xmlstarletxmlstarlet val XML_FILE.xml

Posted in Linux | Tagged , , | Leave a comment