uname in chroot


When building a new kernel version in chroot environment, don't use uname -r because it will return the kernel of the running system, not the chroot. Instead, use

Enable clean URL


Do the following to enable clean URL in Debian 8:

  1. Enable rewrite module: a2enmod rewrite
  2. Open /etc/apache2/apache2.conf and look at the block <Directory /var/www/>. Then change from AllowOverride None to AllowOverride All: sed -i '/var\/www\//,/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
  3. Restart apache: service apache2 restart.

Machines without working RTC hardware


# apt-get install fake-hwclock
fake-hwclock: Save/restore system clock on machines without working RTC hardware
 Some machines don't have a working realtime clock (RTC) unit, or no
 driver for the hardware that does exist. fake-hwclock is a simple set
 of scripts to save the kernel's current clock periodically (including
 at shutdown) and restore it at boot so that the system clock keeps at
 least close to realtime. This will stop some of the problems that may

Add a shorter localhost name behind a proxy


Assume that I want qn to redirect to my localhost(

  1. Add no_proxy="localhost,,qn" in /etc/enviroment.
  2. Suffix qn in /etc/hosts(e.g. localhost qn).

Run script on startup, halt, reboot


chmod +x
cp /etc/init.d/

Install JAVA 7


apt-get -y install openjdk-7-jre
# or

486 vs 686 pae(Physical Address Extension)

The i486 version should boot on all computers (486 and higher), but is limited to accessing less than 4 GB of RAM. The i686-pae version works on Intel/AMD 686 and higher computers and includes a Physical Address Extension to permit accessing more than 4 GB of RAM. This version also supports the use of multiple CPU cores.

Preseed to install gnome

### Package selection
# Install the basic system
tasksel tasksel/first multiselect standard, desktop
tasksel tasksel/desktop multiselect gnome

Change keyboard layout to US International


The following instructions show how to change keyboard layout to US International so that you can type accent characters.


Subscribe to RSS - Debian