RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

Linux tutorials and more...


Easy way to create a Debian package and local package repository

This article describes a simple way on how to create a home made debian package and include it into a local package repository. Although we could use a existing Debian/Ubuntu package, we will start from scratch by creating our own minimalistic unofficial debian package. Once our package is ready, we will include it into our local package repository. This article illustrates very simplistic approach of creating debian package, however it may serve as a template in many different scenarios.

Creating a binary executable

First we need to create some simple program, compile it and test it. Our program will do nothing else just print "linuxconfig.org" on the screen. Here is a code:

#include <iostream> 
 
int main()
{
  using namespace std;
  cout << "linuxconfig.org\n";
 
return 0;
}

Save the above code as linuxconfig.cc. At this point make sure that you have compiler installed on your system by executing:

Share this linux post:

Submit Easy way to create a Debian package and local package repository in Delicious Submit Easy way to create a Debian package and local package repository in Digg Submit Easy way to create a Debian package and local package repository in FaceBook Submit Easy way to create a Debian package and local package repository in Google Bookmarks Submit Easy way to create a Debian package and local package repository in Stumbleupon Submit Easy way to create a Debian package and local package repository in Technorati Submit Easy way to create a Debian package and local package repository in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Easy way to create a Debian package and local package repository

 

Batch image resize using linux command line

Question:

How can I batch resize of multiple images using ubuntu linux command line? Is there any tool which would help me with this and/or is there GUI application which makes image resizing easy. I have hundreds of images and therefore I'm in need of such a tool.

Answer:

The best and the easiest way to resize multiple images using linux command line is to use imagemagick tools. First you need to install imagemagick package:

# apt-get install imagemagick

Once installed you will have multiple image processing tools available to our disposal, such as convert, identify and etc.

Share this linux post:

Submit Batch image resize using linux command line in Delicious Submit Batch image resize using linux command line in Digg Submit Batch image resize using linux command line in FaceBook Submit Batch image resize using linux command line in Google Bookmarks Submit Batch image resize using linux command line in Stumbleupon Submit Batch image resize using linux command line in Technorati Submit Batch image resize using linux command line in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Batch image resize using linux command line

 

Calculate column average using bash shell

Question:

Is there a way to calculate a average of a single column stored in a text file? For example my file contains:

$ cat file.txt
line1 4.5
line2 6

how do I get 5.25 ?

Answer:

One way to do this is to use combination of bash for loop, cut, echo and bc commands. Execute the code below, assuming that file.txt is in your current working directory:

Share this linux post:

Submit Calculate column average using bash shell in Delicious Submit Calculate column average using bash shell in Digg Submit Calculate column average using bash shell in FaceBook Submit Calculate column average using bash shell in Google Bookmarks Submit Calculate column average using bash shell in Stumbleupon Submit Calculate column average using bash shell in Technorati Submit Calculate column average using bash shell in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Calculate column average using bash shell

 

How do I ping a specific port of a remote server?

Question:

How do I ping a specific port of a remote server? I need to find out whether the port on the remote server is open.

Answer:

ping utility does not allow you to ping specific port on you remote server. To see whether a specific port is open on a remote server you can use port-scanner such as nmap or simply try connect to a socket ( IP-address:port ) using telnet. In the example below we test whether a port number of TCP port 80 is open a host google.com:

# nmap -p 80 -sT google.com
or
# nmap -p 80 google.com

Share this linux post:

Submit How do I ping a specific port of a remote server? in Delicious Submit How do I ping a specific port of a remote server? in Digg Submit How do I ping a specific port of a remote server? in FaceBook Submit How do I ping a specific port of a remote server? in Google Bookmarks Submit How do I ping a specific port of a remote server? in Stumbleupon Submit How do I ping a specific port of a remote server? in Technorati Submit How do I ping a specific port of a remote server? in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: How do I ping a specific port of a remote server?

 

Remove all files and directories owned by a specific user

Question:

Hi, how do I remove all files owned by a certain user. What I need is to find all files and directories and remove them system wide.

Answer:

The tool which may come handy to is a find command. Find command will find all files and directories owned by a specific user and execute rm command to remove them. The following command will find and remove all files within /home/ directory owned by a user "student". The following command is executed as root user:

NOTE: replace /home with your target directory.

# find /home/ -user student -exec rm -fr {} \;

 

Share this linux post:

Submit Remove all files and directories owned by a specific user in Delicious Submit Remove all files and directories owned by a specific user in Digg Submit Remove all files and directories owned by a specific user in FaceBook Submit Remove all files and directories owned by a specific user in Google Bookmarks Submit Remove all files and directories owned by a specific user in Stumbleupon Submit Remove all files and directories owned by a specific user in Technorati Submit Remove all files and directories owned by a specific user in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Remove all files and directories owned by a specific user

 

Iptables to reject all INPUT and OUTPUT except specific hosts

Question:

I have created a zone in my lan, where i have given 11 servers a dns address. But someone has connected 3 more(these three have only IP, not dns address), and i dont want to remove all servers to find out which ones it is.

Is there a way to make sure that only the servers with a dns-address provided by me is granted access to the internet? (block input and output)

Answer:

Reject all outgoing traffic from source IP address different than 222.111.111.222

iptables -A OUTPUT -t filter ! -s 222.111.111.222 -j REJECT

Share this linux post:

Submit Iptables to reject all INPUT and OUTPUT except specific hosts in Delicious Submit Iptables to reject all INPUT and OUTPUT except specific hosts in Digg Submit Iptables to reject all INPUT and OUTPUT except specific hosts in FaceBook Submit Iptables to reject all INPUT and OUTPUT except specific hosts in Google Bookmarks Submit Iptables to reject all INPUT and OUTPUT except specific hosts in Stumbleupon Submit Iptables to reject all INPUT and OUTPUT except specific hosts in Technorati Submit Iptables to reject all INPUT and OUTPUT except specific hosts in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Iptables to reject all INPUT and OUTPUT except specific hosts

 

Enabling Ubuntu compiz 3D cube Desktop Effect

If you ever get bored of your ordinary default Ubuntu desktop or you feel that you do not utilize your Graphic card the way you should, you can try to enable Ubuntu compiz 3D cube Desktop Effect the give your desktop an extra spark. This article will provide you with a step-by-step configuration on how to enable Ubuntu compiz 3D cube Desktop Effect.

Step 1: Installation of VGA driver

You may skip this step if you have already installed restricted display drivers from Ubuntu's PPA repository. This step is optional even with a default Ubuntu installation. I recommend to proceed with Step 2 and let Ubuntu system will attempt to detect your VGA card and install appropriate VGA drivers for your card automatically. If that fails come back to Step 1 and do it manually as described below.

Installation of nVidia restricted driver

First add ubuntu PPA repository:

$ sudo add-apt-repository \
ppa:ubuntu-x-swat/x-updates
$ sudo apt-get update

Share this linux post:

Submit Enabling Ubuntu compiz 3D cube Desktop Effect in Delicious Submit Enabling Ubuntu compiz 3D cube Desktop Effect in Digg Submit Enabling Ubuntu compiz 3D cube Desktop Effect in FaceBook Submit Enabling Ubuntu compiz 3D cube Desktop Effect in Google Bookmarks Submit Enabling Ubuntu compiz 3D cube Desktop Effect in Stumbleupon Submit Enabling Ubuntu compiz 3D cube Desktop Effect in Technorati Submit Enabling Ubuntu compiz 3D cube Desktop Effect in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Enabling Ubuntu compiz 3D cube Desktop Effect

 

Changing vmware vmnet bridged physical network interface

Question:

How do I change vmware bridged vmnet interface from eth0 to wlan0?

Answer:

During the vmware installation / configuration the vmware-config.pl script asks:

Your computer has multiple ethernet network interfaces available: eth0, eth1.
Which one do you want to bridge to vmnet0? [eth0]

This configuration actually refers to a vmware configuration file /etc/vmware/locations.

Share this linux post:

Submit Changing vmware vmnet bridged physical network interface  in Delicious Submit Changing vmware vmnet bridged physical network interface  in Digg Submit Changing vmware vmnet bridged physical network interface  in FaceBook Submit Changing vmware vmnet bridged physical network interface  in Google Bookmarks Submit Changing vmware vmnet bridged physical network interface  in Stumbleupon Submit Changing vmware vmnet bridged physical network interface  in Technorati Submit Changing vmware vmnet bridged physical network interface  in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Changing vmware vmnet bridged physical network interface

 

Apache .htaccess directory access protection

If you would ever need to shield your website from a public access, know that apache .htaccess file provides a simple and yet powerful way to accomplish it. This article teaches you just that in simple to follow steps.

As a first step we need to make sure that our website configuration will read .htaccess files. To do that check your httpd.conf file or your website apache setting whether it contains a directive:

 AllowOverride ALL

On a Ubuntu / Debian system this directive defaults to “none”.

Options Indexes FollowSymLinks MultiViews
AllowOverride ALL
Order allow,deny
allow from all

If have made some changes restart your apache web server:

Share this linux post:

Submit Apache .htaccess directory access protection in Delicious Submit Apache .htaccess directory access protection in Digg Submit Apache .htaccess directory access protection in FaceBook Submit Apache .htaccess directory access protection in Google Bookmarks Submit Apache .htaccess directory access protection in Stumbleupon Submit Apache .htaccess directory access protection in Technorati Submit Apache .htaccess directory access protection in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Apache .htaccess directory access protection

 

Extract unique IP addresses from an apache log

Question:

Hi how do I extract all IP addresses from my httpd log. I need to extract only unique IP addresses from my apache log file.

Here is a my sample apache log entry:

XXX.64.70.XXX - - [26/Mar/2011:00:28:23 -0700] "GET / HTTP/1.1" 403 4609 
"-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like 
Gecko) Chrome/10.0.648.204 Safari/534.16"

Answer:

Upon the apache log entry format you have supplied, the easiest way to extract in IP addresses from this kind of apache log entries is to use a combination of awk, sort and uniq commands. First we need to get a long list of IP addresses. This can be done with awk command:

Share this linux post:

Submit Extract unique IP addresses from an apache log in Delicious Submit Extract unique IP addresses from an apache log in Digg Submit Extract unique IP addresses from an apache log in FaceBook Submit Extract unique IP addresses from an apache log in Google Bookmarks Submit Extract unique IP addresses from an apache log in Stumbleupon Submit Extract unique IP addresses from an apache log in Technorati Submit Extract unique IP addresses from an apache log in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Extract unique IP addresses from an apache log

 

Installing Linux MINT 10 and partitioning harddrive

Question:

Hey, I'm new to this, I'm trying to install Linux MINT 10 to my Compaq Presario which has already crashed with Windows Vista on it. I used UNetBootin on my USB flash drive, the laptop will let me run MINT but when I try to install it my root system isn't defined.

So with that being said I'm trying to delete all partitions on my laptop and start fresh. How do I do that !?

Answer:

If you do not intent to have a dual boot ( windows and linux on the same box ) you may just simply remove all partitions on your hard drive and create new partitions just for Mint 10. From your question this appears to be exactly what you want. Therefore, you have two options:

Share this linux post:

Submit  Installing Linux MINT 10 and partitioning harddrive in Delicious Submit  Installing Linux MINT 10 and partitioning harddrive in Digg Submit  Installing Linux MINT 10 and partitioning harddrive in FaceBook Submit  Installing Linux MINT 10 and partitioning harddrive in Google Bookmarks Submit  Installing Linux MINT 10 and partitioning harddrive in Stumbleupon Submit  Installing Linux MINT 10 and partitioning harddrive in Technorati Submit  Installing Linux MINT 10 and partitioning harddrive in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Installing Linux MINT 10 and partitioning harddrive

 

Date manipulation with yest

yest is a great tool which allows user to do some complex date manipulations by employing ab easy to understand syntax. It is not a competitor to a date command, rather it is a handy tool which has some features you may not find in date command. Name of the yest command is derived from its default no argument output which is yesterday’s date.

Share this linux post:

Submit Date manipulation with yest in Delicious Submit Date manipulation with yest in Digg Submit Date manipulation with yest in FaceBook Submit Date manipulation with yest in Google Bookmarks Submit Date manipulation with yest in Stumbleupon Submit Date manipulation with yest in Technorati Submit Date manipulation with yest in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Date manipulation with yest

 

Installation of VMware-server 2.0.2 on Ubuntu Linux 10.04 ( lucid lynx )

This article is a step-by-step guide of VMware-server 2.0.2 installation on Ubuntu Linux Lucid Lynx 10.04. This guide assumes that a reader already obtained a copy of VMware-server 2.0.2 installation pack along with valid serial number. All commands below are executed as root user. To change to root user use:

$ sudo bash

Environment:

  • 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
  • gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
  • VMware-server-2.0.2-203138.i386.tar.gz

Share this linux post:

Submit Installation of VMware-server 2.0.2 on Ubuntu Linux 10.04 ( lucid lynx ) in Delicious Submit Installation of VMware-server 2.0.2 on Ubuntu Linux 10.04 ( lucid lynx ) in Digg Submit Installation of VMware-server 2.0.2 on Ubuntu Linux 10.04 ( lucid lynx ) in FaceBook Submit Installation of VMware-server 2.0.2 on Ubuntu Linux 10.04 ( lucid lynx ) in Google Bookmarks Submit Installation of VMware-server 2.0.2 on Ubuntu Linux 10.04 ( lucid lynx ) in Stumbleupon Submit Installation of VMware-server 2.0.2 on Ubuntu Linux 10.04 ( lucid lynx ) in Technorati Submit Installation of VMware-server 2.0.2 on Ubuntu Linux 10.04 ( lucid lynx ) in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Installation of VMware-server 2.0.2 on Ubuntu Linux 10.04 ( lucid lynx )

 

Automatic HTML form submission using WWW::Mechanize

Here is a short tip on how to automatically submit a HTML form using a Linux command line and perl script. For this example we would need a WWW::Mechanize perl module and some basic PHP website. Let's start with simple PHP website. The website will consist of two files:

form.php:

<form action="submit.php" method="post">
First Name: <input name="fname" type="text" />
Last Name: <input name="lname" type="text" />
<input type="submit" />
</form>

Share this linux post:

Submit Automatic HTML form submission using WWW::Mechanize in Delicious Submit Automatic HTML form submission using WWW::Mechanize in Digg Submit Automatic HTML form submission using WWW::Mechanize in FaceBook Submit Automatic HTML form submission using WWW::Mechanize in Google Bookmarks Submit Automatic HTML form submission using WWW::Mechanize in Stumbleupon Submit Automatic HTML form submission using WWW::Mechanize in Technorati Submit Automatic HTML form submission using WWW::Mechanize in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Automatic HTML form submission using WWW::Mechanize

 

Rename all files and prefix a time-stamp to all file names

Question:

Hi is there a way to rename all files in a directory and prefix a time-stamp to all files? thanks

Answer:

For that you can use a following set of commands:

First declare a time-stamp variable in a format to fit your needs. For example:

$ TS=$( date +%Y%m%d%H%M )

This will create a bash variable called TS with a value of current date and time:

Share this linux post:

Submit Rename all files and prefix a time-stamp to all file names in Delicious Submit Rename all files and prefix a time-stamp to all file names in Digg Submit Rename all files and prefix a time-stamp to all file names in FaceBook Submit Rename all files and prefix a time-stamp to all file names in Google Bookmarks Submit Rename all files and prefix a time-stamp to all file names in Stumbleupon Submit Rename all files and prefix a time-stamp to all file names in Technorati Submit Rename all files and prefix a time-stamp to all file names in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Rename all files and prefix a time-stamp to all file names

 

Wordpress Installation on Ubuntu Linux with Apache and MySQL

Wordpress installation on ubuntu linuxThis article describes an installation of Wordpress on a Ubuntu Linux system using Apache web-server and MySQL database. Wordpress is an CMS ( Content Management System ), mostly used as a blog publishing web application. Wordpress is written in  PHP language and uses MySQL database to store data.

Preliminary notes about the system used for this Wordpress installation:

  • Ubuntu Linux 10.04 - Worpress 3.1 ( Reinhardt )
  • Kernel 2.6.32-21-generic #32-Ubuntu SMP
  • mysql  Ver 14.14 Distrib 5.1.41
  • Apache/2.2.14 (Ubuntu)
  • PHP 5

Share this linux post:

Submit Wordpress Installation on Ubuntu Linux with Apache and MySQL in Delicious Submit Wordpress Installation on Ubuntu Linux with Apache and MySQL in Digg Submit Wordpress Installation on Ubuntu Linux with Apache and MySQL in FaceBook Submit Wordpress Installation on Ubuntu Linux with Apache and MySQL in Google Bookmarks Submit Wordpress Installation on Ubuntu Linux with Apache and MySQL in Stumbleupon Submit Wordpress Installation on Ubuntu Linux with Apache and MySQL in Technorati Submit Wordpress Installation on Ubuntu Linux with Apache and MySQL in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.
Add a comment

Read more: Wordpress Installation on Ubuntu Linux with Apache and MySQL

 

Page 2 of 9