Tag Archives: Bash

What to do when an SSH session hangs because of a network problem

It’s a very basic post, yet still useful! Sometimes when you disconnect from a network or VPN or have any network connectivity problem in general that affects an established SSH connection to any of your servers, the terminal hangs for … Continue reading

Posted in Linux | Tagged , , | Leave a comment

Script to count number of logged in users to OpenVPN

To get that information you need to query your openvpn-status.log file, which usually resides in /var/log/openvpn/openvpn-status.log. A normal cat will show the following: OpenVPN CLIENT LIST Updated,Wed Mar 5 11:57:51 2019 Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since someuser,someip:55530,100686479,319036434,Tue Mar 5 … Continue reading

Posted in Linux | Tagged , , | Leave a comment

Touchpad enable/disable script and shortcut on Ubuntu 18.10

If your laptop doesn’t have a working switch for turning on/off your touchpad, then this post is for you. Create a script called disenable_touchpad.sh and add the following code to it: !/bin/bash state=$( gsettings get org.gnome.desktop.peripherals.touchpad send-events ) if [ … Continue reading

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

How to beautify XML text on command line in Ubuntu

sudo apt install libxml2-utils echo ‘your xml stuff here’ | xmllint –format – You will get a beautiful well-organized XML output. Sources: https://jahansyed.co.uk/2016/04/22/how-to-install-xmllint-in-ubuntu/ https://stackoverflow.com/questions/16090869/how-to-pretty-print-xml-from-the-command-line

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

How to check packages support status for Ubuntu 18.04

To know which packages are supported and which are not, for how long and whether the community or canonical are the ones who support it, just run: ubuntu-support-status It will give you this sample output: Support status summary of ‘$HOSTNAME’: … Continue reading

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