Monthly Archives: February 2012

Best Multithreaded Download Manager

My favorite download manager is IDM. In Linux you cannot run IDM except through Wine or VM.

I prefer to use “axel” which is a multi-threaded downloader.

In ubuntu,

sudo  apt-get  install  axel

Then use it as follows,

axel  -n  <no._of_segments_upto_256>   <download_link>

e.g.

axel  -n  8  http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.2.tar.bz2

Note: You can use “-a “  for alternate download-progress bar

Installing ” .bin ” File in ubuntu …

Step 1:    Go to the directory where the  .bin  file is, using cd command

Step 2:    Make the file executable.

sudo  chmod  +x  file_name.bin

Step 3:    Install the file.

sudo  ./file_name.bin 

Hard Disk Partitioning …

Here I want to share a basic concept regarding hard disk partitioning and its layout. A hard disk can have at most four partitions which we all refer as “Primary Partition”.

Primary 1

Primary 2

Primary 3

Primary 4

But in real we may have more than four partitions in our laptops or PCs. Then how is it possible? Here comes the concept of “Extended Partition”. You can make any one of the four partitions as an extended partition and then repartition it according to your needs. These partitions are which we refer as “Logical Partition”.

Primary1

Primary2

Logical 1

Logical 2

Logical 3

Logical 4

In Linux, hard disks are identified as

/dev/hda    (where a stands for the 1st hard disk)

or

/dev/sda     (in recent linux systems sda is used instead of hda)

Now, sda1, sda2, sda3, sda4 are reserved for four primary partitions and logical partitions start with sda5 onwards. According to above layout, partition numbering in Linux should be

/dev/sda
     /dev/sda1               Primary
     /dev/sda2               Primary
     /dev/sda3               Extended
/dev/sda5          Logical
/dev/sda6          Logical
/dev/sda7          Logical
/dev/sda8          Logical

Note that sda4 is not used as it is reserved.

Configure Your ubuntu behind a Proxy Server

If you are behind a proxy server to connect to the Internet, you have to configure your ubuntu box. In windows, you generally go to the “Control Panel” and then “Internet Options” and set the IP addresses there (or in IE, under Tools –> Internet Options). In ubuntu, you can also set the proxy addresses in Firefox ( under Edit -> Preferences ->Advanced ->Network-> Settings). But this will not set the proxy for the whole system; as a result you cannot use apt-get for package management.

So for system-wide configuration, under

System -> Preferences -> Network Proxy

select “manual proxy configuration” and enter the values there.

Finally, press “Apply System-Wide” button, it will ask for your password twice.

That’s it.

A Guide of Using Git behind a Proxy Server …

Step 1 : Install corkscrew

# yum install corkscrew

for ubuntu, $ sudo apt-get install corkscrew

Step 2 : Write a script named git-proxy.sh and add the following

#!/bin/sh
exec corkscrew <name of proxy server> <port> $*

# #<name_of_proxy_server> is the ip address of the server

Step 3 : Make the script executable

# chmod +x git-proxy.sh

Step 4 : Set up the proxy command for GIT by setting the environment variable

# export GIT_PROXY_COMMAND=”/<path>/git-proxy.sh”

Now use the git commands,such as
git clone git://git.xilinx.com/linux-2.6-xlnx.git

Install ubuntu in an Existing Windows System without Loosing any data …

It may be a situation where you have a PC with windows installed and lots of data on other partitions and you need to install ubuntu on it without loosing any data (i.e. you do not want to format any partition). Here is what you can do ……

  •  Boot using the ubuntu live-cd
  •  Use the option — ” Try ubuntu without installing “
  •  Your live-cd environment is now ready
  •  Run the application ” gparted
  •  gparted is a fantastic partition editor. Here you can resize any   existing partition to make some free space for installing ubuntu without loosing any data.
  • Right click on the partition you wish to resize, select “Resize”. Resize it according to your needs and “Apply”
  • That’s it. You now have free space where you can install ubuntu.
  • Now start the installer by clicking the icon on the desktop.

After a Fresh Installation of Ubuntu ….

By default, ubuntu doesn’t provide proprietary multimedia codecs. As a result you cannot play you favorite mp3 songs or avi, divx, mkv, mp4 etc. videos. So after a fresh installation of ubuntu, set up your Internet connection and install some packages by issuing the following commands on the terminal.

sudo apt-get update
sudo apt-get install ubuntu-restricted-extras

It will install all the multimedia codecs including support for rar file, Microsoft fonts, flash plugin etc.

That’s it. Enjoy your ubuntu box ……

Additional

  • If you are a fan of VLC, then just let it be installed

sudo apt-get install vlc

  • By default, you can compile your C codes (using gcc), but for C++ you have to install C++ support packages for gcc.

sudo apt-get install build-essential

Then you can compile your favorite C++ codes using  g++ .