How to permanently save ENV variables in Linux?

Add to the end of ~/.bashrc: For example the Java ENV vars: export ANDROID_SDK_ROOT=”$HOME/Android/Sdk”JAVA_HOME=$(dirname $( readlink -f $(which java) ))JAVA_HOME=$(realpath “$JAVA_HOME”/../)export JAVA_HOME Then run this to reload your bash without having to log out and in again: source ~/.bashrc

Managing Big Files On Linux

When working with big data, it becomes crucial to manage big files efficiently. Printing a single line from a 150GB text file (like SQL, triples, quads or whatever) can be horrible and often requires some thinking, let alone editing files. Printing Big Files Using head can work to get the first or the last 5 […]

Linux – Stop SSH From Timing Out

When managing a Linux server using SSH, default sshd settings automatically kill connections that stay open for too long without any activity. SSH connection timeouts are a great security measure but as this can be frustrating for system admins, here’s how to change this on the server side. To change this behavior, it is possible […]

Linux – Stop All Docker Containers

Managing a docker infrastructure with many containers can be tedious at times. Docker containers can be stopped like this: Using “docker ps” to see running containers, one can stop all containers one by one using the container name or id. This takes our valuable time away and since Linux is the best OS out there […]

Linux – Watch Command Output

Rather than repeating command constantly to refresh the output of it, you can use the watch command to instantly refresh the screen for changes.

Linux – Change Hostname The Easy Way

Instead of changing multiple files when modifying the server hostname, use this easy command instead:  hostnamectl set-hostname

Linux – Scan open server ports

To get a list of all ports (and the service they expose) of a server, install nmap: nmap (optional for example -p 80)  

Linux – Command History

We have all been there. You are searching for some long and complex command you manually entered 4 minutes ago, but despite you bashing the up key, you can’t seem to find it and are now having a bad day because of this. This is a trick I learned from a Linux veteran: CTRL+R This […]

Linux – Rename Multiple Files

One cannot deny that Windows made file management user friendly. It’s 2017 and still some important usability features are missing from Linux distros. Last, I had to rename multiple files in order to organize my web image assets neatly, but (being a previous Windows user) I kept bashing F2 in order te perform a bulk […]