To many of you this will sound totally stupid.

I am completely new to Linux. I installed the 64 bit Ubuntu. And then I installed this software called R which I will use to analyse large datasets.

So I used the sudo apt-get etc etc to install R and it installed fine. But how do I find out if I have installed the 32 bit or 64 bit of R? I need the 64 bit version to take advantage of my 12G of RAM.

In Windows, 64 bit OS can run 32 bit executables. Not sure how Linux works.

link|improve this question

feedback

1 Answer

up vote 2 down vote accepted

Use the 'file' command to determine the format of an executable (or any other file with a standard header). For example:

2 ~$ file /bin/bash
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
3 ~$ file /lib/libpcre.so.3.12.1
/lib/libpcre.so.3.12.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
4 ~$

In this case, both the file and the library are 64-bit.

link|improve this answer
1  
On Linux, a 64-bit OS can run 32-bit executables if you have the libraries installed. Most often you will. Further, if you installed R via Ubuntu's packaging system, it is unlikely in the extreme that it wouldn't be the 64-bit version, if you installed the 64-bit version of Ubuntu. – Jon Lasser Dec 19 '09 at 8:59
So how do I find where R was install? Again, I am a complete newb. – xiaodai Dec 19 '09 at 11:34
I finally found the R executable file. It's located in /usr/lib/R/bin/exec. It reads "R: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped" – xiaodai Dec 28 '09 at 8:54
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.