I experienced an elevated level of frustration today at grep’s inability to find what I was looking for in a plain text file? It was particularly irritating as I have, like all years prior, made some new years resolutions and one of them was to not become irate too quickly.

As things go however, the end result taught me some valuable new things!

The problem

I receive a bunch of fairly large XML files that I need to search for particular lines of text. ‘No problem’ I say! Linux command line was built for this and grep is the perfect tool for the job in this case.

Continue reading

Ubuntu and Google Chrome

The last few days, I’ve been repeatedly getting the following when I do an apt-get update on my Ubuntu Desktop (14.04, if that matters).

W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.

Some light reading and specifically this post on OMGUbuntu, coupled with some instructions in the comments section, led me to the following solution which works for now.
Continue reading

ShrewSoft Logo

For those of us that need to connect to clients/partners that use the Cisco VPN utility, getting it to work on Linux can sometimes be a bit of a mission. Luckily the Open Source World always has one or more alternatives. In this case, ShrewSoft VPN.

Follow the steps in this guide carefully and you’ll have the client working and running in no time.
Please note, this post is an adaption of this StackExchange question/answer.
Continue reading

Java Logo

I had the issue today of not being able to install Java as can be seen below. (I snipped a lot of the garbage that we don’t need to see for the solution)

hendri@techedemic:~$ sudo apt-get install oracle-java9-installer 
Do you want to continue? [Y/n] y
Setting up oracle-java9-installer (9b81+9b81arm-1~webupd8~1) ...
Downloading Oracle Java 9...
--2015-09-30 14:35:17--  http://www.java.net/download/jdk9/archive/b81/binaries/jdk-9-ea-bin-b81-linux-x64-09_sep_2015.tar.gz
Connecting to connected.
Proxy request sent, awaiting response... 403 Sorry, not allowed to fetch that type of file: jdk-9-ea-bin-b81-linux-x64-09_sep_2015.tar.gz
2015-09-30 14:35:17 ERROR 403: Sorry, not allowed to fetch that type of file: jdk-9-ea-bin-b81-linux-x64-09_sep_2015.tar.gz.
download failed
Oracle JDK 9 is NOT installed.

Continue reading

In a previous article, Linux – Enable auto-login via SSH, I explained how you can eliminate the need to enter your password every time you log on to a specific host.

You might run into a problem where you get the following error message:
“Agent admitted failure to sign using the key”

You then need to type in the password again. Pointless.

To fix it is quite simple:
Continue reading

Ubuntu text boot

First things first – remember, always back up important system files before editing!

If you want to view the tradional kernel message output when booting into Ubuntu, you can do it as follows:

Edit /etc/default/grub and edit the following line:


Change it to:
Continue reading

apt-get logo

Experience the following?:

Hit http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en    
Hit http://us.archive.ubuntu.com trusty-backports/restricted Translation-en    
Hit http://us.archive.ubuntu.com trusty-backports/universe Translation-en      
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US                 
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US           
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US           
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US             
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/i18n/Translation-en  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.

The cause is likely a corrupt package file previously downloaded. You can fix it by doing the following:

sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

apt-get logo

More often than not, I have to deploy a system which will not have access to the internet or an apt-proxy/apt-cacher installations somewhere. This means I cannot install new packages which might be required at a later stage.

I’ll use an example install of postgresql to explain how you can get all the required files (specifically for your machine) and deploy it on your server.
Continue reading

Enter your Ubuntu credentials

This is an update of a previous post, found here. I’ve added a section to the bottom which explains how you can connect to the same session each time.

If you need to connect to a Linux machine, and in the scope of this guide, Ubuntu 14.04 (I’m sure this guide should be fine for earlier versions as well), then your options include:

  • Pure and simple SSH – The admin’s super tool! (just install openssh-server – works every time!)
  • VNC – I don’t like this method because you need to install software on your client AND server
  • XRDP – This still involves VNC to some degree but you can use the normal Windows Remote Desktop Client

The latter is the one I’ll guide you through here. Continue reading