Archive for the ‘Linux’ Category

How to enable ftp on VirtualBox

You can transfer file from your local machine to virtual box via shared folders or via ftp.

By default looks like ftp is blocked on Virtual Box

Just inside your guest O/S i.e. VirtualBox Linux go to


and modify gssftp file

Change from ‘Yes’ to ‘No’ for DISABLE column as shown in below screenshot and remove value against “server_args”







You can restart ftp service via following command

/etc/init.d/xinetd restart


Categories: Linux, Oracle blogroll, Unix Tags: ,

How to check if Linux version is 32 bit or 64 bit

You can use following methods

Use this command getconf LONG_BIT

or use this on unix prompt

uname -m

Categories: Linux, Unix Tags: , ,

Setting up swapspace for Oracle

Sometime we land up in a situation where we have to increase swap space, since Oracle installation expects a certain % of swap space depending upon how much RAM you have allocated to O/S. For example if we have allocated 64 mb of RAM, then we need to specify 128 mb of swap space… again this is not always the case that you have to specify swapsize twice of RAM. It all depends on the OS etc, generally here is a little thumb rule

If you have between 1 and 2G RAM, you need to configure 1.5x RAM for swap space.
For 2 to 8G RAM, swap space has to equal RAM.
For RAM more than 8G, swap needs to be ¾ RAM.

If we need to ad swaps pace, we can either add a new partition of type swap or else we can file which can be used by O/S to be used as swap. I am going to demostrate adding swap space via adding file

How to check how much swapsize is specified via following command ?

# swapon -s


# cat /proc/meminfo

If I need to add swap space of let’s say 2 gb, i can issue following ‘dd‘ command

# dd if=/dev/zero of=/swapfile bs=1024 count=2097152

Count 2097152 is calculated via multiplying bs or blocksize of 1024 * 2048 mb


1) if=/dev/zero : Read from /dev/zero file. /dev/zero is a special file in that provides as many null characters to build storage file called /swapfile.
of=/swapfile : Read from /dev/zero write stoage file to /swapfile.
2) bs=1024 : Read and write 1024 BYTES bytes at a time.
3) count=2097152 : Copy only 2097152 BLOCKS input blocks.

The following command will setup the swap space

# mkswap /swapfile

Activate it via

# swapon/swapfile

There is one small thing still pending, once you reboot the Linux server this information is lost, in order to make it more permanent, we need to add following in /etc/fstab file, this file is primarily responsible for telling Linux that what all devices to mount, just add following line in fstab ( File System Table )

/swapfile               swap                    swap    defaults        0 0