skip to Main Content

How To Add Swap on Ubuntu 12.04

To add a swap-partition instead of swap-file: blkid /dev/sdax (get UUID) mkswap /dev/sdax (format swap partition) swapon -U xxx nano /etc/fstab (edit fstab) UUID=xxx none swap sw 0 0 (enter and save this text to make swap permanant) (then close…

Read More

grep tips

If you're looking for lines matching in files, my favorite command is: grep -Hrn 'search term' path/to/files -H causes the filename to be printed (implied when multiple files are searched) -r does a recursive search -n causes the line number…

Read More

Redirecting incoming tcp connections with redir

source: Redir redirects tcp connections coming in to a local port to a specified address/port combination like this:   The following redirects incoming web requests from to redir –laddr= –lport=80 –caddr= –cport=80 And here the same for ftp.…

Read More

Install drupal from command line with drush

cd /var/www/ drush dl drupal --drupal-project-rename=new-directory-name chown www-data:www-data new-directory-name -R chmod 755 new-directory-name -R chmod 777 new-directory-name/sites/default -R cp new-directory-name/sites/default/default-settings.php new-directory-name/sites/default/settings.php drush site-install standard --db-url=mysql:// --site-name=your_site_name --account-name=admin --account-pass=your_password --OR-- start the installation from the browser after the installation is…

Read More

upgrade ubuntu kernel

[apt-get upgrade] warning: The following packages have been kept back: linux-headers-generic-lts-quantal linux-headers-virtual linux-image-generic-lts-quantal linux-image-virtual linux-virtual To fix: sudo apt-get install linux-generic

Read More

dd-wrt administration http disabled

Open the command prompt and run telnet. Connect to <Router_LAN_IP> e.g. so in the command prompt, this would look like: telnet When asked for the username, enter root (even if you changed username in web interface) When asked for…

Read More
Back To Top