Debian/Ubuntu Tips and Tricks

Debuntu

Debian/Ubuntu Tips and Tricks

How-To: Bash Parameter Expansion and String Manipulation

Posted by chantra on 19th February 2013

Last time we saw how bash can help us in handling default values out of the box using parameter expansion. This time we will see how basic string operations (nonetheless common and useful) can also be achieved using bash.

There is many ways to do string manipulation with bash, like finding a filename extension using expr, separating the directory part from a filename using dirname and basename.... or even more sophisticated ones based on regex, sed....

Why using a sledgehammer to crack a nut when you could use bash builtin functionalities!

Read the rest of this entry »

Tags: , , ,
Posted in Administration, HowTo, Softwares, System | No Comments »

How-To: Bash Parameter Expansion and Default Values

Posted by chantra on 28th January 2013

Bash is a sh-compatible command language interpreter that executes commands read from the standard input or from a file.
There is much more to bash than running a sequence of commands, one of the features bundled with bash is parameter expansion.

Any shell user has most likely used shell variables, be it $1 or $myvar, to save values... but there is more to it. This tutorial will cover a subset of shell parameter expansion that can become really handy and save you a lot of time.

Read the rest of this entry »

Tags: , , ,
Posted in Administration, HowTo, Softwares, System | No Comments »

Mastering Top

Posted by chantra on 22nd January 2013

top is most likely one of the most known Linux command and also one of the most used one, however most people do not take full advantage of its capabilities.

In this tutorial, we will see a few usages of top that will make allow you to get more out of it.

Read the rest of this entry »

Tags: , ,
Posted in Administration, HowTo, System | 4 Comments »

How-To: OpenVPN on Debian Squeeze with Username/Password authentication

Posted by chantra on 16th January 2013

OpenVPN is a SSL based VPN software that runs on most OS. It is simple to install and run.

In this tutorial, I will go over the steps needed to configure OpenVPN on Debian Squeeze to provide a full VPN tunnel, this is particularly useful when you want to access internet from non-trusted networks such as free hotspots...

There are many ways of setting up OpenVPN, a common one is to use a unique certificate for each users. Another one is to have each user authenticate with a username/password.

In this article, we will be setting OpenVPN to authenticate users using PAM.

Read the rest of this entry »

Tags: , , , ,
Posted in Administration, HowTo, Networking, Softwares, System | No Comments »

How-To: Running Munin 2.0 on Debian Squeeze (6.0)

Posted by chantra on 7th January 2013

Munin 2.0 has been released and a .deb package has even been backported to Debian Squeeze!.

Version 2.0 comes with a bunch of new features and scalability improvements. This how-to will explain how to install and configure Munin 2.0 using Apache and mod-fcgid on Debian Squeeze.

Read the rest of this entry »

Tags: , , ,
Posted in Administration, HowTo, System | No Comments »

How-To: Change boot runlevel with Grub2

Posted by chantra on 14th December 2012

Linux start up behaviour is driven by the so-called runlevels. It will use the default value provided in /etc/inittab for some systems (Debian...), or /etc/init/rc-sysinit.conf or some others (Ubuntu...).

This tutorial will show how to change the runlevel used during boot by modifying Grub2 start up prompt.

Read the rest of this entry »

Tags: , ,
Posted in Administration, HowTo, System | No Comments »

How-To: Tmux a Terminal Multiplexer

Posted by chantra on 7th December 2012

As a sysadmin, most of my time is spent working on remote machines and different task. tmux is a terminal multiplexer, meaning it allows you to run multiple terminals in the same windows.

This tutorial will explain the basics features of tmux that should help you be more productive with your every day task.

Read the rest of this entry »

Tags: ,
Posted in Administration, HowTo, System | 2 Comments »

How-To: Log HAProxy messages only once

Posted by chantra on 27th January 2012

When enabling logs with HAProxy on a busy web site, hard disk space can quickly become a scarce resource.

The reason is that, most of the time, HAProxy is set to use local0 facility which tend to write logs to a bunch of files in /var/log such as messages...

Thanks to rsyslog, we will be able to canalize those logs to a more appropriate location and only once, saving a bunch of disk space.

This tutorial will go over the steps required to accomplish this set up.

Read the rest of this entry »

Tags: ,
Posted in Administration, HowTo, System | 6 Comments »

How-To: WMware Workstation 7.1 on Ubuntu Maverick Meerkat 10.10

Posted by chantra on 13th July 2010

There were some changes in the latest kernel release (2.6.34) that prevent VMware's VMCI Socket module to compile on Ubuntu 10.10 (Maverick Meerkat).

Read the rest of this entry »

Tags: ,
Posted in HowTo, Virtualization | No Comments »

How-To: Set up a L2TP over IPSec VPN using a Radius backend — page 3

Posted by chantra on 18th June 2010

This entry is part 3 of 3 in the series How-To: Set up a L2TP over IPSec VPN using a Radius backend

Using freeradius for authentication

Here I am going to consider that the freeradius server is set up correctly, meaning that you can already authenticate your users with freeradius using radtest utility.

Read the rest of this entry »

Tags: , , , ,
Posted in Administration, HowTo, Networking, System | No Comments »