Add multiple ssh keys for different host accounts

Steps to add multiple ssh keys for different host accounts:

  1. Create .ssh folder under home directory if not exist, and navigate to .ssh folder

cd ~
mkdir .ssh
cd .ssh

2. To generate public private ssh key pair run the following command. It will ask for passphrase, press enter for no passphrase.

ssh-keygen -C “<comment like email>” -f “<file-name>”

Example:
ssh-keygen -C “abc@gmail.com” -f “id_rsa_github”

The above example will create 2 files “id_rsa_github” (private key) and “id_rsa_github.pub” (public key). Note that you can choose any file name for -f parameter.

3. To create a new public-private ssh key for other host, say bitbucket.org.

ssh-keygen -C “abc@gmail.com” -f “id_rsa_bitbucket”

The above command will create 2 files “id_rsa_bitbucket” (private key) and “id_rsa_bitbucket.pub” (public key)

4. Add public key to respective host (github.com or bitbucket.org)

  1. Copy the content of public key (*.pub file).
  2. Add the content of public key under the manage ssh keys in the setting of the respective host.
    1. Navigate to profile->Settings->SSH keys.
    2. New SSH key/ Add key.
    3. Provide title/label of your choice.
    4. Paste the content of public key (*.pub) in key.

5. Add the git configuration for the generated public-private key pairs.

  • Create a config file under ~/.ssh if do not exist.
    • vi config
  • Add config for above generated ssh keys for different hosts github.com and bitbucket.org

Host github.com
 HostName github.com
 PreferredAuthentications publickey
 IdentityFile ~/.ssh/id_rsa_github

Host bitbucket.org
 HostName bitbucket.org
 PreferredAuthentications publickey
 IdentityFile ~/.ssh/id_rsa_bitbucket

6. Clone your repo from the respective host at the desired folder location.

Example:
git clone <ssh git repo url>
git clone git@github.com:<repo-name>

7. Configure the user name and email in the repo.

Global Configuration (same for all repos and accounts)

git config –global user.name “abc”
git config –global user.email “abc@gmail.com”

Local Configuration (configuration specific to current git repo)

git config –local user.name “abc”
git config –local user.email “abc@gmail.com”

Unlock Bootloader, install TWRP, install custom ROM (VoLTE supported) in Lenovo Z2 Plus.

Note: By unlocking Bootloader you will lose warranty of your phone.
Disclaimer: Treat this post as a guide, since the post is not responsible if anything goes wrong.

This post will explain how one can unlock bootloader and install TWRP Recovery image in Lenovo Z2 Plus. This post also explain how to install custom ROMs, specifically Viper OS or AICP in the device. Both the custom ROMs support VoLTE. At the time of writing this post, the Android Version of both ROMs is 7.1.2 (Nougat).

Prerequisite:

Summary of files needed to install custom ROM:

  • Platform Tools: ADB and Fastboot.
  • TWRP image
  • unlock_bootloader.img from developer.zuk.com
  • Google apps
  • Custom ROM

Let’s get the above list of files one by one.

Platform Tools:

You can either install full Android SDK (big file) from [1], if you are interested in android development, or just install platform tools (smaller files). You can get the platform tools from [2], [3], [4].

TWRP image for Lenovo Z2 Plus:

Team Win Recovery Project (TWRP) is an open-source software custom recovery image for Android-based devices. You can get the TWRP image for Lenovo Z2 Plus from [5].

Unlock bootloader image:

  1. Open link http://developer.zuk.com/bootloader [6] in chrome and use google translate to translate page to English.
  2. Select Model Z2 for Z2 plus.
  3. Enter 8 digit serial number of your phone, which you can get from Phone’s settings-> About -> Status -> Serial number.
  4. Provide your email id, check the check-boxes and submit.
  5. You will get an email in your email id from zuk.com (almost immediately, so check your spam folder in case it is not in the inbox).
  6. Download the unlock_bootloader.img (1KB file :p) in the attachment.

Download Google Apps:

  1. Open link http://opengapps.org/ [7].
  2. Select Platform: ARM64
  3. Select Android 7.1.
  4. Select Variant (say, micro).

Important Points for selecting correct Variant:

  • Select appropriate variant in step 4 above, otherwise you will feel frustrated later with either a lot of google apps, or missing some default apps (replaced by google apps), which will be because of wrong google apps variant, and not because of custom ROM.
  • Check comparison between different variants at [8].
  • The comparison table at the above link, shows for each variant, what all google apps are included in it. So for example, Super variant has almost all the google apps, while Pico variant has the least number of google apps.
  • Note that the entry O means this variant replaces the Stock/AOSP version of the application by default. For example, for Super & Stock variant, the entry for Google Contacts is O. This means that if you go with Super or Stock variant, this variant will replace the default Contacts app supplied by the custom ROM with the Google Contacts. Then you will only be able to store contacts in Google, and will not be able to store contacts in your device, since google contacts will not give you the option to store contacts in your device.
  • I selected micro variant, as per my requirement (which is have only important google apps and have some default apps from custom ROM to be not replaced by google apps).

Download Custom ROM:

Following are the Custom ROM, I tested with Lenovo Z2 Plus:

  1. Viper OS: Download link – [10]
  2. AICP: Download link – [11].

You can check reviews of both the custom ROMs in forum.xda-developers.com [9] and/or youtube for look and feel. Few comments:

  1. Both support VoLTE (checked Reliance Jio, India)
  2. AICP has more stock like feeling, while Viper OS gives more customizations.

Summary of files downloaded till now:

You must have installed ADB & Fastboot. You should also have following files (put it in same location):

  1. unlock_bootloader.img
  2. TWRP image (like twrp-3.1.1-0-z2_plus.img)
  3. Open Google Apps (like open_gapps-arm64-7.1-micro-20170728.zip)
  4. Custom ROM (either Viper OS like Viper-z2_plus-7.1.2-Python-v2.1-20170702-OFFICIAL.zip, or AICP like aicp_z2_plus_n-12.1-NIGHTLY-20170728.zip)

Enable USB debugging in your phone & check ADB:

  1. Go to Phone’s settings-> About.
  2. Tap ZUI version 7 times to get Developer Options.
  3. Go to Phone’s settings -> Advanced Settings, there you will find Developer Options; enable USB debugging.
  4. Connect your phone with your PC, it will prompt to Allow USB debugging.
  5. Check “Always allow from this computer” option and proceed.
  6. Open command terminal, run the command: “adb devices”. It should list your device serial number and ‘device’ (not unauthorized).

Instructions:

There is a good video in youtube [12] which shows how to unlock bootloader, install TWRP and install Viper OS. I would suggest you to have a look to get the visuals of how the various screens will look at the time of whole process. Then follow the below steps:

Steps to unlock the bootloader & install TWRP:

  1. Open the command terminal .
  2. Run “sudo su” for root access (in linux OS). Reason fastboot needs root access.
  3. Go to the path having unlock_bootloader.img & twrp-3.1.1-0-z2_plus.img files.
  4. To check your device is accessible, run following command:

    adb devices

  5. Run following command to reboot the device:

    adb reboot bootloader

    The above command will reboot the device and you will get fastboot mode screen as shown below. Note it will show the DEVICE STATE as locked.
    locked

  6. Test fastboot has access to your device (run command in your PC terminal):

    fastboot -i 0x2b4c devices

    The above command should list your device.

  7. Run below command:

    fastboot -i 0x2b4c flash unlock unlock_bootloader.img

    You should get the output like:

    target reported max download size of 1610612736 bytes
    sending ‘unlock’ (0 KB)…
    OKAY [ 0.037s]
    writing ‘unlock’…
    OKAY [ 0.053s]
    finished. total time: 0.090s

  8. Note that after running the command (shown below) the device will boot, and you will get a screen with ‘Start >’ text at top right corner as shown in image below. The screen will be there for 5 seconds. At that screen, press any volume key to open option’s menu. In the option’s menu, navigate up or down using volume up key or volume down key. Navigate to fastboot option, and press power key for selection. You will get the fastboot screen. The fastboot screen is required to run further fastboot commands.
    unlocked_first_screen
    Run the following command to unlock boot loader:

    fastboot -i 0x2b4c oem unlock-go

    The above command will unlock the bootloader.

  9. If you have run the above command and also selected the fastboot option from option’s menu, you should get a screen similar to the screen shown in image below, but now it should show the DEVICE STATE as unlocked as shown below:
    unlocked_boot
    Run the following command to test that fastboot still has access to your device:

    fastboot -i 0x2b4c devices

    It should list your device.

  10. Run below command to flash TWRP recovery:

    fastboot -i 0x2b4c flash recovery twrp-3.1.1-0-z2_plus.img

  11. Run below command to restart your phone in TWRP recovery mode:

    fastboot -i 0x2b4c boot twrp-3.1.1-0-z2_plus.img

    The above command will open TWRP Recovery mode.

  12. You have successfully installed TWRP Recovery Mode. Swip to allow modifications. This will list options like Install Wipe etc.

Summary of commands used:

adb devices
adb reboot bootloader
fastboot -i 0x2b4c devices
fastboot -i 0x2b4c flash unlock unlock_bootloader.img
fastboot -i 0x2b4c oem unlock-go
fastboot -i 0x2b4c devices
fastboot -i 0x2b4c flash recovery twrp-3.1.1-0-z2_plus.img
fastboot -i 0x2b4c boot twrp-3.1.1-0-z2_plus.img

Create backup of stock ROM:

Before installing custom ROM, it is advisable to create backup of the stock ROM present in the device. So in case something goes wrong, or you want to revert your phone back to stock ROM, you can use the backup. Following are the steps to create backup of stock ROM:

  1. In TWRP Recovery mode (which you get in last section), select Backup.
  2. Select options: Boot, Recovery, System, System Image, Data, Firmware
  3. Swip to backup.
  4. After completion, navigate back to TWRP Home Screen.
  5. In your PC, open the Internal storage of your phone, you will find TWRP folder. Copy the TWRP folder in your PC. You can use this folder later to recover the stock ROM, using Restore option in TWRP Recovery Mode.

Wipe internal storage:

  1. In TWRP, select Wipe; them Swipe to Factory Reset.
  2. Select back to go back to previous window, then select “Format Data”, type “yes” to continue.
  3. Select back, then back, then select “Advanced Wipe”.
  4. In Advanced Wipe window, check the options: Dalvik / ART Cache, cache, System, data, Internal Storage. In short select all except USB-OTG.
  5. Swipe to Wipe.
  6. Navigate back to TWRP Home Screen.

Install custom ROM:

Below are the steps to install Viper OS (i.e. Viper-z2_plus-7.1.2-Python-v2.1-20170702-OFFICIAL.zip). If instead of Viper OS you want to install AICP use file “aicp_z2_plus_n-12.1-NIGHTLY-20170728.zip” instead of “Viper-z2_plus-7.1.2-Python-v2.1-20170702-OFFICIAL.zip”. Following are the steps:

  1. Open Internal Storage of phone in PC, copy Google Apps file (open_gapps-arm64-7.1-micro-20170728.zip) and custom ROM file (Viper-z2_plus-7.1.2-Python-v2.1-20170702-OFFICIAL.zip).
  2. In the device in TWRP Mode, click Install, which will open new screen listing the 2 zip files copied in above step. Click custom ROM file (i.e. Viper-z2_plus-7.1.2-Python-v2.1-20170702-OFFICIAL.zip file, which will open a new screen.
  3. Click Add more Zips, which will open previous screen listing the 2 zip files. Select google apps file, i.e., open_gapps-arm64-7.1-micro-20170728.zip.
    Now you have selected both the files.
  4. Swip to confirm flash.
    This will take few minutes to install custom ROM, then google apps.
  5. Click “Reboot System”, then Click “Do not install”.
    The phone will reboot, flash a screen for 5 seconds having that “Start >”, ignore that screen, then the phone will boot with the new custom ROM.
  6. Wait for few minutes (approx 5-10 minutes). If it stuck at boot logo, press power button to restart phone. This will reboot the phone. It will take approx 1-2 minutes at boot logo, and then must boot the new custom ROM.

Congratulations you have successfully installed custom ROM in your Lenovo Z2 Plus !!!

References:

  1. https://developer.android.com/studio/index.html
  2. http://rpmfind.net/linux/rpm2html/search.php?query=android-tools
  3. https://developer.android.com/studio/releases/platform-tools.html
  4. https://developer.android.com/studio/command-line/index.html
  5. https://eu.dl.twrp.me/z2_plus/twrp-3.1.1-0-z2_plus.img
  6. http://developer.zuk.com/bootloader
  7. http://opengapps.org/
  8. https://github.com/opengapps/opengapps/wiki/Package-Comparison
  9. https://forum.xda-developers.com/lenovo-zuk-z2
  10. https://download.viper-os.com/z2_plus/
  11. http://dwnld.aicp-rom.com/?device=z2_plus
  12. https://www.youtube.com/watch?v=OKlUc-oLJxA

Setup Android Studio & Android Virtual Device in Fedora

This post will be regarding setting up Android Studio in Fedora and adding Android Virtual Device.

Download Android Studio from link [1], and extract at the desired location. Run the android-studio/bin/studio.sh file. First time it will ask to install android sdk, so continue with it.

Create desktop entry / launcher:

  • To create a desktop entry, in android studio go to Tools -> Create Desktop Entry.
  • To create command line launcher, in android studio go to Tools -> Create Command-line Launcher.

Setup Android Virtual Device (AVD):
An android app can be tested either in Android Virtual Device, or in the phone itself. Following are the steps to setup Android Virtual Device:

  • In android studio, go to Tools -> Android -> AVD Manager.
  • Select Create Virtual Device.
  • By default, phone category and a phone say Nexus 5X will be selected. Change as per desired or proceed with default.
  • Next it will ask to select a system image, depending on the release name, api level and target api. Click on Download as per desired option. Note you can go back to select different phone, to get more or less options for system image.
  • It will download and install the selected component in the Android Sdk.
  • Verify and save the AVD configuration.

Troubleshooting:
Error: “WARN – vdmanager.AvdManagerConnection – Failed to create sdcard in the AVD folder.” If you get above error while creating android virtual device, it means you need sdcard utility.

For Fedora following are the dependencies:
32-bit Android SDK requires:

sudo dnf install glibc.i686 zlib.i686 libstdc++.i686 ncurses-libs.i686

64-bit Android SDK requires:

sudo dnf install glibc zlib zlib.i686 libstdc++ ncurses-libs mesa-libGL-devel adb libgcc.i686

References:

  1. https://developer.android.com/studio/index.html
  2. https://stackoverflow.com/questions/17993584/failed-to-create-sdcard-in-the-avd-folder-in-linux-fedora

Installing media players in Fedora 23

There are various audio and video players available. Here I will be listing few.

Audacious Audio Player:

Install Audacious Audio Player:

sudo dnf install audacious

Install plugins: Note that before installing plugin, install and enable RPMFusion repositories as mentioned in my post, Adding media codecs in Fedora 23

sudo dnf install audacious-plugins-freeworld

VLC Video Player:

sudo dnf install vlc

Adding media codecs in Fedora 23

If you are facing issue with playing media files, it is because you do not have media codecs in you machine. You need to perform following 2 steps:

Install and enable RPMFusion Repos:
Following is the command to install and enable RPMFusion repos:

su -c ‘dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm’

Install Media Codecs:
Following is the command to install media codecs:

sudo dnf install gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-bad-nonfree gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer1-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1

References:

  1. https://rpmfusion.org/Configuration/
  2. http://www.2daygeek.com/top-things-to-do-after-installing-fedora-24-workstation/3/

Transferring files between Android Mobile & Fedora 23 via USB.

The latest Android devices uses MTP to transfer files between Android devices and computer. Following are the packages I installed to connect my android phone:

sudo dnf install libmtp
sudo dnf install gvfs-mtp
sudo dnf install simple-mtpfs
sudo dnf install mtp-detect

Not all the packages are need, but listing all the packages I know of, since different things work for different devices. In my case mtp-detect worked.

After installing the mtp, connect the android device with the usb cable, and it should get listed in the Places tab, as other drives are listed when mounted.

Fix Missing Create New Document at Right Click in Nautilus Files in Fedora 23

Fedora 23 comes with Nautilus File Manager. You might have noticed that in the file manager, when you go to a location and right click with mouse, the option for “New Folder” is present, but the option for “New Document” is missing.

To create a new file, there is always command-line option like touch, vi, and so on, but what if you want to create a new empty file in right-click of mouse, and do not want to go to the terminal each time.

Solution:
Open the terminal, run the following commands:

cd ~/Templates/
touch ‘New Text File.txt’ && touch ‘New Word File.doc’ && touch ‘New Excel File.xls’

The above command will create 3 files, a txt file, a doc file and an xls file in the Templates folder within the HOME folder. Also if you open the Templates folder in the file manager, you will notice a message at the top:

Files in this folder will appear in the New Document menu.

Now if you go to any folder in the file manager, you will find a “New Document” menu, within which you will find the option to create an empty file as present in the Templates folder. Done !!!

Install Grails on Fedora 23

Prerequisites:

  • JDK must be installed in the system.
  • Note: Check the compatibility of JDK version with Grails version.
  • Note: Grails 2.3.x have issues with JDK8, so use JDK7 with it instead.

Check JDK installation:

Check java version by running the command:

java -version

You will get an output similar to below depending on the version installed:

java version “1.8.0_66”
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

Check whether JAVA_HOME is set by running the command:

echo $JAVA_HOME

If you get blank output, i.e., JAVA_HOME is not set, perform next step.

Set JAVA_HOME:

  1. Check for jdk path, you should have a jdk path similar to “/usr/java/jdk1.8.0_66” depending on the JDK installed.
  2. Open the file /etc/profile in edit mode using a file editor as follows:

    sudo vi /etc/profile
    or,
    sudo gedit /etc/profile

  3. Append the following line at the end of the “/etc/profile” file:

    export JAVA_HOME=/usr/java/jdk1.8.0_66

    The path will be the same jdk path as found in step 1.

Grails Installation steps:

  1. Download the latest or previous version of Grails archive from the link [1]. The downloaded archive file will look similar to grails-2.3.7.zip, depending on the version downloaded.
  2. Copy the archive file to /opt/ location by running the command:

    sudo cp ~/Downloads/grails-2.3.7.zip /opt/

  3. Go to /opt folder and extract the grails-2.3.7.zip archive file by running the command:

    cd /opt/
    sudo unzip grails-2.3.7.zip

    A folder named “grails-2.3.7” will be created. Note that the folder name will vary depending on the downloaded version of archive file.

  4. Delete the archive file “grails-2.3.7.zip” by running the command:

    sudo rm grails-2.3.7.zip

  5. Open the file /etc/profile in edit mode using a file editor, and append the following line at the end:

    export GRAILS_HOME=/opt/grails-2.3.7 export PATH=$GRAILS_HOME/bin:$PATH

  6. Check if the grails is properly installed by running the command:

    grails -version

    You should get an output similar to below:

    Grails version: 2.3.7

  7. Note: Changes made in /etc/profile are not reflected immediately, but are reflected after you logout, and re-login. To reflect the changes immediately run the following command:

    source /etc/profile

  8. Another way to check if the PATH is updated properly in step 5, is by checking the value of PATH variable, using the command:

    echo $PATH

    The location “/opt/grails-2.3.7/bin” (or similar location depending on grails version), should be present in the PATH variable value, otherwise run command in step 7, and re-check.

References:

  1. https://grails.org/download.html
  2. https://grails.org/wiki/Installation

Setup Git in Fedora 23 with Bitbucket

Git Installation in Fedora:

Command to install Git:

sudo dnf install git-all

Basic Git configuration:

For complete details of git configuration refer to [2][3]. To start with it is good to configure the user name and email id, which can be done as follows:

git config –global user.name “John Doe”
git config –global user.email johndoe@example.com

The above two command will configure the user-name and email-id at global level.

Following are the 3 levels of configuration which are also described in detail in [2]:

  1. System Level (comman for all user): /etc/gitconfig file: Contains values for every user on the system and all their repositories. If you pass the option –system to git config, it reads and writes from this file specifically.
  2. User Level (comman for all git repositories): ~/.gitconfig or ~/.config/git/config file: Specific to your user. You can make Git read and write to this file specifically by passing the –global option.
  3. Repository Level (specific to particular repository): config file in the Git directory (that is, .git/config) of whatever repository you’re currently using: Specific to that single repository.

To check the git configuration:

git config –list

Check for already exisiting SSH keys[4] in the system:

Check if a pair of public private key already exist, by running the command:

cd ~/.ssh/
ls id_*

If you get files, then the keys already exist, no need to generate new SSH keys. Else continue to next step to generate new SSH keys.

Generating a new SSH key for secure connection[4]:

  1. Go to your HOME directory in your linux machine:
    cd ~
  2. Type the following command at the terminal
    ssh-keygen
  3. The command will prompt you to save the file under the location <HOME_Directory>/.ssh/id_rsa.
  4. Press enter to select the default location.
  5. The command will prompt for passphase. Press enter to provide blank passphase.
  6. The private key (id_rsa) and public key (id_rsa.pub) files will be generated.

Bitbucket Setup:

Create an account in Bitbucket.

Add the public key to the Bitbucket[4]:

  1. Click on your bitbucket avatar icon, and go to Bitbucket settings.
  2. Under Security, go to SSH keys.
  3. Click on the Add key, provide a label.
  4. Copy the contents of your public key (i.e. ~/.ssh/id_rsa.pub) and paste it in the text box “Key”.
  5. Click on the add key, and you are done.

Steps to create repository in Bitbucket[5][6]:

  1. From Bitbucket, click the Create button at the top of the page and select Create repository from the drop-down menu.
  2. Provide the name of the repository, say myrepo, in the Name field.
  3. Provide the description of the repository in the Description field.
  4. For Access Level, select the check-box to make the repository private, otherwise un-select it.
  5. Select Git for repository type. Note, repository type cannot be changed later.
  6. Check both Issue tracking and Wiki checkbox for Project Management.
  7. For language field, select the option of your choice.
  8. Click “Create repository” button to create the repository.

Initialize a git repository and point it to your Bitbucket repository.

mkdir /path/to/your/project
cd /path/to/your/project
git init
git remote add origin ssh://git@bitbucket.org/username/reponame.git

Check your repository specific git configuration:

  • To check repository specific git configuration run following commands:

cd /path/to/your/project
cat .git/config

  • Check if the repository url is using HTTPS protocol as shown below:

[remote “origin”]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://emmap1@bitbucket.org/emmap1/bitbucketspacestation.git

  • Change repository url format from HTTPS protocal to SSH protocol:
  1. Find the repository URL from the Overview Page.
  2. Select the SSH option, the URL will look similar to “ssh://git@bitbucket.org/username/reponame.git”.
  3. Change the repository url value to SSH format “ssh://git@bitbucket.org/username/reponame.git” using your favourite file editor, so that it looks like below:

[remote “origin”]
fetch = +refs/heads/*:refs/remotes/origin/*
url = ssh://git@bitbucket.org/username/reponame.git

To set remote master as default branch for push and merge while pull, run following commands:

git config branch.master.remote origin
git config branch.master.merge refs/heads/master

To set the default git push as upstream [3]:

git config –global push.default upstream

References:

  1. https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
  2. https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
  3. https://git-scm.com/docs/git-config
  4. https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html
  5. https://confluence.atlassian.com/bitbucket/create-a-git-repository-759857290.html
  6. https://confluence.atlassian.com/bitbucket/create-a-repository-221449521.html

Install Idea IntelliJ in Fedora 23

Prerequisite:

Download the archive file for community or ultimate edition from the official website:

https://www.jetbrains.com/idea/download/#section=linux

The file will look similar to “ideaIC-15.0.2.tar.gz” in case of community edition.

Note: The community edition is a free version, while ultimate edition is a paid version which comes with one month free trial.

Installation Steps:

  • Copy the archive file to a desired location:

sudo cp ideaIC-15.0.2.tar.gz /opt/

  • Extract the archive file:

sudo tar -xvf ideaIC-15.0.2.tar.gz

  • Create symbolic links so that the IDE can be opened from any location:

ln -sf /opt/idea-IC-143.1184.17 /opt/idea
ln -s /opt/idea/bin/idea.sh /usr/local/bin/idea

  • Open the IntelliJ IDE by the running the following command:

idea

  • Create a desktop launcher:
    To create a desktop launcher create a idea.desktop file in the Desktop folder inside the HOME folder. Copy paste the following contents in the file:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=IntelliJ IDEA
GenericName=Java IDE
Comment=IntelliJ IDEA.
Exec=idea
Icon=/opt/idea/bin/idea.png
Terminal=false
Type=Application
Categories=Development;IDE