Linux Tips

Run Programs for X Server

sudo apt-get install xvfb
sudo Xvfb :10 -ac
export DISPLAY=:10

Tmux

# Create new session
tmux new -s [session-name]
# List session
tmux ls
# Attach session
tmux attach-session -t [session-number/session-name]

Install telnet on Alpine

apk add busybox-extras

Install ps on Ubuntu/Debian

sudo apt install procps

Fix Locales

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

VirtualBox

Enable auto time synchronization with host

vboxmanage setextradata [vbox] "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" "1"

Oh My Zsh

Command Description
alias List all aliases
take Create a new directory and change to it, will create intermediate directories as required
exec zsh Apply changes made to .zshrc

Fix Broken sudoers File

Run this:

pkexec visudo

Bash

A Good Way to Start a Bash Script

#!/bin/bash

set -eou pipefail

See details in the docs — The Set Builtin .