Sunday, November 13, 2011

Speed Up Installations, Updates and Upgrades On Ubuntu


Apt-fast is a command line tool created by Matt Parnell that run on Debian-based systems and it allows to speed up file or program download by using multiple sources.

The developer claimed that program installations or making system updates/upgrades with his tool is 26x faster than the standard tool (apt-get).

To install Apt-fast on Ubuntu 11.04/10.10/10.04, run these commands via the Terminal:

sudo add-apt-repository ppa:tldm217/tahutek.net
sudo apt-get update
sudo apt-get install apt-fast

You can now install programs or doing updates/upgrades using the Apt-fast command. Just use it as follows to install a package:

sudo apt-fast package-name

To do an upgrade or update, use one of these commands:

sudo apt-fast update
sudo apt-fast upgrade

How To Close The Terminal Without Closing The Running Program


If you start a program with the Terminal under Ubuntu, it will close once you exit the Terminal. If you want to keep an application started with the Terminal running, then follow these instructions:

1. Start any application with the Terminal. Let's take an example the Synaptic Package Manager, run it via the Terminal (Ctrl+Alt+T) with this command:

sudo synaptic

2. If you close the Terminal, Synaptic will also exit. To fix this, in the Terminal window, press Ctrl+Z, then run these commands:

disown -h %1
bg 1

3. You can now close the terminal securely, the application will stay running. That's it!

How To Speed Up Your Internet Connection On Ubuntu/Debian


In this tip, we are going to apply a simple modification that can help you speed up your Internet connection and optimize page load time. The modification will be made to the nsswitch.conf file and it is valid for Ubuntu, Debian Squeeze & Wheezy.

Open the Terminal and run one of these commands to edit the nsswitch.conf file:

sudo gedit /etc/nsswitch.conf
or
sudo nano /etc/nsswitch.conf


Locate this line:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

And add just below it this line:

hosts:          files dns

Save now the file and close it.



You will now see an improvement in your Internet connection speed, but don't expect a major improvement. Good Luck!

How To Disable USB Ports On Ubuntu/Debian


Despite the many advantages of USB storage devices, there is a major downside called "security". Some users can use this tiny and portable device to copy sensitive data or fill your computer with viruses and spywares. 

To prevent unauthorized data transfers via USB storage devices on Ubuntu or Debian, you can follow the instructions given below to disable USB ports of your computer.

Instructions

1. Under Ubuntu or Debian-based system, open the Terminal and edit this file:

sudo gedit /etc/modprobe.d/blacklist.conf
or
sudo nano /etc/modprobe.d/blacklist.conf


2. Add now the following two lines:

# Block access to USB
blacklist usb_storage


3. Save the file and close it, then restart your system. Your USB ports are now disabled.

4. To enable USB ports, repeat the same steps and in step2, comment the "blacklist usb_storage" line as follows:

# blacklist usb_storage

That's it!

Get a 3D Animated Logon Screen on Ubuntu 11.10 (LightDM)

The developer of LightDm, Robert Ancell, created a 3D animated version of the login screen (LightDM) of Ubuntu 11.10 (Oneiric Ocelot) called Crowd Greeter. We will help you install and enable this 3D animation by following these simple steps:

1. Open the terminal and install Crowd Greeter with these commands:

sudo add-apt-repository ppa:lightdm-team/crowd-greeter
sudo apt-get update
sudo apt-get install crowd-greeter

2. Once the installation is finished, edit now the "lightdm.conf" file with this command:

sudo gedit /etc/lightdm/lightdm.conf

3. Replace:

 greeter-session=unity-greeter
 with
 greeter-session=crowd-greeter

Save and close the file, then reboot your system to test the logon screen:



5. To login, click on the moving creature having your username to stop it, submit your password and press Enter:


Enjoy!

How To Remount A USB Stick Without Removing And Reinserting - Ubuntu/Debian


When using a USB flash drive for example, with programs like GParted or the Disk Utility under Debian, it may happen that the action performed on your USB stick requires from you to unplug and reinsert again the device.

To overcome this annoying situation, you can simply open the Terminal and run this command to remount your USB drive without touching the device:

eject /dev/sdb; sleep 1; eject -t /dev/sdb

Note: Tested under Ubuntu 11.10 and Debian Squeeze, but the command also applicable on other Linux-based distros.

That's it!

How To Encrypt / Decrypt Files With Only Two Commands - Ubuntu/Debian


In this tip, we will see how to easily and quickly encrypt and decrypt files using very simple commands on Ubuntu or Debian. Let's first install ccrypt on Ubuntu using this command:

sudo apt-get install ccrypt

For Debian, run these commands:

su -
apt-get install ccrypt

To encrypt a file, cd to its folder and run this command:

ccrypt file_name

Replace "file_name" with the name of your file. You will be asked to submit a password two times. The encrypted file will have the .cpt extension.

To decrypt the file, use now this command and provide the password you assigned to it:

ccrypt -d file_name

That's it!