My Development Environment Setup on Linux

As I mentioned in my previous post Thinking of moving from Windows to Linux? I am moving from Windows to Linux. Setting up my development environment is a bit tedious because I have to hunt down the applications and execute various commands to setup. So I thought of make a note of them in a post so that it will be easier for me next time.

I am using Ubuntu/LinuxMint system so I am using apt-get to install, if you are using Fedora/CentOS you can use yum/dnf.

The very first thing I do after installing Linux is updating the system and in case I am working on VirtualBox VM installing VirtualBox Guest Additions.

sudo apt-get update
sudo apt-get install virtualbox-guest-dkms virtualbox-guest-x11

Setting up Java Development Environment


Some Linux distros come with OpenJDK by default. You may want to remove OpenJDK first and install Oracle JDK.

sudo apt-get purge openjdk-*

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

To install Java 7 sudo apt-get install oracle-java7-installer
To install Java 8 sudo apt-get install oracle-java8-installer

If you want to set JAVA_HOME environment variable for a particular user then you can add JAVA_HOME in ~/.bash_profile or if you want to setup for all the users globally then you can add it to /etc/profile file.

> vi ~/.bash_profile or vi /etc/profile

Append the following to the file:

export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH=$PATH:$JAVA_HOME/bin

> source ~/.bash_profile or source /etc/profile

After installing JDK you may want to download your favorite IDE from the following locations:


netbeans0 intellijidea STS eclipse-800x188

Most of the times I work with either Tomcat or JBoss/Wildfly servers. You cand ownload them from the following locations:

Wildfly_logo Tomcat-logo

To install build tools like Ant or Maven
> sudo apt-get install ant
> sudo apt-get install maven

We can install various softwares like Groovy, Grails, Gradle etc you can use SDKMan ( which was previously known as GVM.


> curl -s | bash
> source "$HOME/.sdkman/bin/"
> sdk version
> sdk install groovy
> sdk install grails
> sdk install gradle

Install MySQL server
You can install MySQL server and MySQL Workbench from Ubuntu Software Center.


But if you prefer commandline installation

> sudo apt-get install mysql-server
> sudo apt-get install mysql-workbench

Installing NodeJS
Installing NodeJS become a little bit complicated because it is going through some changes(nodejs, nodejs-legacy, io.js etc).

Basic RGB

You can install latest NodeJS using following commands:

> sudo apt-get install curl
> curl -sL | sudo bash -
> sudo apt-get install nodejs

For further details refer

Install yeoman and generators
Yeoman ( makes it easy to develop front-end applications by automating various tasks using bower, grunt or gulp.


Install yeoman sudo npm install -g yo bower grunt-cli gulp
Install various generators
> sudo npm install -g generator-webapp
> sudo npm install -g generator-angular
> sudo npm install -g generator-jhipster
> sudo npm install -g generator-meanjs
> sudo npm install -g cordova ionic

Installing Ruby and RubyOnRails
You may be using Ruby or tools that depends on Ruby like OpenShift commandline tools, Jekyll etc.


You can find the very detailed instructions on how to install Ruby/RubyOnRails at

Just for the sake of quick reference I am repeating the steps here:

> sudo apt-get update
> sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev

> cd
> git clone git:// .rbenv
> echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
> echo 'eval "$(rbenv init -)"' >> ~/.bashrc
> exec $SHELL

> git clone git:// ~/.rbenv/plugins/ruby-build
> echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
> exec $SHELL

> git clone ~/.rbenv/plugins/rbenv-gem-rehash

> rbenv install 2.2.3
> rbenv global 2.2.3
> ruby -v

> echo "gem: --no-ri --no-rdoc" > ~/.gemrc
> gem install bundler

> gem install rails -v 4.2.4

Installing Jekyll
Jekyll ( is a static site generator which you can use to generate your site and host it on github.


> gem install jekyll

Test drive Jekyll
> jekyll new myblog
> cd myblog
> jekyll serve

Hope these installation instructions helps!!

Note: All the images belong to their respective owners.

How to SSH into VirtualBox Linux OS?

While learning some of the Linux commands we may want to use SSH commands to login into a remote Linux system and we may not have a dedicated Linux system to play with.
In this post I will explain how I am using my Linux OS installed on VirtualBox to SSH from Windows OS.

virtualbox   prompt

1. Install openssh-server on Linux OS in VirtualBox
sudo apt-get install openssh-server

On some Linux distros (ex: Fedora) the openssh server won’t start automatically.

You can enable it to start automatically using the following command:

systemctl enable sshd.service

Now you can restart the VM or start the service in the current session itself using

systemctl start sshd.service

2. Shutdown your Linux VM if it is already running.
Select Linux VM in Virtualbox and go to Settings -> Network.
In Adapter 1 tab Enable Network Adapter is selected.
Go to Adapter 2 tab and check Enable Network Adapter.
For Attached To option select Host-only Adapter and click OK.

3. Start your VirtualBox Linux VM
Open Terminal and run ifconfig command
eth1 Link encap:Ethernet HWaddr 08:00:27:7e:ea:89
inet addr: Bcast: Mask:
inet6 addr: fe80::a00:27ff:fe7e:ea89/64 Scope:Link

Now from you Windows OS you can use Putty to connect to your Linux OS usinng SSH as follows:

ssh username@

Enjoy 🙂