Category: Linux


TMOUT – Auto Logout Linux Shell When There Isn’t Any Activity

Something new I learned today — doing

export TMOUT=120

Will auto logout your current shell/login session after that many seconds.

Very useful if you hook this into the root account’s profile or as a default to all users so people can’t leave terminals open

Source: TMOUT – Auto Logout Linux Shell When There Isn’t Any Activity


How to Install Multiple Linux Distributions on One USB

As someone who has tinkered with multiple distributions, this will be a great way to try out multiples

This tutorial shows you how to install multiple Linux distributions on one USB. This way, you can enjoy more than one live Linux distros on a single USB key.

Source: How to Install Multiple Linux Distributions on One USB


[SCRIBBLE] Tinkering with Kubernetes and AWS [WIP]

This is a scribble post — a WIP/incomplete post, so read with the understanding that it will have holes in the knowledge or gaps.

This article just goes through my tinkering with Kubernetes on AWS.

Create a new S3 bucket to store the state of your Kubernetes clusters

aws s3 mb s3://k8sstate --region eu-west-2


aws s3 ls

Create a Route 53 hosted zone. I’m creating

aws route53 create-hosted-zone --name \
--caller-reference $(uuidgen)

dig the nameservers for the hosted zone you created

dig NS

If your internet connection already has DNS setup to the hosted zone, you’ll see the nameservers in the output:

;     IN  NS

;; ANSWER SECTION: 172800 IN NS 172800 IN NS 172800 IN NS 172800 IN NS

If your connection isn’t set up to resolve to the aws DNS (like mine), you’ll get this instead:


uk. 603 IN SOA 1403374706 7200 900 2419200 603

This means you need to do a bit of DNS hacking to get this to work. The quick and dirty method is to add one of the aws DNS hosts to your /etc/resolv.conf file.

dig using one of the aws DNS servers and see if that resolves properly

dig NS

If it does, then look for this line near the end:


Add this into /etc/resolv.conf (make sure you’re root/sudo’ed up)

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

Now try to dig the nameservers and confirm it now returns the nameservers correctly

dig NS

If that works, we can now continue

First, export your AWS credentials as environment variables (I’ve found Kubernetes doesn’t reliably pick up the credentials from the aws cli especially if you have multiple profiles

export AWS_ACCESS_KEY_ID='your key here'
export AWS_SECRET_ACCESS_KEY='your secret access key here'

You can also add it to a bash script and source it.

Create the cluster using kops. Note that the master zones must have an odd count (1, 3, etc.) since eu-west-2 only has two zones (a and b), I have to have only one zone here

kops create cluster --cloud aws --name \
--state s3://k8sstate --node-count 3 --zones eu-west-2a,eu-west-2b \
--node-size m4.large --master-size m4.large \
--master-zones eu-west-2a \
--ssh-public-key ~/.ssh/ \
--master-volume-size 50 \
--node-volume-size 50

You can also add the --kubernetes-version switch to specifically pick a Kubernetes version to include in the cluster. Recognised versions are shown at

TL;DL: Bands are:

  • >=1.4.0 and <1.5.0
  • >=1.5.0 and <1.6.0
  • >=1.6.0 and <1.7.0
  • >=1.7.0

Each with their own Debian image.

If you get this message:

error doing DNS lookup for NS records for "": lookup on no such host

It means you haven’t done the resolv.conf hack

Assuming the create completed successfully, update the cluster so it pushes the update out to your cloud

kops update cluster --yes \
--state s3://k8sstate

While the cluster starts up, all the new records will be set up with placeholder IPs. Remove your resolv.conf hack as this can affect your DNS resolution


Now you’re at a stage where the cluster is starting up but the API server is failing. Currently trying to figure that part out.


Some Myths About Linux That Cause New Users To Run Away From Linux – LinuxAndUbuntu

An attempt to bust some of the myths that surround Linux. Not a lot of them, but still some of them – some of which I see a lot in Windows communities. And the old classic “Linux is CLI only” (facepalm)

Source: Some Myths About Linux That Cause New Users To Run Away From Linux – LinuxAndUbuntu


iTWire – No highs, no lows: Linus Torvalds on 25 years of Linux

Linus has his moments. He’s well-known for having a short-temper, lashing out at a contributor, but he is also known for creating Linux which a significant number of devices these days use, in some form or another. I work with it on a daily basis both at work and at home. Without this guy, I wouldn’t be where I am now. Well, possibly I would still be here, but dealing with cough Windows cough servers instead….

On August 25, Linux creator Linus Torvalds will be in a plane somewhere between Canada and the United States as his handiwork, which has completely changed the world of computing, marks its 25th birthday.

Source: iTWire – No highs, no lows: Linus Torvalds on 25 years of Linux

Also, here’s a TED talk he did