How-To Change Hostname Permanently on Debian/Ubuntu

How-To Change Hostname Permanently on Debian/Ubuntu

Debian based systems use the file /etc/hostname to read the hostname of the computer at boot time and set it up using the init script /etc/init.d/

We can now edit the file /etc/hostname and change the hostname and then run:

/etc/init.d/ start


1. sudo gedit /etc/hostname
2. Save the file with the hostname you like to set
3. sudo /etc/init.d/ start

Reset MySQL root password Ubuntu Linux

Enter the following lines in your terminal.

First lets Stop MySQL server

sudo /etc/init.d/mysql stop

Now lets open the mysqld configuration.

sudo mysqld –skip-grant-tables &

Login to MySQL as root.
mysql -u root mysql

Replace “MYNEWPASSWORD” with your new password!


How to setup “TOR & Privoxy & Vidalia on Ubuntu 10.04”

What is TOR?

TOR is a , Second-generation onion routing, System, allowing its  users to communicate anonymously on the Internet.

  • How to setup “TOR & Privoxy & Vidalia on Ubuntu 10.04”

1. Add the Lucid repository in Maverick and install TOR, Privoxy and Vidalia:

echo “deb experimental-lucid main” | sudo tee -a /etc/apt/sources.list

sudo apt-key adv –keyserver –recv-keys 886DDD89

Then, along with TOR you may also want to install Vidalia (a GUI for TOR) and Privoxy (non-caching web proxy with advanced filtering capabilities):

sudo apt-get update

sudo apt-get install vidalia privoxy tor

This is optional – if you want to use TOR as a SOCKS5 proxy, also follow these steps

Edit the Privoxy config file:

sudo gedit /etc/privoxy/config

And paste this at the bottom of the file, then save it:

forward-socks5 / .

Yes, there’s a space and a dot at the end.

3. Restart TOR and Privoxy to complete the process:

sudo /etc/init.d/tor restart

sudo /etc/init.d/privoxy restart

How to Monitor Apache Information in Real Time with “GoAccess”

After playing around with Apachetop. Today I came across another similar program called GoAccess, which is a utility that allows you to analyze log files from your web server (Apache)

Setting up GoAccess for “Debian-Based Distributions”

Before we install GoAccess, Let’s first install some required dependency’s Launch the terminal and run this command:

sudo apt-get install libncurses5-dev libglib2.0-dev libgeoip-dev

Once thats installed, we now what to install GoAccess

GoAccess is available under Ubuntu natty. You should be able to add a line to your /etc/apt/sources.list like this:

nano /etc/apt/sources.list
deb sid main
sudo apt-get update
sudo apt-get install goaccess