Linux general

Change keyboard layout

loadkeys hu

Use screen command


Run command: CTRL+A +
  • C: new
  • X: close
  • N: next
  • P: Previous
  • ": select from list
  • A: previous window viewed
  • S: split horizontal
  • |: split vertical 

Disable autostart

update-rc.d -f apache2 remove

Or Enable autostart

update-rc.d apache2 defaults

Sample init script (/etc/init/blah).

#! /bin/sh
# /etc/init.d/blah
# Some things that run always
touch /var/lock/blah
# Carry out specific functions when asked to by the system
case "$1" in
    echo "Starting script blah "
    echo "Could do more here"
    echo "Stopping script blah"
    echo "Could do more here"
    echo "Usage: /etc/init.d/blah {start|stop}"
    exit 1
exit 0



Display file times

stat <file>

List disks by uuid

ls -al /dev/disk/by-uuid/*

Or for just one uuid
readlink /dev/disk/by-uuid/f16453f1-990e-4f51-923c-73e8df60fc9c

Display soundcard chipset

cat /proc/asound/card0/codec#* | grep Codec


Print STDOUT and STDERR to screen and file

./ 2>&1 | tee out.txt


Disable IPv6 in Debian Lenny
Create the file /etc/modprobe.d/00local and insert the two lines like below, than restart networking.

echo "alias net-pf-10 off" >> /etc/modprobe.d/00local
echo "alias ipv6 off" >> /etc/modprobe.d/00local