how to install pycharm on kali linux

How to Install PyCharm on Kali Linux? (+Shortcut)

Linux is often used by developers (and it’s great for that, I used it myself for years). The default editors are fine for beginners, but if you’re working on serious projects, you’ll probably be looking for a better alternative. Today we’ll see how to install PyCharm on Kali Linux.

PyCharm has a community version that is available for free on their website. The download file for Linux is already compiled, so the PyCharm IDE can be started directly by running pycharm.sh.

Running it once is fine, but the idea of this article is to go a little further. I’ll show you everything you need to know to get the most out of it.

Master Linux Commands
Your essential Linux handbook
Want to level up your Linux skills? Here is the perfect solution to become efficient on Linux. 20% off today!

Download now

Install PyCharm on Kali Linux

With Eclipse and Visual Studio, PyCharm is one of the most popular IDEs for programmers, especially when working with Python. Market share results vary too much to be considered – from 7% on the Top IDE index to 35% for JetBrains, the PyCharm editor ^^.

Anyway, PyCharm is well-known in the industry, with all the best features we can expect from an IDE, that’s why I want to show you how to install it on Kali Linux. Whether you’re working on large Python projects or just tinkering with it, it’s a good app to have on your system.

Download the Community version

Hide your IP address and location with a free VPN:
Try it for free now, with advanced security features.
2900+ servers in 65 countries. It's free. Forever.

PyCharm has two versions available:

  • A Professional Edition, where you need a license to use it (approximately $200 a year).
  • A Community Edition, which is open-source and free to use.

In this tutorial, we’ll be using the Community Edition, but there is a free trial of the Professional Edition if you’re interested.

To download the files, you can go to this URL on the official website.

Extract the files

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!

You should get a tar.gz file in your Downloads folder. You will need to extract all the files:

  • Open the file manager (there is a shortcut in the top bar).
  • Go to the Downloads folder (probably /home/$USER/Downloads).
  • Locate the PyCharm archive and right-click on it.
  • Select “Extract here” and wait a few seconds.

A new folder containing all the files will be created.

If you prefer the command line, you can also open a terminal, go to your Downloads folder, and run:
tar -zxvf pycharm-community-A.B.C.tar.gz
Replace A.B.C with the version number you downloaded (tip: use tab to auto-complete the file name).

Make sure Java is installed

Before doing anything else, we need to install Java. It should be installed by default on a fresh Kali Linux system, but just take a few seconds to make sure it’s there.

You can see if it’s installed with this command:
java --version

And install it if needed with:
sudo apt install openjdk-17-jre

You may have to check the versions available, and the PyCharm requirements before installing this version.
You can, for example, use this command to list all versions available in the repository:
apt search openjdk

Once installed, or if it’s already on your system, you can move to the next step.

First run

There is no installation wizard for PyCharm, so it won’t be added to the main menu.
We’ll get back to this later, but for now, you can run it once from the Downloads folder:

  • Open a terminal.
  • Go into the newly extracted folder (/home/USER/Downloads/pycharm-community-A.B.C).
    cd /home/$USER/Downloads/pycharm-community-2023.1
  • The executable is in the bin subfolder.
    cd bin
  • Run “pycharm.sh”:
    ./pycharm.sh

You’ll see the PyCharm loading screen and will need to accept the user agreement and data-sharing preferences. Then the interface will start:

From there, you can use it as you’re used to, or check out the online documentation if you’re new to it.
The goal of this tutorial isn’t to show you how to use PyCharm. If you are using it for the first time, you can easily find help on the Internet.

Improve your PyCharm installation

If you are used to my articles, you know that I always try to include some bonus tips in every article. After installing PyCharm, there are at least two things you can do to improve your experience.

Move the files to a safer location

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!

I don’t know about you, but in my case, I consider the Downloads folder as a temporary folder. I rarely need the files in it more than once. As soon as I have too many files in it, I delete everything or at least move the files to a subfolder to make sure I don’t need them.

Anyway, it’s not good practice to keep your applications in the Downloads folder.

If an app doesn’t have an installation wizard, you should move its files to another folder (e.g. /opt).
That’s exactly what we’re going to do for PyCharm:

Hide your IP address and location with a free VPN:
Try it for free now, with advanced security features.
2900+ servers in 65 countries. It's free. Forever.
  • Close PyCharm if it’s still running.
  • Open a terminal.
  • Run the following command:
    sudo mv /home/$USER/Downloads/pycharm-community-A.B.C /opt/pycharm
    Don’t forget to replace A.B.C with the version number you have.

We have to use a terminal because the default user doesn’t have the right to write in the /opt folder.

You can now start PyCharm from the /opt folder instead of /home/$USER/Downloads.
But that’s still not very convenient, so I’ll show you how to create a shortcut in the main menu.

Create a shortcut for PyCharm in the main menu

There is no installation wizard for PyCharm, we get the files already compiled and ready to use. It’s fine, but it doesn’t add it to the launcher on Kali Linux.

Here is how to create your shortcut :

  • Open a terminal.
  • Go to ~/.local/share/applications/ :
    cd ~/.local/share/applications/
  • Create a new file for PyCharm:
    nano pycharm.desktop
  • Paste the following lines:
    [Desktop Entry]
    Encoding=UTF-8
    Name=PyCharm
    Exec=/opt/pycharm/bin/pycharm.sh
    Icon=/opt/pycharm/bin/pycharm.png
    Type=Application
    Categories=Development;

    Obviously, you need to change the file path to fit your installation.
  • Save and exit (CTRL+X).

A few seconds later, you should find the PyCharm icon in the main menu, under Usual applications > Development:

That’s it, your app files are in a safe location, and you can run your favorite text editor as if it has been installed via APT or the Software app. Enjoy!

And if you need a hand for your Python projects on Kali Linux, you should definitely check these other tutorials on the website:

Whenever you’re ready for more security, here are things you should think about:

- Break free from Gmail: You should be able to choose what happens to your data. With Proton, only you can read your emails. Get private email.

- Protect yourself online: Use a high-speed Swiss VPN that safeguards your privacy. Open-source, no activity logs. Get Proton VPN risk-free.

- Master Linux commands: A sure method to learn (and remember) Linux commands. Useful ones only, one at a time, with clear explanations. Download the e-book.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *