Author Archives: Slash Rahul

Talk at Mini-Debian Conf on Raspbian

Talk at Mini-Debian Conf on Raspbian

It was my first time to visit IIT Bombay one of the top tier college in India which is well known in entire globe for its reputation, A mini-debian conf was organised by Debian contributors and FOSS enthusiastic from Mumbai.

The event which took place at the Indian Institute of Technology Bombay (IIT Bombay) was opened by Professor Kumar Appiah from the Department of Electrical Engineering at IIT Bombay, following the inauguration Venkatesh Hariharan started off the day with a keynote. The day two keynote was given by Kannon Moudgalya from the Department of Chemical Engineering at IIT Bombay and is also head of the Free and Open Source Software for Education (FOSSEE) project.

The conference covered a variety of topics ranging from hacking with Kali Linux, Open Hardware, an introduction to Raspbian (Debian on the Raspberry Pi), Mobile hacking and mobile forensics. Cyber Crime, Docker, Rust (Mozilla’s newish programming language) and many other Debian related talks.

Below is a listing of the sessions that took place at the two-day event, thanks to Purvesh Shah who sent the list along:

  • Open Source Security with Kali Linux by Rizwan Shaikh

  • AppStream/DEP-11 for the Debian Archive by Abhishek Bhattacharjee

  • Open Hardware — Warranty NOT void if opened by Anool Mahidharia

  • Debian and the BeagleBone Black by Raju Vindane

  • A comparison of BeagleBone Black (which is completely open hardware) and Raspberry Pi (which is partially open hardware)

  • Lil’Debi: Running Debian on Android by Kumar Sukhani

  • Debian on ARM by Siji Sunny

  • Introduction to Raspbian – A Raspberry Pi flavour of Debian by Rahul Mahale

  • Debian History and Debian Cycle by Shirish Agarwal

  • Key-signing Party: With so many Debian Developers around, it was the perfect opportunity for everyone to sign and exchange their keys with other volunteers as well.

  • Debian ‘In’ India by Kartik Mistry and Future Directions for Debian—IN by Jaldhar Vyas

  • Mobile Hacking & Mobile Forensics by Sachin Dedhiya

  • Cyber Crime in India & Digital Forensics by Sachin Dedhiya

  • Introduction to Docker by Augustine Correa

  • Debian Packaging by Praveen A

  • Gnome Shell Accessibility with Orca by Krishnakant Mane

  • Rust: The memory safe programming language by Manish Goregaokar

  • Building A Mail Server with Debian by Jaldhar Vyas

  • Lightning Talk by Sana Khan

This slideshow requires JavaScript.

So my all day was with excitement and enthusiasm and awesome talks I started my Talk on Raspbian after the talk of Siji who talked on Debian on ARM

My session was focused on

Introduction to Raspbian — I started with an introduction about the Raspberry Pi board, how it differs from other boards and some of its use cases. Then I talked about Raspbian, a port of Debian to the Raspberry Pi, which is also the recommended operating system for the Raspberry Pi. I showed how to get Raspbian setup and then showed how to setup this Raspberry Pi as a WiFi router. There was an short Q&A session which I answered to best of my knowledge my presentation and how to is available at my github profile[1]



Following are the some links where event was covered

Installing and configuring Open-source chef-server on Ubuntu and Managing AWS ec2 instances using knife


This is my first post on automation and configuration management and that too on Chef.

I personally invested a lot time to get going with Chef, because it is bit confusing for newbies to catch the pace, after searching and reading a lot I choose a Open Source Chef Server to use and I started with the installation.

The difference between Hosted Chef Server and Open-source Chef Server can be read here.

It is a quite a troublesome installation of the Open-source chef server especially if you are doing first time and there are many things which are not well documented. Few considerations before the installation of chef-server is that your server should have minimum of 4GB of Memory.

I am using Ubuntu 12.04 LTS 64 bit in this tutorial.

There are various ways available to install chef server but I succeeded successfully to install by the following installation method, so here we go step by step installation of Open-Source Chef.

Get the copy of chef-server from the following links

For Ubuntu get it from

For Redhat and Centos get it from

select the right architecture of your system and download the setup to your local storage,you can know the architecture of your Linux system by the command lscpu | grep Arch

After downloading the setup move it to the server where you are willing to install and configure the Chef Server.

Before starting there are some important considerations to note

  • If you have PostgreSQL already installed and running on default port 5432, I would recommend you to change the port of PostgreSQL other than 5432 and restart the PostgreSQL server. This hack worked for me for successful installation.

  • Set your host-name to resolvable DNS, you can see your hostname by the hostname -f and you can change it by editing the file /etc/hosts

  • In your security groups or Firewall add an inbound rule for port number 9462. because the chef-server 11 does not run webui on 4000 and 4040, though I added an Inbound rule for them, add 5432 and 22 for ssh access.

After doing all three preliminary steps then go to the directory where you configured your chef-server setup .deb file and run the following command to install the open-source chef-server, in my case it was,

sudo dpkg -i chef-server_11.1.6-1_amd64.deb

Fingers crossed it will take few minutes to install and configure the chef-server

If your chef-server is installed successfully, you can run next command,

sudo chef-server-ctl reconfigure

it will reconfigure your chef-server passing your systems parameter and starting the required services such as rabbitmq and postgres.

After successful execution of above command run the following command to test the configuration.

sudo chef-server-ctl test

and if it returns success, yes you installed the chef server successfully Congratulations :p

restart the chef server once by the following command

sudo chef-server restart

Now to access the chef-server WebUI a small hack has to be done, I did on my server is to

edit the file edit /etc/chef-server/chef-server-running.json

find line


and replace it by


Now once again reconfigure and restart chef-server by running following commands

sudo chef-server-ctl reconfigure

sudo chef-server restart

Now go to browser and enter the IP or domain of your server you may get SSL Certificate error because it is not yet configured, so add the exception and proceed further.

you will be redirected to the Chef-server webui Login Page

enter the default username as admin

and password is p@ssw0rd1

now login and first change the admin password

now there you can see your chef-server dashboard and all other tabs you can browse nodes,clients,roles etc.

So we are not yet done we didn’t do any useful work using chef-server!

So lets create an ec2 Instance but before that we need to install some gems

gem install chef

gem install knife-ec2

gem install net-ssh-multi

after installing these gems

create a directory named .chef in home folder or you can simply run the following commands:-

mkdir -p ~/.chef

sudo chown -R $USER ~/.chef

After it regenerate the private key from the Chef WebUi of Admin and copy to the


also regenerate the private key of chef-validator client and copy it to


Run the following command

knife configure -i

For configuring knife, we need to pass few details:

Path for knife.rb file: default is ~/.chef/knife.rb

Chef Server URL:https://<Elastic-IP> orhttps://<EC2-Public-DNS>

Name of the new user: <any-desired-name>

Name of the existing admin: admin

Location of admin’s private key: /etc/chef-server/admin.pem

Validation Key Name: chef-validator

Validation Key Path: /etc/chef-server/chef-validator.pem

Path of chef repository: <default>

New User Password: <any-desired-password>

after doing the knife configuration

add the following lines to knife.rb

knife[:editor] = ‘/usr/bin/vim’

knife[:aws_access_key_id] = “”

knife[:aws_secret_access_key] = “”

Note for the keys aws_key_id is the key ID of your AWS IAM user

and aws_secret_access_key is the secret key is also of the same user

Note the IAM user has to admin so that it can have access to create and delete Instances

So now all set and we are good to create an ec2 instance using chef-server

So use the following command to create your ec2 instance

knife ec2 server create -r “role[blog-test]” -I ami-a74f62f5 -f m3.medium -S knife-ec2-test -i ~/.ssh/knife-ec2-test.pem –ssh-user ubuntu –region ap-southeast-1 -Z ap-southeast-1b

"role[blog-test]" is the run_list I want to associate with the newly created node. You can put any roles and recipes you like here

  • -I is the AMI ID selected for AMI image

  • -f is the Amazon EC2 instance type (Also known as a Flavor)

  • -S is the name you gave to the EC2 key pair generated in the AWS console

  • -i points to the private key file of that EC2 key pair as downloaded when the keypair was created in the AWS console

  • --ssh-user the official Ubuntu EC2 AMIs use ubuntu as the default user

  • --region ap-southeast-1 If you want your instances to be deployed in any specific Amazon AWS region, add this parameter and the desired region

  • -Z ap-southeast-1b is the availability zone within your region (i.e. you have an existing disk volume you need to made available to this instance)

after running the command it will create an ec2 instance and install the chef client

also it will execute the recipes under the role test

Managing EC2 Instances with knife

to list all the servers in the cloud

knife ec2 server list –region ap-southeast-1

To delete the instances and nodes you can do it by following way:-

knife kec2 server delete -i-xxxxxxx –region ap-southeast-1

knife node delete i-xxxxxxx

So we have installed and configure the chef server and by using knife we have created an ec2 instance.

[Event-Report] One day Fedora Workshop Conducted at KKW College Nashik.

A one day Fedora Workshop was scheduled on October 11th October 2014 at KKW College Nashik[1].
After reaching one of the Reputed College of City it was an Small Felicitation by HOD of MCS

The Workshop Mainly was divided into 2 sessions of 2 hours each.

Session : I

It was an introductory session to Open-Source and GNU/Linux. I started with a small presentation explaining the History of Open-source and GNU, When it was established and what are the goals of it. I focused on the four features of FOSS i.e. Freedom to use, freedom to examine , Freedom to redistribute and freedom to modify. Then I introduced the GNU/Linux, the Linux Kernel, how it is built and how is the release process of the Linux kernel with the short video[2]. Then I introduced the Fedora GNU/Linux Operating system. I showed the live installation of the Fedora 20 distro and also showed the dual boot process of installing Linux with other OS. I showed the different Desktop flavors like GNOME, KDE, XFCE, MATE etc. After Installation of the Fedora 20, I explained the basic commands with examples, I focused on File processing commands and process monitoring commands. I also explained the Features of Fedora and focused on 4 F’s of Fedora Project. I explained the Freedom, Friends, Features, First. I also introduced the Fedora Project Community with all the SIGs and also explained how to join Fedora Project with Fedora Account Systems. With the Introduction to GNU/Linux with Fedora, Students asked me some basic questions and I was happy to answer them in simplest Language few questions were like how to change IP adress etc.

This slideshow requires JavaScript.

Session : II

Session II was focused on how to use Fedora, I started with the the installation and un-installation of software’s. Firstly I explained the de-facto standard of Linux Software Installation and showed the installation of GNOME IP messenger from source. Then I focused more on showing the installation by command line and showed the installation, upgrading and uninstallation by yum command. Installed the software VLC with yum command i.e yum install vlc and also showed un-installation by yum remove command. Also demonstrated the updating and searching for the particular package with yum. Then I showed the Software Installation and un-installation with rpm command for .rpm packages with the archey package. Further I showed the simplest way by showing Gnome Software and Yum Extender. In between there were few questions like how to install windows software on Linux and I answered them. After installation I showed how to use Text Editors like Vim, Emacs and Gedit. Then I explained step by step procedure for how to compile and run programs of C, C++, Python, Ruby and Shell. After that I spoke on Fedora Project Community and how one can contribute to it. Shared the links of particular SIG’s of Fedora Project.
At the end there were questions from students and I answered best of my knowledge.
I conducted a small oral quiz and distributed the Fedora 20 DVDs and Stickers to Students.
It was nice experience and special one because of the support and guidance of Fedora India Community.

Thanks a lot for Prof. Pawan Malani for arranging the workshop.

Also I am Thankful to Fedora Contributors Chandan Kumar and Siddhesh Poyarekar for their personal guidance for this workshop.

Thanks a lot Fedora India Community for the great support.

It was an awesome experience of conducting a small Fedora Workshop.


Book Review: I want to do Project tell me What to do


It was February 2nd 2013 when I first time attended the Shakthi ‘s presentation “I want to do Project tell me What to do”[1] at SITRC Nashik in a Fedora Workshop. I was motivated and re-energize to throw myself in the beautiful Open-Source World. A average student from average Engineering College of University of Pune where Environment and the background of college and city doesn’t shows Open-Source Culture. But after attending the presentation of Shakthi I started my new life and decided to work in open-source Technologies and contribute to Open-source community. Now after a year and half I had the book in my hand titled “ I want 2 do Project tell me What 2 do ”. After receiving my parcel in morning I read the complete book in a day and I still found myself newbie in open-source community and enjoyed each and every guideline.

Shakthi starts with most important topic Mailing list guidelines and to do’s. It is very necessary for a newbie entering into Community how to communicate through various communication tools like Mailing lists,forums etc. He describes the minor things which affects on professional impression and are very important for one to follow while working in team.His guidance in “Project Guidance” really taught me an exact approach to start with open-source projects.

Chapter “Development guidelines” elaborates how to approach to the specific problem or project starting from which programming language to use to build the Documentation. It helped me to understand how each and every minor part of project is necessary in development.

Chapter “Methodology of work” makes it interesting by the steps he describes Newborn, Infant, Toddler, Kid etc. He also explains the Software Development process in this chapter.

Chapter “Reading and Writing” shows an importance of Blogging and reading various books. He suggests books like “Driven to Innovate”, “How to Win Friends and Influence People” etc.and I have added few of them to my reading task list.

Chapter “Art of Making Presentations” covers the basics of Presenting the topic and how to prepare for Presentations. He focuses on small things which makes the great difference while presenting. He has also given the various tools and formats used in Presentations.

Last but not the least Chapter “Sustenance“ explains the importance of various technical events such as Conferences, Talks, Hackathons etc.

This is short and sweet book for Students, Professors and IT Professionals like me who have just started to contribute Open-source Community. Now I have this book in my office bag and I always makes a sight when I find a free time while traveling.

Thanks Shakthi for the Printed Edition of “I want to do Project tell me What to do .”


[Solved] Running Cron job at reboot on Raspberry Pi in Debian(Wheezy) and Raspbian.

Hello Pi users,

After investing much time then expected to run a cron job at reboot in Rapbian. finally I am able to run the cron job at startup and able to execute the necessary commands at start-up.

It is quite Obvious that @reboot will run the cron job at start up but in Raspbian and Debian (wheezy) it is not the case.

@reboot does not works as expected and it is a bug in debaian you can read it here

So here are the steps to for running cron job at reboot :-

  • log in to your pi using ssh

  • switch to root user using sudo bash

  • run the command crontab -e

  • put your command as @reboot bash /path/to/file/ save it and get back on terminal

  • then start cron service by running /etc/init.d/cron start

  • then one additional step is to edit the /etc/rc.local file and add the following line in /etc/init.d/cron/start  be sure that it should before exit 0.

  • now reboot your system by command reboot

and now your cron job is started you can check it by command ps aux | grep cron

also you can check the log tail /var/log/syslog.

One day Python Workshop Conducted at SITRC Nashik

One day Python Workshop Conducted at SITRC Nashik.

After almost a year it was my first visit to SITRC, but it was not as a student to attend the lectures but for conducting a workshop. It was an Special feeling to conduct a workshop in a college where I Completed my BE Graduation.

A Python Workshop named “__init__ Python(self):” Introduction for Programmers was scheduled in Three Sessions on August 2 2014.

Session I:

I began the first session with showing some snaps where Python is used I showed the use of Python in web by showing snaps of Mozilla, Instagram, Pinterest and other websites,also showed the use of python in Mobile, Servers, science, Games , Graphics etc. Then I spoke on differences between Python2 and Python3. I started Python Introduction, Simultaneously introducing them to Python interpreter and doing some basic arithmetic and print statements. Then I introduced Data-types with the examples. After Data-types I explained Control-flow in Python, Explaining While For loops and if , if-else flows, also explained use of break and continue. Simultaneously I gave the programs to find factorial of number, to find average of n numbers etc. And students implemented the program.

This slideshow requires JavaScript.

Session II:

Second session was focused on Data Structures, I introduced the various Python Data Structures such as Lists, Dictionary, Tuple and Set. Illustrated with an example how lists are Mutable and rest are not. Also showed the List operations scuh as append() remove() , join(), split(), insert(), count(), sort() etc. Also illustrated the Stack Operations with pop() and push() operations, also explained the same with Queue. Further showed the use of Dictionaries in various scenarios also programmed about the manipulation of Lists, Dictionaries and Tuples. Then I introduced the Sets and showed various operations on it. I gave assignments to students to add two matrices and many of them completed it.

Session III:

Session III started with Introduction to functions/methods in Python. Showed the syntax of methods and how to use them to modular the programs. Also showed the use of range() function in Loops and Data Structures. And also how one can forget to speak on lambda function which gives such a power to Python programmer. Then I introduced the Object-Oriented programming with python. Introduced the Classes in Python, showed the syntax and emphasized more on __init__() method and keyword self() and showed practical implementation with example. Then I introduced the Inheritance with program, Simultaneously students also programmed it. I also showed explained the Multiple Inheritance with a short example. Students performed the short assignments given to them.

Then it was a short question and answer section where students asked me about if it is possible to implement method overloading etc. I answered all the questions to best of my technical knowledge.

After it students shared their feedback and Tejas Rawal concluded the Workshop. At the End of day it was nice experience to conduct the workshop.

Thanks a lot to Prof. Tushar.B.Kute and Prof.Sandip Walunj for organizing the workshop and maintaining such a wonderful hospitality.

All Stuffs of Workshop I used are can be found at my Github account

One day Fedora WorkShop at SVCOE Junnar, Pune

      After travelling from Nashik to Sahyadri Valley College OF Engineering in the cool climate it was an warm welcome from the College Principal Mr. Sanjay Zope. Though the Workshop was mainly targeted for the Staff, I had an chance to interact with the Third year Computer Engineering students. Before the session begin it was small felicitation from the Chairman Mr. V.R. Divakaran. After the felicitation Mr.Zope expressed his view towards the open source philosophy and looked very ambitious to use and promote open source in the Campus.Campus has all the systems with upgraded Open-Source Software installed on it. With Ubuntu 13.10 running on Desktops.
Session I

    After the felicitation I began the session “Introduction to Open Source and Linux”for Computer Engineering students. I started with the GNU Project and Free Software Foundation. Then I explain the FOSS philosophy. Then I spoke about the Evolution of Linux Kernel by Linus Torvalds and started explaining the various Linux Distros, then I showed the demonstration of the basic Linux commands for File Processing and file editing. Some Sys-Admin commands and network configuration commands. Then there were few questions from students regarding basic network configuration and open source alternatives for few softwares. It was good experience with students for QA session.

This slideshow requires JavaScript.

Session II

   The Second Session was for college Staff and focused on “using Open Source tools”. I gave the basic introduction and guidlines to use tools like Libre Office, SciLab, Sugar CRM, Thunderbird, GNU Parted, GIMP. Also introduced the how to start for Programming languages for c, c++, Shell and Java on Linux. I also introduced some text editors like vim and Emacs, then I showed the IDEs Compatible on Linux system such as Eclipse, Netbeans, Komodo and Geany. I demonstrated the installation and un-installation of softwares and packages on the Linux system using Command line and GUI package managers like synaptic.

    Then there was QA Session where staff asked me the various Open Source altrenatives to proprietary softwares like MATLAB, Outlook, Adobe Photoshop etc. I answered the one which I knew most popular.This was wonderful experience for me as it was my first time to be in front of College Staff.

  Thanks to principal Mr. Sanjay Zope for working with me for the planning and organizing this workshop. Thanks also to the Management, and Faculty of SVCOE for the wonderful hospitality, and their support for the workshop.

Network Authentication using an LDAP server:

Hi Techies,

So far we know that at local user accounts are managed through local files (/etc/passwd) on each machine. However, it is difficult to coordinate local user accounts on many systems.

In this blog, I will look at how to setup a machine as a client, to use a network user accounts that are provided by an existing LDAP (Lightweight Directory Access Protocol) directory service. This allows the LDAP directory to be our central authority for all network users and groups in your organization.

User account information determines the characteristics and configuration of the account Authentication methods are used to determine if someone trying to login should get access to the account. Network directory services can provide both user account information and authentication methods.

LDAP directory services can be used as a distributed, centralized, network user management service. Directory entries are arranged in a tree structure that can be searched. The base DN (Distinguished name) is the base of the tree that will be searched for directory entries for users and groups.

Key Elements for LDAP configuration

  1. Server’s fully qualified hostname

  2. Base DN to search for user definitions

  3. The certificate authority (“CA”) certificate used to sign the LDAP server’s SSL certificate.

You should ensure that the directory-client yum (for Redhat and Fedora) package group is installed, which includes the packages sssd, authoconfig-gtk, and oddjob-mkhomedir befor you begin.

System —> Administration —> or system-config-authentication can be used to modify the configuration of Identity and Authentication.


Creating LDAP Account


Downloading CA Certificate

System-config-authentication will automatically turn on the sssd service which will look up and cache LDAP user information and authentication credentials for the client. If the LDAP server is unavailable but sssd is working, the system may be able to authenticate and get information about network users from the sssd cache.

Use getent passwd username to verify the account information being used. This works whether the user is a local user defined in etc/passwd or a network user from an LDAP service. The command will always show the definition that is actually being used by the system if there is any duplication between local users and network users. By default, the local user definition overrides the network user definition.

Installing Software from Compressed Archives: .tar.gza

Linux software applications in the form of source code are available at different sites on the Internet. You can download any of this software and install it on your system. Recent releases are often available in the form of compressed archive files. Applications will always be downloadable as compressed archives if they don’t have an RPM version. This is particularly true for the recent versions of GNOME or KDE packages. RPM packages are only intermittently generated.

Decompressing and Extracting Software in One Step:-

Though you can decompress and extract software in separate operations, you will find that the more common approach is to perform both actions with a single command. The tar utility provides decompression options you can use to have tar first decompress a file for you, invoking the specified decompression utility. The z option automatically invokes gunzip to unpack a .gz file, and the j option unpacks a .bz2 file. Use the Z option for .Z files For example, to combine the decompressing and unpacking operation for a .tar.gz file into one tar command, insert a z option into the option list, xzvf (see the later section “Extracting Software” for a discussion of these options). The next example shows how you can combine decompression and extraction in one step:


Fig. decompression and extraction comand

# tar xvzf htdig-3.1.6.tar.gz

For a -compressed archive, you use the j option instead of the z option.

# tar xvjf htdig-3.1.6.tar.bz2

Decompressing Software Separately

Many software packages under development or designed for cross-platform implementation may not be in an RPM format. Instead, they may be archived and compressed. The filenames for these files end with the extension .tar.gz, .tar.bz2, or .tar.Z. The different extensions indicate different decompression methods using different commands: gunzip for .gz, bunzip2 for .bz2, and decompress for .Z. In fact, most software with a RPM format also has a corresponding .tar.gz format. After you download such a package, you must first decompress it and then unpack it with the tar command. The compressed archives can hold either source code that you need to compile or, as in the case with Java packages, binaries that are ready to run. A compressed archive is an archive file created with tar and then compressed with a compression tool like gzip. To install such a file, you must first decompress it with a decompression utility like gunzip and then use tar to extract the files and directories making up the software package. Instead of the gunzip utility, you could also use gzip -d. The next example decompresses the jdk-7u3-linux-i586.tar.gz file, replacing it with a decompressed version called jdk-7u3-linux-i586.tar:

You can download compressed archives from many different sites, including those mentioned previously. Downloads can be accomplished with FTP clients such as NcFTP and gFTP, or with any web browser. Once downloaded, any file that ends with .Z, .bz2, .zip, or .gz is a compressed file that must be decompressed. For files ending with .bz2, you use the bunzip2 command.

Files ending with .bin are self-extracting archives. Run the bin file as if it were a command. You may have to use chmod to make it executable. The j2sdk software package is currently distributed as a self-extracting bin file.

# j2sdk-1.4.2-FCS-linux-i386.tar.bin

Selecting an Install Directory

Before you unpack the archive, move it to the directory where you want it. Source code packages are often placed in a directory like /usr/local/src, and binary packages go in designated directories. When source code files are unpacked, they generate their own subdirectories from which you can compile and install the software. Once the package is installed, you can delete this directory, keeping the original source code package file (.tar.gz). Packages that hold binary programs ready to run, like Java, are meant to be extracted in certain directories. Usually this is the /usr/local directory. Most archives, when they unpack, create a subdirectory named with the application name and its release, placing all those files or directories making up the software package into that subdirectory. In certain cases, the software package that contains precompiled binaries is designed to unpack directly into the system subdirectory where it will be used. For example, it is recommended that j2sdk-1.4.2-FCS-linux-i386.tar be unpacked in the /usr/local directory, where it will create a subdirectory called j2sdk-1.4.2. The /usr/local/j2sdk-1.4.2/bin directory holds the Java binary programs.

Extracting Software

First, use tar with the t option to check the contents of the archive. If the first entry is a directory, then when you extract the archive, that directory is created and the extracted files are placed in it. If the first entry is not a directory, you should first create one and then copy the archive file into it. Then extract the archive within that directory. If no directory exists as the first entry, files are extracted to the current directory. You must create a directory yourself to hold these files.

# tar tvf jdk-7u3-linux-i586.tar

Now you are ready to extract the files from the tar archive. You use tar with the x option to extract files, the v option to display the pathnames of files as they are extracted, and the f option, followed by the name of the archive file:

# tar xvf jdk-7u3-linux-i586.tar

You can also decompress and extract in one step using the -z option for gz files and –j for bz2 files.

The extraction process creates a subdirectory consisting of the name and release of the software. In the preceding example, the extraction created a subdirectory called jdk-7u3-linux-i586

You can change to this subdirectory and examine its files, such as the readme and INSTALL files.

# cd jdk-7u3-linux-i586

Installation of your software may differ for each package. Instructions are usually provided along with an installation program. Be sure to consult the readme and INSTALL files, if included.

# ./configure




Check if you are running 32bit OS or 64 bit OS on your Linux Machine

Hi Linux Users I will elaborate some basic tricks to know your CPU configuration on your Linux System. Many times I have come across a unique question from Linux Users that how should I know that I am using 32 bit CPU/OS or 64 bit CPU/OS? Definitely I am here to know you answer of this question but before that we have to understand some points they are.

  1. We can run 32 bit operating system on 64 bit CPU.

  2. We can run 64 bit operating system on 64 bit CPU.

  3. We cannot run 64 bit operating system on 64 bit CPU.

  4. We can run 32 bit operating system on 32 bit CPU.

Once we are clear with these points now we are ready to check of our CPU is 32 bit or 64 bit.

How to check if CPU is 64 bit supported or not basically there are two ways

1.Method I

use lscpu command to check if it supports multiple CPU operation modes(either 16, 32 or 64 bit mode).


Fig.1 lscpu command

as a normal/root user execute below command

lscpu | grep op-mode

Sample output on a 32-bit processor


Fig.2 Using lscpu with grep

If you observe the first output will say that your CPU supports both 32-bit as well as 64 bit operating systems. This indicates that its 64-bit processor from our above 4 rules. But in the second machine it says only 32-bit CPU mode which indicates its a 32 bit processor.

Method 2:-

Use proc file system file CPU info to get the processor type.

grep -w lm /proc/cpuinfo

Sample output on a 32-bit processor when searching for lm(long mode) bit is set or not


Fig.3 Checking for long mode

If you dont get any output that indicates its not a 64 bit processor.

How to check if my Operating system is a 64-bit or 32-bit?

Before knowing about this you should know about i386, i486 etc naming convention.

What is difference between i386, i486, i586, and i686 OS?

They are the names given by software industry to some softwares for different Intel architectures. If we say i386, its Intel 80386 processor, also known as the i386, or just 386, was a 32-bit microprocessor introduced by Intel in 1985. If I say i486 it is an Intel 80486, i586 it is a 80586 and i686 its a 80686 processor. In short they are called as x86 family which are of 32 bit processor. And for 64 bit OS you will get x86_64.

Option 1: check with uname command if your OS is 32 bit or 64 bit.

uname -m


Fig.4 Checking Architecture with uname

uname -p


Fig.5Checking Architecture with uname

Option 2: Check with lscpu command as below.

lscpu | grep -i arch


Fig.6 Checking Architecture with lscpu command

Option 3: Check with getconf command as shown below

getconf LONG_BIT


Fig.7 Checking CPU configuration in Bits

Sample output for 32 bit OS

Please let us know if you know any other way to get OS and Processor processing bit details.